Exercise cleanup
* Make common steps consistent
* Make comments consistent
aggregates.sh
boot_from_volume.sh
client-args.sh
client-env.sh
euca.sh
floating_ips.sh
sec_groups.sh
swift.sh
volumes.sh
Change-Id: Ib93dcdfdead93c259e3cd184fbc5ccc0a4a87c9a
diff --git a/exercises/euca.sh b/exercises/euca.sh
index 7b35f6f..8b15da8 100755
--- a/exercises/euca.sh
+++ b/exercises/euca.sh
@@ -44,7 +44,7 @@
# Instance type to create
DEFAULT_INSTANCE_TYPE=${DEFAULT_INSTANCE_TYPE:-m1.tiny}
-# Boot this image, use first AMI-format image if unset
+# Boot this image, use first AMI image if unset
DEFAULT_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-ami}
# Security group name
@@ -56,6 +56,7 @@
# Find a machine image to boot
IMAGE=`euca-describe-images | grep machine | grep ${DEFAULT_IMAGE_NAME} | cut -f2 | head -n1`
+die_if_not_set IMAGE "Failure getting image $DEFAULT_IMAGE_NAME"
# Add a secgroup
if ! euca-describe-groups | grep -q $SECGROUP; then
@@ -174,7 +175,7 @@
exit 1
fi
-# Delete group
+# Delete secgroup
euca-delete-group $SECGROUP || die "Failure deleting security group $SECGROUP"
set +o xtrace