python中Rackspace中的标识类型

时间:2015-03-02 08:20:23

标签: python-2.7 rackspace pyrax

对于在Rackspace中进行身份验证我从Reckspace文档中获得了以下代码

import pyrax

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

我没有得到身份类型的意思,请帮忙。提前谢谢。

1 个答案:

答案 0 :(得分:1)

您必须设置identity_type设置,以便可以使用正确的标识类。之前的版本仅适用于Rackspace身份,但现在已不再适用。如果您不想使用配置文件或环境变量,可以在代码中执行此操作:

pyrax.set_setting(“identity_type”,“keystone”) 或

pyrax.set_setting(“identity_type”,“rackspace”)  details here