aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Brattain <ross.b.brattain@intel.com>2017-04-26 15:13:31 +0200
committerRoss Brattain <ross.b.brattain@intel.com>2017-04-26 15:17:32 +0200
commit90032ba61345752b014002dda629f84c42780e6c (patch)
tree34e8a614f18fcfca17bb34b967e194e836dab017
parent50a5d0cb28d95d8edb47b1775569fcdf52dd1c96 (diff)
Bugfix: fix multi-region support
When running with multiple regions we need to specify the region when we select the endpoint. the region is specified in the OS_REGION_NAME env variable Change-Id: I37853dd42f6d9013d4475b5e3b2b9f97b6bdc8d0 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
-rw-r--r--yardstick/common/openstack_utils.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/yardstick/common/openstack_utils.py b/yardstick/common/openstack_utils.py
index 788de0de4..1f08344e4 100644
--- a/yardstick/common/openstack_utils.py
+++ b/yardstick/common/openstack_utils.py
@@ -85,9 +85,13 @@ def get_session():
def get_endpoint(service_type, endpoint_type='publicURL'):
auth = get_session_auth()
+ # for multi-region, we need to specify region
+ # when finding the endpoint
return get_session().get_endpoint(auth=auth,
service_type=service_type,
- endpoint_type=endpoint_type)
+ endpoint_type=endpoint_type,
+ region_name=os.environ.get(
+ "OS_REGION_NAME"))
# *********************************************