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 <hiromu.asahina.az@hco.ntt.co.jp>
Change-Id: If78ffe41dbe3e04cde5678a07df9f55382eb5481
This commit is contained in:
Hiromu Asahina 2021-11-12 22:03:15 +09:00
parent f0ebb6d620
commit 1d18379c94
2 changed files with 2 additions and 2 deletions

View File

@ -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,

View File

@ -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,