Skip to content

Instantly share code, notes, and snippets.

@marianogg9
Created March 27, 2014 15:31
Show Gist options
  • Select an option

  • Save marianogg9/9810231 to your computer and use it in GitHub Desktop.

Select an option

Save marianogg9/9810231 to your computer and use it in GitHub Desktop.
1- to obtain credentials:
# curl -s https://rackspace_api_urlv2.0/tokens -X 'POST' -d '{"auth":{"passwordCredentials":{"username":"user_name", "password":"my_pass"}}}' -H "Content-Type: application/json" | python -m json.tool
2- adding credentials.txt
# vim /root/credentials.txt
[rackspace_cloud]
username = user_name
api_key = aws_key
3- export and execute
# export RAX_CREDS_FILE=/root/credentials.txt
# python rax.py --list
/usr/lib64/python2.6/site-packages/Crypto/Util/number.py:57: PowmInsecureWarning: Not using mpz_powm_sec. You should rebuild using libgmp >= 5 to avoid timing attack vulnerability.
_warn("Not using mpz_powm_sec. You should rebuild using libgmp >= 5 to avoid timing attack vulnerability.", PowmInsecureWarning)
rax.py:201: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
sys.stderr.write("%s: %s\n" % (e, e.message))
Incorrect/unauthorized credentials received: Incorrect/unauthorized credentials received
# whoami
root
# set | grep RAX
RAX_CREDS_FILE=/root/credentials.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment