From 1d18379c944fceb56c6367b50c1734e037eee486 Mon Sep 17 00:00:00 2001 From: Hiromu Asahina Date: Fri, 12 Nov 2021 22:03:15 +0900 Subject: [PATCH] Fix rendering failure in the VNF Manager tab After creating VNF Instance using vnflcm v1 API, tacker-horizon VNF Manager tab becomes not being able to redner the view correctly. This happens because VNF Manager tab tries to obtain `vim_name` and fails. The `vim_name` attribute is no longer available in vnflcm v1 API. This patch fix this problem by simply using `get` method to obtain `vim_name`. Closes-bug: #1950783 Signed-off-by: Hiromu Asahina Change-Id: If78ffe41dbe3e04cde5678a07df9f55382eb5481 --- .../openstack_dashboard/dashboards/nfv/vnfmanager/tables.py | 2 +- .../openstack_dashboard/dashboards/nfv/vnfmanager/tabs.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfmanager/tables.py b/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfmanager/tables.py index fdfc825..eb693b6 100644 --- a/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfmanager/tables.py +++ b/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfmanager/tables.py @@ -119,7 +119,7 @@ class VNFUpdateRow(tables.Row): except KeyError: vnf_desc_str = "" - vim = vnf['placement_attr']['vim_name'] + vim = vnf['placement_attr'].get('vim_name', '') if not item: # Add an item entry item = VNFManagerItem(vnf['name'], vnf_desc_str, diff --git a/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfmanager/tabs.py b/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfmanager/tabs.py index 3cacd74..644e724 100644 --- a/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfmanager/tabs.py +++ b/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfmanager/tabs.py @@ -53,7 +53,7 @@ class VNFManagerTab(tabs.TableTab): except KeyError: vnf_desc_str = "" - vim = vnf['placement_attr']['vim_name'] + vim = vnf['placement_attr'].get('vim_name', '') obj = tables.VNFManagerItem( vnf['name'], vnf_desc_str,