Added functions for get a ip on an instance
The cause of some gating failure looks like
because of getting ip address on instance.
However current exercise didn't log the return value.
In this commit, we add get_instance_ip function with
error hanlding support, and apply it on the execise.
Change-Id: I8e17ba68093faafe58a98eb780a032368eea38aa
diff --git a/exercises/boot_from_volume.sh b/exercises/boot_from_volume.sh
index a3a14eb..36524ed 100755
--- a/exercises/boot_from_volume.sh
+++ b/exercises/boot_from_volume.sh
@@ -174,7 +174,8 @@
fi
# Get the instance IP
-IP=$(nova show $VM_UUID | grep "$PRIVATE_NETWORK_NAME" | get_field 2)
+IP=$(get_instance_ip $VM_UUID $PRIVATE_NETWORK_NAME)
+
die_if_not_set $LINENO IP "Failure retrieving IP address"
# Private IPs can be pinged in single node deployments