summaryrefslogtreecommitdiff
path: root/openstackclient/common
diff options
context:
space:
mode:
authorMonty Taylor <mordred@inaugust.com>2014-10-11 14:25:50 -0700
committerMonty Taylor <mordred@inaugust.com>2014-10-11 14:30:04 -0700
commit3af547a1a6e597ea1b38fb273195ac1ef00d29dd (patch)
tree85627b1d2065bc2e47ce5f1646ed9e07adc6d21f /openstackclient/common
parentf0c57e17c9a4b5bbe2f072a4eacefce3bcf30d45 (diff)
downloadpython-openstackclient-3af547a1a6e597ea1b38fb273195ac1ef00d29dd.tar.gz
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
Diffstat (limited to 'openstackclient/common')
-rw-r--r--openstackclient/common/clientmanager.py4
1 files changed, 2 insertions, 2 deletions
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