libcloud.common.durabledns module

class libcloud.common.durabledns.DurableConnection(user_id, key, secure=True, host=None, port=None, url=None, timeout=None, proxy_url=None, backoff=None, retry_delay=None)[source]

Bases: ConnectionUserAndKey

Initialize user_id and key; set secure to an int based on passed value.

add_default_headers(headers)[source]

Adds default headers (such as Authorization, X-Foo-Bar) to the passed headers

Should return a dictionary.

add_default_params(params)[source]

Adds default parameters (such as API key, version, etc.) to the passed params

Should return a dictionary.

host: str = 'durabledns.com'
responseCls

alias of DurableResponse

exception libcloud.common.durabledns.DurableDNSException(code, message)[source]

Bases: Exception

class libcloud.common.durabledns.DurableResponse(response, connection)[source]

Bases: XmlResponse

Parameters:
  • response (httplib.HTTPResponse) – HTTP response object. (optional)

  • connection (Connection) – Parent connection object.

errors: List[Dict] = []
objects: List[Dict] = []
parse_body()[source]

Parse response body.

Override in a provider’s subclass.

Returns:

Parsed body.

Return type:

str

parse_body_and_error()[source]

Used to parse body from httplib.HttpResponse object.

success()[source]

Used to determine if the request was successful.