diff options
Diffstat (limited to 'share/newton_base/openoapi/hosts.py')
-rw-r--r-- | share/newton_base/openoapi/hosts.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/share/newton_base/openoapi/hosts.py b/share/newton_base/openoapi/hosts.py index d93336a4..7a311b38 100644 --- a/share/newton_base/openoapi/hosts.py +++ b/share/newton_base/openoapi/hosts.py @@ -52,6 +52,10 @@ class Hosts(APIView): vim = VimDriverUtils.get_vim_info(vimid) sess = VimDriverUtils.get_session(vim, tenantid) + self.service['region_id'] = vim['openstack_region_id'] \ + if vim.get('openstack_region_id') \ + else vim['cloud_region_id'] + logger.info("making request with URI:%s" % req_resouce) resp = sess.get(req_resouce, endpoint_filter=self.service) logger.info("request returns with status %s" % resp.status_code) |