summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorXiaohua Zhang <xiaohua.zhang@windriver.com>2018-09-20 09:52:25 +0000
committerXiaohua Zhang <xiaohua.zhang@windriver.com>2018-09-20 09:52:25 +0000
commitea803b961e4d5ae108183ebd2b5c6eaa1a1be4d6 (patch)
treeac2783e6b5728b5f2b538cd5f9a347a29f245314 /share
parentd6d8cbf451a596aa7cbaa240fbcafb288a3494bc (diff)
Fix bug of infra_workload
Remove region filter for identity endpoint Change-Id: I944b42926b4c5d5de8799de9c68b2b7e8bac5017 Issue-ID: MULTICLOUD-361 Signed-off-by: Xiaohua Zhang <xiaohua.zhang@windriver.com>
Diffstat (limited to 'share')
-rw-r--r--share/newton_base/registration/registration.py15
1 files changed, 10 insertions, 5 deletions
diff --git a/share/newton_base/registration/registration.py b/share/newton_base/registration/registration.py
index d5b75cf6..afcd0761 100644
--- a/share/newton_base/registration/registration.py
+++ b/share/newton_base/registration/registration.py
@@ -40,11 +40,16 @@ class Registry(APIView):
def _get_list_resources(
self, resource_url, service_type, session, viminfo,
vimid, content_key):
- service = {'service_type': service_type,
- 'interface': 'public',
- 'region_name': viminfo['openstack_region_id']
- if viminfo.get('openstack_region_id')
- else viminfo['cloud_region_id']}
+ service = {
+ 'service_type': service_type,
+ 'interface': 'public'
+ }
+
+ # identity service should not filtered by region since it is might be first call
+ # to figure out available region list
+ if service_type != 'identity':
+ service['region_name'] = viminfo['openstack_region_id']\
+ if viminfo.get('openstack_region_id') else viminfo['cloud_region_id']
self._logger.info("making request with URI:%s" % resource_url)
resp = session.get(resource_url, endpoint_filter=service)