summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Strullu <laurent.strullu@orange.com>2017-08-23 09:36:15 +0200
committerLaurent Strullu <laurent.strullu@orange.com>2017-08-23 10:19:29 +0200
commit3715c30ef47a18ebf8243038c9e9390cf0b6c2d6 (patch)
tree0f5f6136ef7e24cbb09b370574acb2155a6b8802
parente7b96a812bb7b30416b4adb24ef0f22666687c10 (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--.gitignore2
-rw-r--r--snaps/openstack/utils/keystone_utils.py3
2 files changed, 4 insertions, 1 deletions
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,