The watcherclient.common.http Module

class watcherclient.common.http.HTTPClient(endpoint, **kwargs)[source]

Bases: object

get_connection()[source]
static get_connection_params(endpoint, **kwargs)[source]
json_request(method, url, **kwargs)[source]
log_curl_request(method, url, kwargs)[source]
static log_http_response(resp, body=None)[source]
raw_request(method, url, **kwargs)[source]
class watcherclient.common.http.ResponseBodyIterator(resp)[source]

Bases: object

A class that acts as an iterator over an HTTP response.

next()[source]
class watcherclient.common.http.SessionClient(session, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None)[source]

Bases: keystoneclient.adapter.LegacyJsonAdapter

HTTP client based on Keystone client session.

json_request(method, url, **kwargs)[source]
raw_request(method, url, **kwargs)[source]
class watcherclient.common.http.VerifiedHTTPSConnection(host, port, key_file=None, cert_file=None, ca_file=None, timeout=None, insecure=False)[source]

Bases: httplib.HTTPSConnection

httplib-compatibile connection using client-side SSL authentication

:see http://code.activestate.com/recipes/
577548-https-httplib-client-connection-with-certificate-v/
connect()[source]

Connect to a host on a given (SSL) port.

If ca_file is pointing somewhere, use it to check Server Certificate.

Redefined/copied and extended from httplib.py:1105 (Python 2.6.x). This is needed to pass cert_reqs=ssl.CERT_REQUIRED as parameter to ssl.wrap_socket(), which forces SSL to check server certificate against our client certificate.

static get_system_ca_file()[source]

Return path to system default CA file.

Previous topic

The watcherclient.common.command Module

Next topic

The watcherclient.common.utils Module

Project Source

This Page