commit | f51db059e6138151d2c0bd79417173f431863fab | [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 | ba6de70fb5ab0cacbbc2e140cddbe684be6a3644 [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"];'