Part of libcloud.common.openstack View Source View In Hierarchy
Known subclasses: libcloud.compute.drivers.openstack.OpenStackComputeConnection, libcloud.loadbalancer.drivers.rackspace.RackspaceConnection, libcloud.storage.drivers.cloudfiles.CloudFilesConnection
Parameters | user_id | User name to use when authenticating (type: string ) |
key | Secret to use when authenticating. (type: string ) | |
secure | Use HTTPS? (True by default.) (type: bool ) | |
ex_force_base_url | Base URL for connection requests. If not specified, this will be
determined by authenticating. (type: string ) | |
ex_force_auth_url | Base URL for authentication requests. (type: string ) | |
ex_force_auth_version | Authentication version to use. If not specified, defaults to
AUTH_API_VERSION. (type: string ) | |
ex_force_auth_token | Authentication token to use for connection requests. If specified, the
connection will not attempt to authenticate, and the value of
ex_force_base_url will be used to determine the base request URL. If
ex_force_auth_token is passed in, ex_force_base_url must also be provided. (type: string ) | |
ex_tenant_name | When authenticating, provide this tenant name to the identity service. A
scoped token will be returned. Some cloud providers require the tenant name
to be provided at authentication time. Others will use a default tenant if
none is provided. (type: string ) | |
ex_force_service_type | Service type to use when selecting an service. If not specified, a
provider specific default will be used. (type: string ) | |
ex_force_service_name | Service name to use when selecting an service. If not specified, a
provider specific default will be used. (type: string ) | |
ex_force_service_region | Region to use when selecting an service. If not specified, a provider
specific default will be used. (type: string ) |
Method | __init__ | Initialize `user_id` and `key`; set `secure` to an int
based on passed value. |
Method | get_endpoint | Selects the endpoint to use based on provider specific values, or overrides passed in by the user when setting up the driver. |
Method | add_default_headers | Adds default headers (such as Authorization, X-Foo-Bar) to the passed `headers` |
Method | morph_action_hook | Undocumented |
Method | request | Request a given `action`. |
Method | _populate_hosts_and_request_paths | OpenStack uses a separate host for API calls which is only provided after an initial authentication request. |
Method | _add_cache_busting_to_params | Undocumented |
Inherited from Connection (via ConnectionUserAndKey, ConnectionKey):
Method | set_context | Undocumented |
Method | connect | Establish a connection with the API server. |
Method | user_agent_append | Append a token to a user agent string. |
Method | add_default_params | Adds default parameters (such as API key, version, etc.) to the passed `params` |
Method | pre_connect_hook | A hook which is called before connecting to the remote server. This hook can perform a final manipulation on the params, headers and url parameters. |
Method | encode_data | Encode body data. |
Method | _tuple_from_url | Undocumented |
Method | _user_agent | Undocumented |
int
based on passed value.Returns | url of the relevant endpoint for the driver |
Should return a dictionary.
Basically a wrapper around the connection object's `request` that does some helpful pre-processing.
Parameters | action | A path (type: str ) |
params | Optional mapping of additional parameters to send. If None, leave as an
empty dict . (type: dict ) | |
data | A body of data to send with the request. (type: unicode ) | |
headers | Extra headers to add to the request None, leave as an empty
dict . (type: dict ) | |
method | An HTTP method such as "GET" or "POST". (type: str ) | |
raw | True to perform a "raw" request aka only send the headers and use
the rawResponseCls class. This is used with storage API when uploading a
file. (type: bool ) | |
Returns | An instance of type responseCls |