diff options
author | Laurent Strullu <laurent.strullu@orange.com> | 2017-08-23 09:36:15 +0200 |
---|---|---|
committer | Laurent Strullu <laurent.strullu@orange.com> | 2017-08-23 10:19:29 +0200 |
commit | 3715c30ef47a18ebf8243038c9e9390cf0b6c2d6 (patch) | |
tree | 0f5f6136ef7e24cbb09b370574acb2155a6b8802 | |
parent | e7b96a812bb7b30416b4adb24ef0f22666687c10 (diff) |
Get the correct endpoints URL based on OS_REGION_NAME env property
It also ignores *.pyc.
Change-Id: I94a5e297108b839fd6d2811faa34eed3023c0e3a
Signed-off-by: Laurent Strullu <laurent.strullu@orange.com>
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | snaps/openstack/utils/keystone_utils.py | 3 |
2 files changed, 4 insertions, 1 deletions
@@ -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, |