The troveclient.compat.client Module

The troveclient.compat.client Module

class troveclient.compat.client.Dbaas(username, api_key, tenant=None, auth_url=None, service_type='database', service_name=None, service_url=None, insecure=False, auth_strategy='keystone', region_name=None, client_cls=<class 'troveclient.compat.client.TroveHTTPClient'>)

Bases: object

Top-level object to access the Rackspace Database as a Service API.

Create an instance with your creds:

>> red = Dbaas(USERNAME, API_KEY, TENANT, AUTH_URL, SERVICE_NAME,                         SERVICE_URL)

Then call methods on its managers:

>> red.instances.list()
...
>> red.flavors.list()
...

&c.

authenticate()

Authenticate against the server.

This is called to perform an authentication to retrieve a token.

Returns on success; raises exceptions.Unauthorized if the credentials are wrong.

get_timings()
set_management_url(url)
class troveclient.compat.client.TroveHTTPClient(user, password, tenant, auth_url, service_name, service_url=None, auth_strategy=None, insecure=False, timeout=None, proxy_tenant_id=None, proxy_token=None, region_name=None, endpoint_type='publicURL', service_type=None, timings=False)

Bases: httplib2.Http

USER_AGENT = 'python-troveclient'
authenticate()

Auths the client and gets a token. May optionally set a service url.

The client will get auth errors until the authentication step occurs. Additionally, if a service_url was not explicitly given in the clients __init__ method, one will be obtained from the auth service.

authenticate_with_token(token, service_url=None)
delete(url, **kwargs)
get(url, **kwargs)
get_timings()
http_log(args, kwargs, resp, body)
morph_request(kwargs)
morph_response_body(body_string)
patch(url, **kwargs)
post(url, **kwargs)
pretty_log(args, kwargs, resp, body)
put(url, **kwargs)
raise_error_from_status(resp, body)
request(*args, **kwargs)
simple_log(args, kwargs, resp, body)
troveclient.compat.client.log_to_streamhandler(stream=None)
Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.

python-troveclient 2.14.1.dev7