commit | 85be08eaa5983722d19b105e1eaeb96b1f145c0e | [log] [tgz] |
---|---|---|
author | Tony Mack <tony.mack@gmail.com> | Mon Sep 14 00:00:20 2015 +0000 |
committer | Tony Mack <tony.mack@gmail.com> | Mon Sep 14 00:00:20 2015 +0000 |
tree | 73ca80cc1687dfae69b0792fb078d7553513b3ad | |
parent | c2f8b144eae4b8e7376cd32a005900f14d815ead [diff] |
initial checkin
diff --git a/xos/openstack/get_token.sh b/xos/openstack/get_token.sh new file mode 100755 index 0000000..f8012fb --- /dev/null +++ b/xos/openstack/get_token.sh
@@ -0,0 +1,4 @@ +curl --insecure -X POST $ENDPOINT/v2.0/tokens \ + -H "Content-type: application/json" \ + -d '{"auth": {"tenantName": "'$TENANT'", "passwordCredentials":{"username": "'$USERNAME'", "password": "'$PASSWORD'"}}}' \ + | python -c 'import json,sys;obj=json.load(sys.stdin);print obj["access"]["token"]["id"];'