X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=yardstick%2Fcommon%2Fopenstack_utils.py;h=8787e605a8f087bf7c4d23d4fc021b36f70a3902;hb=dae41a002f756d1da65a749bc82eef3ccf4252db;hp=788de0de4f132dc9c18cf531046c6c2502a26f04;hpb=c9b4860c5a9d27f0a8b70268c2f938b5481de821;p=yardstick.git diff --git a/yardstick/common/openstack_utils.py b/yardstick/common/openstack_utils.py index 788de0de4..8787e605a 100644 --- a/yardstick/common/openstack_utils.py +++ b/yardstick/common/openstack_utils.py @@ -79,15 +79,20 @@ def get_session(): except KeyError: return session.Session(auth=auth) else: - cacert = False if cacert.lower() == "false" else cacert + insecure = os.getenv('OS_INSECURE', '').lower() == 'true' + cacert = False if insecure else cacert return session.Session(auth=auth, verify=cacert) 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")) # *********************************************