l.c.o.OpenStackBaseConnection(ConnectionUserAndKey) : class documentation

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

No class docstring
Method __init__ Initialize `user_id` and `key`; set `secure` to an int based on passed value.
Method add_default_headers Adds default headers (such as Authorization, X-Foo-Bar) to the passed `headers`
Method morph_action Undocumented
Method base_url Undocumented
Method request Request a given `action`.
Method _get_base_url Undocumented
Method _get_default_region Undocumented
Method _populate_hosts_and_request_paths OpenStack uses a separate host for API calls which is only provided after an initial authentication request. If we haven't made that request yet, do it here. Otherwise, just return the management host.

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 morph_action_hook Undocumented
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
def __init__(self, user_id, key, secure=True, host=None, port=None, ex_force_base_url=None, ex_force_auth_url=None, ex_force_auth_version=None): (source)
Initialize `user_id` and `key`; set `secure` to an int based on passed value.
def add_default_headers(self, headers): (source)
Adds default headers (such as Authorization, X-Foo-Bar) to the passed `headers`

Should return a dictionary.

def morph_action(self, action): (source)
Undocumented
@property
def base_url(self): (source)
Undocumented
def _get_base_url(self, url_key): (source)
Undocumented
def _get_default_region(self, arr): (source)
Undocumented
def request(self, **kwargs): (source)
Request a given `action`.

Basically a wrapper around the connection object's `request` that does some helpful pre-processing.

ParametersactionA path (type: str)
paramsOptional mapping of additional parameters to send. If None, leave as an empty dict. (type: dict)
dataA body of data to send with the request. (type: unicode)
headersExtra headers to add to the request None, leave as an empty dict. (type: dict)
methodAn HTTP method such as "GET" or "POST". (type: str)
rawTrue 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)
ReturnsAn instance of type responseCls
def _populate_hosts_and_request_paths(self): (source)
OpenStack uses a separate host for API calls which is only provided after an initial authentication request. If we haven't made that request yet, do it here. Otherwise, just return the management host.
API Documentation for libcloud, generated by pydoctor at 2012-07-15 18:45:43.