diff options
Diffstat (limited to 'openstackclient/common/clientmanager.py')
| -rw-r--r-- | openstackclient/common/clientmanager.py | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/openstackclient/common/clientmanager.py b/openstackclient/common/clientmanager.py index f6f6642e..830ecde7 100644 --- a/openstackclient/common/clientmanager.py +++ b/openstackclient/common/clientmanager.py @@ -13,8 +13,7 @@ # under the License. # -"""Manage access to the clients, including authenticating when needed. -""" +"""Manage access to the clients, including authenticating when needed.""" import logging @@ -22,13 +21,12 @@ from openstackclient.compute import client as compute_client from openstackclient.identity import client as identity_client from openstackclient.image import client as image_client + LOG = logging.getLogger(__name__) class ClientCache(object): - """Descriptor class for caching created client handles. - """ - + """Descriptor class for caching created client handles.""" def __init__(self, factory): self.factory = factory self._handle = None @@ -41,20 +39,14 @@ class ClientCache(object): class ClientManager(object): - """Manages access to API clients, including authentication. - """ - + """Manages access to API clients, including authentication.""" compute = ClientCache(compute_client.make_client) identity = ClientCache(identity_client.make_client) image = ClientCache(image_client.make_client) - def __init__(self, token=None, url=None, - auth_url=None, - tenant_name=None, tenant_id=None, - username=None, password=None, - region_name=None, - api_version=None, - ): + def __init__(self, token=None, url=None, auth_url=None, tenant_name=None, + tenant_id=None, username=None, password=None, + region_name=None, api_version=None): self._token = token self._url = url self._auth_url = auth_url @@ -74,8 +66,7 @@ class ClientManager(object): return def get_endpoint_for_service_type(self, service_type): - """Return the endpoint URL for the service type. - """ + """Return the endpoint URL for the service type.""" # See if we are using password flow auth, i.e. we have a # service catalog to select endpoints from if self._service_catalog: |
