对于在 Rackspace 中进行身份验证,我从 Reckspace 文档中获得了以下代码
import pyrax
pyrax.set_setting("identity_type", "rackspace")
pyrax.set_default_region('{region}')
pyrax.set_credentials('{username}', '{apiKey}')
我不明白身份类型是什么意思,请帮忙。提前致谢。
对于在 Rackspace 中进行身份验证,我从 Reckspace 文档中获得了以下代码
import pyrax
pyrax.set_setting("identity_type", "rackspace")
pyrax.set_default_region('{region}')
pyrax.set_credentials('{username}', '{apiKey}')
我不明白身份类型是什么意思,请帮忙。提前致谢。
您必须设置 identity_type 设置,以便可以使用正确的身份类别。以前的版本仅适用于 Rackspace 身份,但现在不再如此。如果您不想使用配置文件或环境变量,可以在代码中执行此操作:
pyrax.set_setting("identity_type", "keystone") 或
pyrax.set_setting("identity_type", "rackspace") 详情在这里