diff options
Diffstat (limited to 'share/newton_base/proxy/services.py')
-rw-r--r-- | share/newton_base/proxy/services.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/share/newton_base/proxy/services.py b/share/newton_base/proxy/services.py index a6076bb7..6aa1bbce 100644 --- a/share/newton_base/proxy/services.py +++ b/share/newton_base/proxy/services.py @@ -103,9 +103,12 @@ class Services(APIView): service = { 'service_type': servicetype, 'interface': interface, - 'region_id': regionid + 'region_id': vim['openstack_region_id'] + if vim.get('openstack_region_id') + else vim['cloud_region_id'] } + querystr = VimDriverUtils.get_query_part(request) if querystr: req_resource += "?" + querystr @@ -183,7 +186,11 @@ class Services(APIView): interface = 'public' service = {'service_type': servicetype, 'interface': interface, - 'region_id': regionid} + 'region_id': vim['openstack_region_id'] + if vim.get('openstack_region_id') + else vim['cloud_region_id'] + } + self._logger.info("service head request with uri %s" % (req_resource)) resp = sess.head(req_resource, endpoint_filter=service) |