From 3715c30ef47a18ebf8243038c9e9390cf0b6c2d6 Mon Sep 17 00:00:00 2001 From: Laurent Strullu Date: Wed, 23 Aug 2017 09:36:15 +0200 Subject: Get the correct endpoints URL based on OS_REGION_NAME env property It also ignores *.pyc. Change-Id: I94a5e297108b839fd6d2811faa34eed3023c0e3a Signed-off-by: Laurent Strullu --- .gitignore | 2 ++ snaps/openstack/utils/keystone_utils.py | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 39e6d08..b3c2444 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ *.egg-info +*.pyc +*.*project build dist diff --git a/snaps/openstack/utils/keystone_utils.py b/snaps/openstack/utils/keystone_utils.py index f390c0f..b36c19f 100644 --- a/snaps/openstack/utils/keystone_utils.py +++ b/snaps/openstack/utils/keystone_utils.py @@ -101,7 +101,8 @@ def get_endpoint(os_creds, service_type, interface='public'): auth = get_session_auth(os_creds) key_session = keystone_session(os_creds) return key_session.get_endpoint( - auth=auth, service_type=service_type, interface=interface) + auth=auth, service_type=service_type, region_name=os_creds.region_name, + interface=interface) def get_project(keystone=None, os_creds=None, project_settings=None, -- cgit 1.2.3-korg