From 94c889ac1587e2e5096c4472e4a4385dfd76d331 Mon Sep 17 00:00:00 2001 From: Anthony Young Date: Tue, 11 Oct 2011 18:07:48 +0000 Subject: [PATCH] make glance client work in exercise.sh --- exercise.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/exercise.sh b/exercise.sh index a1cf025..d9d4c0a 100755 --- a/exercise.sh +++ b/exercise.sh @@ -53,6 +53,10 @@ export NOVA_VERSION=1.1 export NOVA_REGION_NAME=RegionOne +# Get a token for clients that don't support service catalog +# ========================================================== +SERVICE_TOKEN=`curl -s -d "{\"auth\":{\"passwordCredentials\": {\"username\": \"$NOVA_PROJECT_ID\", \"password\": \"$NOVA_API_KEY\"}}}" -H "Content-type: application/json" http://$HOST:5000/v2.0/tokens | python -c "import sys; import json; tok = json.loads(sys.stdin.read()); print tok['access']['token']['id'];"` + # Launching a server # ================== @@ -69,7 +73,7 @@ nova flavor-list nova image-list # But we recommend using glance directly -glance index +glance -A $SERVICE_TOKEN index # show details of the active servers:: #