slizadel/dns-updater — pull request #3 by TheSkorm (2014-07-06 05:19:35+00:00)
Title: Update dns-updater.py

https://github.com/rackspace/pyrax/issues/79 Pyrax now requires you to set the identity type - if this hasn't been done in a config file you have to do it in code. Patch forces rackspace identity type.

Example error message without this patch -
Traceback (most recent call last):
File "./dns-updater.py", line 56, in
argh.dispatch_command(main)
File "/usr/local/lib/python2.7/dist-packages/argh/dispatching.py", line 231, in dispatch_command
dispatch(parser, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/argh/dispatching.py", line 125, in dispatch
for line in lines:
File "/usr/local/lib/python2.7/dist-packages/argh/dispatching.py", line 202, in _execute_command
for line in result:
File "/usr/local/lib/python2.7/dist-packages/argh/dispatching.py", line 185, in _call
result = args.function(*positional, **keywords)
File "./dns-updater.py", line 21, in main
pyrax.set_credential_file(os.path.expanduser(creds_file))
File "/usr/local/lib/python2.7/dist-packages/pyrax/__init__.py", line 430, in _wrapped
_create_identity()
File "/usr/local/lib/python2.7/dist-packages/pyrax/__init__.py", line 413, in _create_identity
raise exc.IdentityClassNotDefined("No identity class has "
pyrax.exceptions.IdentityClassNotDefined: No identity class has been defined for the current environment.