Browse code

add debug logging and notes about generating token

Jesse Andrews authored on 2011/10/16 10:37:25
Showing 1 changed files
... ...
@@ -52,10 +52,17 @@ export NOVA_VERSION=1.1
52 52
 # FIXME - why does this need to be specified?
53 53
 export NOVA_REGION_NAME=RegionOne
54 54
 
55
+# set log level to DEBUG (helps debug issues)
56
+export NOVACLIENT_DEBUG=1
55 57
 
56 58
 # Get a token for clients that don't support service catalog
57 59
 # ==========================================================
58
-SERVICE_TOKEN=`curl -s -d  "{\"auth\":{\"passwordCredentials\": {\"username\": \"$NOVA_USERNAME\", \"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'];"`
60
+
61
+# manually create a token by querying keystone (sending JSON data).  Keystone 
62
+# returns a token and catalog of endpoints.  We use python to parse the token
63
+# and save it.
64
+
65
+TOKEN=`curl -s -d  "{\"auth\":{\"passwordCredentials\": {\"username\": \"$NOVA_USERNAME\", \"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 66
 
60 67
 # Launching a server
61 68
 # ==================