Browse code

make glance client work in exercise.sh

Anthony Young authored on 2011/10/12 03:07:48
Showing 1 changed files
... ...
@@ -53,6 +53,10 @@ export NOVA_VERSION=1.1
53 53
 export NOVA_REGION_NAME=RegionOne
54 54
 
55 55
 
56
+# Get a token for clients that don't support service catalog
57
+# ==========================================================
58
+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'];"`
59
+
56 60
 # Launching a server
57 61
 # ==================
58 62
 
... ...
@@ -69,7 +73,7 @@ nova flavor-list
69 69
 nova image-list
70 70
 
71 71
 # But we recommend using glance directly
72
-glance index
72
+glance -A $SERVICE_TOKEN index
73 73
 
74 74
 # show details of the active servers::
75 75
 #