Identity type in Rackspace in python

64 Views Asked by At

For Authenticating in Rackspace I got following code from Reckspace documentation

import pyrax

pyrax.set_setting("identity_type", "rackspace")
pyrax.set_default_region('{region}')
pyrax.set_credentials('{username}', '{apiKey}')

I don't get what is meant here by identity type please help. Thanks in advance.

1

There are 1 best solutions below

1
On

you must set the identity_type setting so that can use the correct identity class. Prior versions only worked with Rackspace identity, but that is no longer the case. If you don't want to use a configuration file or an environment variable, you can do this in code:

pyrax.set_setting("identity_type", "keystone") or

pyrax.set_setting("identity_type", "rackspace") details here