'Creates a new client to some service.
:param host: The host where service resides
:param port: The port where service resides
:param timeout: Connection timeout.
:param use_ssl: Should we use HTTPS?
:param auth_token: The auth token to pass to the server
:param creds: The credentials to pass to the auth plugin
:param doc_root: Prefix for all URLs we request from host
:param key_file: Optional PEM-formatted file that contains the private
key.
If use_ssl is True, and this param is None (the
default), then an environ variable
GLANCE_CLIENT_KEY_FILE is looked for. If no such
environ variable is found, ClientConnectionError
will be raised.
:param cert_file: Optional PEM-formatted certificate chain file.
If use_ssl is True, and this param is None (the
default), then an environ variable
GLANCE_CLIENT_CERT_FILE is looked for. If no such
environ variable is found, ClientConnectionError
will be raised.
:param ca_file: Optional CA cert file to use in SSL connections
If use_ssl is True, and this param is None (the
default), then an environ variable
GLANCE_CLIENT_CA_FILE is looked for.
:param insecure: Optional. If set then the server\'s certificate
will not be verified.
:param configure_via_auth: Optional. Defaults to True. If set, the
URL returned from the service catalog for the image
endpoint will **override** the URL supplied to in
the host parameter.'

def __init__(self, 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):

    self.host = host
    self.port = (port or self.DEFAULT_PORT)
    self.timeout = timeout
    if (timeout == 0):
        self.timeout = None
    self.use_ssl = use_ssl
    self.auth_token = auth_token
    self.creds = (creds or {})
    self.connection = None
    self.configure_via_auth = configure_via_auth
    self.doc_root = (doc_root if (doc_root is not None) else self.DEFAULT_DOC_ROOT)
    self.key_file = key_file
    self.cert_file = cert_file
    self.ca_file = ca_file
    self.insecure = insecure
    self.auth_plugin = self.make_auth_plugin(self.creds, self.insecure)
    self.connect_kwargs = self.get_connect_kwargs()
