From 2166d7d3afbbdc1659e4cffdb7bcd890cd00ec19 Mon Sep 17 00:00:00 2001 From: Dean Troyer Date: Fri, 17 Oct 2014 23:43:38 -0500 Subject: Remove ClientManager._service_catalog Anything that needs a service catalog can get it directly from auth_ref.service_catalog, no need to carry the extra attribute. ClientManager.get_endpoint_for_service_type() reamins the proper method to get an endpoint for clients that still need one directly. Change-Id: I809091c9c71d08f29606d7fd8b500898ff2cb8ae --- openstackclient/image/client.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'openstackclient/image/client.py') diff --git a/openstackclient/image/client.py b/openstackclient/image/client.py index 84f59437..c55ff853 100644 --- a/openstackclient/image/client.py +++ b/openstackclient/image/client.py @@ -40,11 +40,13 @@ def make_client(instance): API_VERSIONS) LOG.debug('Instantiating image client: %s', image_client) - if not instance._url: - instance._url = instance.get_endpoint_for_service_type(API_NAME) + endpoint = instance.get_endpoint_for_service_type( + API_NAME, + region_name=instance._region_name, + ) return image_client( - instance._url, + endpoint, token=instance.auth.get_token(instance.session), cacert=instance._cacert, insecure=instance._insecure, -- cgit v1.2.1