我在用pyrax操作Rackspace云文件。 我可以强制pyrax使用servicenet而不是publicnet,还是它是自动选择的?在
在django积云设置中,我们有settings.CUMULUS['SERVICENET']
参数来处理它,但是我没有找到如何将这个参数设置为pyrax本身。在
import pyrax
cls = pyrax.utils.import_class('pyrax.identity.rax_identity.RaxIdentity')
pyrax.identity = cls()
pyrax.set_setting('region', <REGION>)
pyrax.set_credentials(<USERNAME>, <API_KEY>)
cf = pyrax.cloudfiles
rackspace_media_container = cf.get_container(<CONTAINER>)
在哪里可以告诉pyrax使用servicenet?在
创建连接时,将public设置为
False
,显式:关于
connect_to_cloudfiles
的文档:来源:pyrax/init.py, connect_to_files method。在
相关问题 更多 >
编程相关推荐