I'm using pyrax to manipulate Rackspace Cloud Files. Can I force pyrax to use servicenet instead of publicnet, or is it choosen automatically?
In django-cumulus settings we have settings.CUMULUS['SERVICENET']
parameter to handle it, but I didn't found, how to set this param to pyrax itself.
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>)
Where can I tell pyrax to use servicenet?
Set public to
False
when creating the connection, explicitly:Documentation on
connect_to_cloudfiles
:Source: pyrax/init.py, connect_to_files method.