From b9c77d69a6be25bca73780df671ab7538997e1ac Mon Sep 17 00:00:00 2001 From: Jesse Andrews Date: Sat, 15 Oct 2011 18:37:25 -0700 Subject: [PATCH] add debug logging and notes about generating token --- exercise.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/exercise.sh b/exercise.sh index c791601..f8c82d0 100755 --- a/exercise.sh +++ b/exercise.sh @@ -52,10 +52,17 @@ export NOVA_VERSION=1.1 # FIXME - why does this need to be specified? export NOVA_REGION_NAME=RegionOne +# set log level to DEBUG (helps debug issues) +export NOVACLIENT_DEBUG=1 # Get a token for clients that don't support service catalog # ========================================================== -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'];"` + +# manually create a token by querying keystone (sending JSON data). Keystone +# returns a token and catalog of endpoints. We use python to parse the token +# and save it. + +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'];"` # Launching a server # ==================