Add glance client
* python-glanceclient overrides the old client shipped with glance in /usr/local/bin
* start adding exercises
Change-Id: I460ed5749bca69425f23d328c0537c2ef91f84a4
diff --git a/exercises/boot_from_volume.sh b/exercises/boot_from_volume.sh
index c707b47..6a0937a 100755
--- a/exercises/boot_from_volume.sh
+++ b/exercises/boot_from_volume.sh
@@ -51,7 +51,7 @@
# =================
# Grab the id of the image to launch
-IMAGE=`glance -f index | egrep $DEFAULT_IMAGE_NAME | head -1 | cut -d" " -f1`
+IMAGE=`glance image-list | egrep " $DEFAULT_IMAGE_NAME " | get_field 1`
die_if_not_set IMAGE "Failure getting image"
# Instance and volume names
diff --git a/exercises/client-args.sh b/exercises/client-args.sh
index 66fddcf..1d7d5b6 100755
--- a/exercises/client-args.sh
+++ b/exercises/client-args.sh
@@ -46,7 +46,9 @@
# Common authentication args
TENANT_ARG="--os_tenant_name=$x_TENANT_NAME"
+TENANT_ARG_DASH="--os-tenant-name=$x_TENANT_NAME"
ARGS="--os_username=$x_USERNAME --os_password=$x_PASSWORD --os_auth_url=$x_AUTH_URL"
+ARGS_DASH="--os-username=$x_USERNAME --os-password=$x_PASSWORD --os-auth-url=$x_AUTH_URL"
# Set global return
RETURN=0
@@ -94,7 +96,7 @@
STATUS_GLANCE="Skipped"
else
echo -e "\nTest Glance"
- if glance $TENANT_ARG $ARGS index; then
+ if glance $TENANT_ARG_DASH $ARGS_DASH image-list; then
STATUS_GLANCE="Succeeded"
else
STATUS_GLANCE="Failed"
diff --git a/exercises/client-env.sh b/exercises/client-env.sh
index af2c4c2..10871a6 100755
--- a/exercises/client-env.sh
+++ b/exercises/client-env.sh
@@ -107,7 +107,7 @@
STATUS_GLANCE="Skipped"
else
echo -e "\nTest Glance"
- if glance index; then
+ if glance image-list; then
STATUS_GLANCE="Succeeded"
else
STATUS_GLANCE="Failed"
diff --git a/exercises/floating_ips.sh b/exercises/floating_ips.sh
index 9974b4b..dd40aa0 100755
--- a/exercises/floating_ips.sh
+++ b/exercises/floating_ips.sh
@@ -63,10 +63,10 @@
nova image-list
# But we recommend using glance directly
-glance -f index
+glance image-list
# Grab the id of the image to launch
-IMAGE=`glance -f index | egrep $DEFAULT_IMAGE_NAME | head -1 | cut -d" " -f1`
+IMAGE=$(glance image-list | egrep " $DEFAULT_IMAGE_NAME " | get_field 1)
# Security Groups
# ---------------
diff --git a/exercises/volumes.sh b/exercises/volumes.sh
index 1abbecc..b62427f 100755
--- a/exercises/volumes.sh
+++ b/exercises/volumes.sh
@@ -53,10 +53,10 @@
nova image-list
# But we recommend using glance directly
-glance -f index
+glance image-list
# Grab the id of the image to launch
-IMAGE=`glance -f index | egrep $DEFAULT_IMAGE_NAME | head -1 | cut -d" " -f1`
+IMAGE=$(glance image-list | egrep " $DEFAULT_IMAGE_NAME " | get_field 1)
# determinine instance type
# -------------------------