diff options
author | Xiaohua Zhang <xiaohua.zhang@windriver.com> | 2018-09-20 04:53:04 +0000 |
---|---|---|
committer | Xiaohua Zhang <xiaohua.zhang@windriver.com> | 2018-09-20 04:53:04 +0000 |
commit | d6d8cbf451a596aa7cbaa240fbcafb288a3494bc (patch) | |
tree | e2ccc49af7370ba9dac76dc51f873bd0b01c045b /share/newton_base/openoapi | |
parent | d6279df2157d37978895cb246b2e52cb992c3d1f (diff) |
Filter endpoint filter mismatch with keystoneauth1
keystoneauth1 accept region_name as endpoint filter,
which will match either region_id or region of the
endpoint catalog
Change-Id: I7ba1f7904e4b3004565d826f4ea3cd345ce45f62
Issue-ID: MULTICLOUD-364
Signed-off-by: Xiaohua Zhang <xiaohua.zhang@windriver.com>
Diffstat (limited to 'share/newton_base/openoapi')
-rw-r--r-- | share/newton_base/openoapi/flavor.py | 6 | ||||
-rw-r--r-- | share/newton_base/openoapi/hosts.py | 2 | ||||
-rwxr-xr-x | share/newton_base/openoapi/hypervisor.py | 2 | ||||
-rw-r--r-- | share/newton_base/openoapi/image.py | 8 | ||||
-rw-r--r-- | share/newton_base/openoapi/limits.py | 6 | ||||
-rw-r--r-- | share/newton_base/openoapi/network.py | 6 | ||||
-rw-r--r-- | share/newton_base/openoapi/server.py | 14 | ||||
-rw-r--r-- | share/newton_base/openoapi/subnet.py | 6 | ||||
-rw-r--r-- | share/newton_base/openoapi/tenants.py | 2 | ||||
-rw-r--r-- | share/newton_base/openoapi/volume.py | 6 | ||||
-rw-r--r-- | share/newton_base/openoapi/vport.py | 4 |
11 files changed, 31 insertions, 31 deletions
diff --git a/share/newton_base/openoapi/flavor.py b/share/newton_base/openoapi/flavor.py index 18a13987..b0a6bf6c 100644 --- a/share/newton_base/openoapi/flavor.py +++ b/share/newton_base/openoapi/flavor.py @@ -64,7 +64,7 @@ class Flavors(APIView): vim = VimDriverUtils.get_vim_info(vimid) sess = VimDriverUtils.get_session(vim, tenantid) - self.service['region_id'] = vim['openstack_region_id'] \ + self.service['region_name'] = vim['openstack_region_id'] \ if vim.get('openstack_region_id') \ else vim['cloud_region_id'] @@ -192,7 +192,7 @@ class Flavors(APIView): vim = VimDriverUtils.get_vim_info(vimid) sess = VimDriverUtils.get_session(vim, tenantid) - self.service['region_id'] = vim['openstack_region_id'] \ + self.service['region_name'] = vim['openstack_region_id'] \ if vim.get('openstack_region_id') \ else vim['cloud_region_id'] @@ -338,7 +338,7 @@ class Flavors(APIView): vim = VimDriverUtils.get_vim_info(vimid) sess = VimDriverUtils.get_session(vim, tenantid) - self.service['region_id'] = vim['openstack_region_id'] \ + self.service['region_name'] = vim['openstack_region_id'] \ if vim.get('openstack_region_id') \ else vim['cloud_region_id'] diff --git a/share/newton_base/openoapi/hosts.py b/share/newton_base/openoapi/hosts.py index 7a311b38..e136c400 100644 --- a/share/newton_base/openoapi/hosts.py +++ b/share/newton_base/openoapi/hosts.py @@ -52,7 +52,7 @@ class Hosts(APIView): vim = VimDriverUtils.get_vim_info(vimid) sess = VimDriverUtils.get_session(vim, tenantid) - self.service['region_id'] = vim['openstack_region_id'] \ + self.service['region_name'] = vim['openstack_region_id'] \ if vim.get('openstack_region_id') \ else vim['cloud_region_id'] diff --git a/share/newton_base/openoapi/hypervisor.py b/share/newton_base/openoapi/hypervisor.py index bfde0f51..455bad68 100755 --- a/share/newton_base/openoapi/hypervisor.py +++ b/share/newton_base/openoapi/hypervisor.py @@ -72,7 +72,7 @@ class Hypervisors(APIView): vim["domain"] = "Default"
sess = VimDriverUtils.get_session(vim, tenantid)
- self.service['region_id'] = vim['openstack_region_id'] \
+ self.service['region_name'] = vim['openstack_region_id'] \
if vim.get('openstack_region_id') \
else vim['cloud_region_id']
diff --git a/share/newton_base/openoapi/image.py b/share/newton_base/openoapi/image.py index 85615275..e40980d6 100644 --- a/share/newton_base/openoapi/image.py +++ b/share/newton_base/openoapi/image.py @@ -58,7 +58,7 @@ class imageThread (threading.Thread): vim = VimDriverUtils.get_vim_info(vimid) sess = VimDriverUtils.get_session(vim, tenantid) - self.service['region_id'] = vim['openstack_region_id']\ + self.service['region_name'] = vim['openstack_region_id']\ if vim.get('openstack_region_id')\ else vim['cloud_region_id'] @@ -117,7 +117,7 @@ class Images(APIView): vim = VimDriverUtils.get_vim_info(vimid) sess = VimDriverUtils.get_session(vim, tenantid) - self.service['region_id'] = vim['openstack_region_id'] \ + self.service['region_name'] = vim['openstack_region_id'] \ if vim.get('openstack_region_id') \ else vim['cloud_region_id'] @@ -194,7 +194,7 @@ class Images(APIView): #req_body = json.JSONEncoder().encode({"image": image}) req_body = json.JSONEncoder().encode(image) - self.service['region_id'] = vim['openstack_region_id'] \ + self.service['region_name'] = vim['openstack_region_id'] \ if vim.get('openstack_region_id') \ else vim['cloud_region_id'] @@ -251,7 +251,7 @@ class Images(APIView): vim = VimDriverUtils.get_vim_info(vimid) sess = VimDriverUtils.get_session(vim, tenantid) - self.service['region_id'] = vim['openstack_region_id'] \ + self.service['region_name'] = vim['openstack_region_id'] \ if vim.get('openstack_region_id') \ else vim['cloud_region_id'] diff --git a/share/newton_base/openoapi/limits.py b/share/newton_base/openoapi/limits.py index d260ab76..4404972e 100644 --- a/share/newton_base/openoapi/limits.py +++ b/share/newton_base/openoapi/limits.py @@ -49,7 +49,7 @@ class Limits(APIView): vim = VimDriverUtils.get_vim_info(vimid) sess = VimDriverUtils.get_session(vim, tenantid) - self.service['region_id'] = vim['openstack_region_id'] \ + self.service['region_name'] = vim['openstack_region_id'] \ if vim.get('openstack_region_id') \ else vim['cloud_region_id'] @@ -72,7 +72,7 @@ class Limits(APIView): # prepare request resource to vim instance req_resouce = "/v2.0/quotas/%s" % tenantid - self.service_network['region_id'] = vim['openstack_region_id'] \ + self.service_network['region_name'] = vim['openstack_region_id'] \ if vim.get('openstack_region_id') \ else vim['cloud_region_id'] @@ -86,7 +86,7 @@ class Limits(APIView): # prepare request resource to vim instance req_resouce = "/limits" - self.service_volume['region_id'] = vim['openstack_region_id'] \ + self.service_volume['region_name'] = vim['openstack_region_id'] \ if vim.get('openstack_region_id') \ else vim['cloud_region_id'] diff --git a/share/newton_base/openoapi/network.py b/share/newton_base/openoapi/network.py index 9475ee2c..2206143a 100644 --- a/share/newton_base/openoapi/network.py +++ b/share/newton_base/openoapi/network.py @@ -74,7 +74,7 @@ class Networks(APIView): vim = VimDriverUtils.get_vim_info(vimid) sess = VimDriverUtils.get_session(vim, tenantid) - self.service['region_id'] = vim['openstack_region_id'] \ + self.service['region_name'] = vim['openstack_region_id'] \ if vim.get('openstack_region_id') \ else vim['cloud_region_id'] @@ -140,7 +140,7 @@ class Networks(APIView): self.keys_mapping, True) req_body = json.JSONEncoder().encode({"network": network}) - self.service['region_id'] = vim['openstack_region_id'] \ + self.service['region_name'] = vim['openstack_region_id'] \ if vim.get('openstack_region_id') \ else vim['cloud_region_id'] @@ -187,7 +187,7 @@ class Networks(APIView): vim = VimDriverUtils.get_vim_info(vimid) sess = VimDriverUtils.get_session(vim, tenantid) - self.service['region_id'] = vim['openstack_region_id'] \ + self.service['region_name'] = vim['openstack_region_id'] \ if vim.get('openstack_region_id') \ else vim['cloud_region_id'] diff --git a/share/newton_base/openoapi/server.py b/share/newton_base/openoapi/server.py index 0dd813c4..57f76196 100644 --- a/share/newton_base/openoapi/server.py +++ b/share/newton_base/openoapi/server.py @@ -63,7 +63,7 @@ class ServerVolumeAttachThread (threading.Thread): vim = VimDriverUtils.get_vim_info(vimid) sess = VimDriverUtils.get_session(vim, tenantid) - self.service['region_id'] = vim['openstack_region_id'] \ + self.service['region_name'] = vim['openstack_region_id'] \ if vim.get('openstack_region_id') \ else vim['cloud_region_id'] @@ -113,7 +113,7 @@ class ServerVolumeAttachThread (threading.Thread): vim = VimDriverUtils.get_vim_info(vimid) sess = VimDriverUtils.get_session(vim, tenantid) - self.service['region_id'] = vim['openstack_region_id'] \ + self.service['region_name'] = vim['openstack_region_id'] \ if vim.get('openstack_region_id') \ else vim['cloud_region_id'] @@ -167,7 +167,7 @@ class Servers(APIView): vim = VimDriverUtils.get_vim_info(vimid) sess = VimDriverUtils.get_session(vim, tenantid) - self.service['region_id'] = vim['openstack_region_id'] \ + self.service['region_name'] = vim['openstack_region_id'] \ if vim.get('openstack_region_id') \ else vim['cloud_region_id'] @@ -247,7 +247,7 @@ class Servers(APIView): sess = VimDriverUtils.get_session(vim, tenantid) req_resouce = "servers/%s/os-interface" % serverid - self.service['region_id'] = vim['openstack_region_id'] \ + self.service['region_name'] = vim['openstack_region_id'] \ if vim.get('openstack_region_id') \ else vim['cloud_region_id'] @@ -276,7 +276,7 @@ class Servers(APIView): vim = VimDriverUtils.get_vim_info(vimid) sess = VimDriverUtils.get_session(vim, tenantid) - self.service['region_id'] = vim['openstack_region_id'] \ + self.service['region_name'] = vim['openstack_region_id'] \ if vim.get('openstack_region_id') \ else vim['cloud_region_id'] @@ -415,7 +415,7 @@ class Servers(APIView): vim = VimDriverUtils.get_vim_info(vimid) sess = VimDriverUtils.get_session(vim, tenantid) - self.service['region_id'] = vim['openstack_region_id'] \ + self.service['region_name'] = vim['openstack_region_id'] \ if vim.get('openstack_region_id') \ else vim['cloud_region_id'] @@ -477,7 +477,7 @@ class Servers(APIView): vim = VimDriverUtils.get_vim_info(vimid) sess = VimDriverUtils.get_session(vim, tenantid) - self.service['region_id'] = vim['openstack_region_id'] \ + self.service['region_name'] = vim['openstack_region_id'] \ if vim.get('openstack_region_id') \ else vim['cloud_region_id'] diff --git a/share/newton_base/openoapi/subnet.py b/share/newton_base/openoapi/subnet.py index 1d4f761b..a5cef9c7 100644 --- a/share/newton_base/openoapi/subnet.py +++ b/share/newton_base/openoapi/subnet.py @@ -76,7 +76,7 @@ class Subnets(APIView): vim = VimDriverUtils.get_vim_info(vimid) sess = VimDriverUtils.get_session(vim, tenantid) - self.service['region_id'] = vim['openstack_region_id'] \ + self.service['region_name'] = vim['openstack_region_id'] \ if vim.get('openstack_region_id') \ else vim['cloud_region_id'] @@ -142,7 +142,7 @@ class Subnets(APIView): self.keys_mapping, True) req_body = json.JSONEncoder().encode({"subnet": subnet}) - self.service['region_id'] = vim['openstack_region_id'] \ + self.service['region_name'] = vim['openstack_region_id'] \ if vim.get('openstack_region_id') \ else vim['cloud_region_id'] @@ -191,7 +191,7 @@ class Subnets(APIView): vim = VimDriverUtils.get_vim_info(vimid) sess = VimDriverUtils.get_session(vim, tenantid) - self.service['region_id'] = vim['openstack_region_id'] \ + self.service['region_name'] = vim['openstack_region_id'] \ if vim.get('openstack_region_id') \ else vim['cloud_region_id'] diff --git a/share/newton_base/openoapi/tenants.py b/share/newton_base/openoapi/tenants.py index a8b97464..71439411 100644 --- a/share/newton_base/openoapi/tenants.py +++ b/share/newton_base/openoapi/tenants.py @@ -53,7 +53,7 @@ class Tenants(APIView): sess = VimDriverUtils.get_session(vim) - self.service['region_id'] = vim['openstack_region_id'] \ + self.service['region_name'] = vim['openstack_region_id'] \ if vim.get('openstack_region_id') \ else vim['cloud_region_id'] diff --git a/share/newton_base/openoapi/volume.py b/share/newton_base/openoapi/volume.py index 100d2392..70b786b1 100644 --- a/share/newton_base/openoapi/volume.py +++ b/share/newton_base/openoapi/volume.py @@ -77,7 +77,7 @@ class Volumes(APIView): vim = VimDriverUtils.get_vim_info(vimid) sess = VimDriverUtils.get_session(vim, tenantid) - self.service['region_id'] = vim['openstack_region_id'] \ + self.service['region_name'] = vim['openstack_region_id'] \ if vim.get('openstack_region_id') \ else vim['cloud_region_id'] @@ -143,7 +143,7 @@ class Volumes(APIView): self.keys_mapping, True) req_body = json.JSONEncoder().encode({"volume": volume}) - self.service['region_id'] = vim['openstack_region_id'] \ + self.service['region_name'] = vim['openstack_region_id'] \ if vim.get('openstack_region_id') \ else vim['cloud_region_id'] @@ -190,7 +190,7 @@ class Volumes(APIView): vim = VimDriverUtils.get_vim_info(vimid) sess = VimDriverUtils.get_session(vim, tenantid) - self.service['region_id'] = vim['openstack_region_id'] \ + self.service['region_name'] = vim['openstack_region_id'] \ if vim.get('openstack_region_id') \ else vim['cloud_region_id'] diff --git a/share/newton_base/openoapi/vport.py b/share/newton_base/openoapi/vport.py index 195b820b..5a799262 100644 --- a/share/newton_base/openoapi/vport.py +++ b/share/newton_base/openoapi/vport.py @@ -78,7 +78,7 @@ class Vports(APIView): vim = VimDriverUtils.get_vim_info(vimid) sess = VimDriverUtils.get_session(vim, tenantid) - self.service['region_id'] = vim['openstack_region_id'] \ + self.service['region_name'] = vim['openstack_region_id'] \ if vim.get('openstack_region_id') \ else vim['cloud_region_id'] @@ -219,7 +219,7 @@ class Vports(APIView): vim = VimDriverUtils.get_vim_info(vimid) sess = VimDriverUtils.get_session(vim, tenantid) - self.service['region_id'] = vim['openstack_region_id'] \ + self.service['region_name'] = vim['openstack_region_id'] \ if vim.get('openstack_region_id') \ else vim['cloud_region_id'] |