From 3af547a1a6e597ea1b38fb273195ac1ef00d29dd Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Sat, 11 Oct 2014 14:25:50 -0700 Subject: Fix operation on clouds with availability-zones In a cloud with AZs, you can get multiple entries back from the service catalog - one for each AZ and then one that is AZ agnostic that's tied to the region. If the region_name is plumbed all the way through, this works as intended. Change-Id: I3b365ea306e8111fc80830672ae8080a5d1dc8e0 --- openstackclient/common/clientmanager.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'openstackclient/common/clientmanager.py') diff --git a/openstackclient/common/clientmanager.py b/openstackclient/common/clientmanager.py index 0542b473..387721a4 100644 --- a/openstackclient/common/clientmanager.py +++ b/openstackclient/common/clientmanager.py @@ -110,13 +110,13 @@ class ClientManager(object): return - def get_endpoint_for_service_type(self, service_type): + def get_endpoint_for_service_type(self, service_type, region_name=None): """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: endpoint = self._service_catalog.url_for( - service_type=service_type) + service_type=service_type, region_name=region_name) else: # Hope we were given the correct URL. endpoint = self._auth_url or self._url -- cgit v1.2.1