From b26cb5bf683e7f4f03d9704524a188b76ac5e9b9 Mon Sep 17 00:00:00 2001 From: Josh Kearney Date: Thu, 31 Jan 2013 13:31:41 -0600 Subject: Upgraded to PEP8 1.3.3 to stay aligned with Nova, etc. Made all the necessary changes to pass new PEP8 standards. Also cleaned up docstrings to conform to the HACKING stanards. Change-Id: Ib8df3030da7a7885655689ab5da0717748c9edbe --- openstackclient/common/clientmanager.py | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) (limited to 'openstackclient/common/clientmanager.py') 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: -- cgit v1.2.1