From: Ross Brattain Date: Wed, 26 Apr 2017 13:13:31 +0000 (+0200) Subject: Bugfix: fix multi-region support X-Git-Tag: opnfv-5.0.RC1~493 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F63%2F33863%2F1;p=yardstick.git 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 --- 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")) # *********************************************