glance.common.client.
BaseClient
(host, port=None, timeout=None, use_ssl=False, auth_token=None, creds=None, doc_root=None, key_file=None, cert_file=None, ca_file=None, insecure=False, configure_via_auth=True)[source]¶Bases: object
A base client class
DEFAULT_CA_FILE_PATH
= '/etc/ssl/certs/ca-certificates.crt:/etc/pki/tls/certs/ca-bundle.crt:/etc/ssl/ca-bundle.pem:/etc/ssl/cert.pem'¶DEFAULT_DOC_ROOT
= None¶DEFAULT_PORT
= 80¶OK_RESPONSE_CODES
= (200, 201, 202, 204)¶REDIRECT_RESPONSE_CODES
= (301, 302, 303, 305, 307)¶configure_from_url
(url)[source]¶Setups the connection based on the given url.
The form is:
<http|https>://<host>:port/doc_root
do_request
(*args, **kwargs)[source]¶Make a request, returning an HTTP response object.
Parameters: |
|
---|---|
Returns: | HTTP response object |
glance.common.client.
HTTPSClientAuthConnection
(host, port, key_file, cert_file, ca_file, timeout=None, insecure=False)[source]¶Bases: httplib.HTTPSConnection
Class to make a HTTPS connection, with support for full client-based SSL Authentication
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.
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.