From 46f5355dc0d3401ab76ee2d8def56b6cd2651689 Mon Sep 17 00:00:00 2001 From: fujinhua Date: Wed, 5 Dec 2018 13:56:30 +0800 Subject: [PATCH] Fix vnfm_type get logic when upgrade tosca-parser Change-Id: I0573e6e6468f361db429d54d85212236e2679d8c Issue-ID: VFC-1197 Signed-off-by: fujinhua --- lcm/ns/biz/ns_instant.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lcm/ns/biz/ns_instant.py b/lcm/ns/biz/ns_instant.py index 419c4d58..2670e250 100644 --- a/lcm/ns/biz/ns_instant.py +++ b/lcm/ns/biz/ns_instant.py @@ -86,11 +86,9 @@ class InstantNSService(object): vnfd_id = vnf['properties']['id'] vnfm_type_temp = vnf['properties'].get("vnfm_info", "undefined") logger.debug("vnfd_id: %s, vnfm_type : %s", vnfd_id, vnfm_type_temp) - if vnfm_type_temp != "undefined": - if isinstance(vnfm_type_temp, list): - vnfm_type = vnfm_type_temp[0] - if isinstance(vnfm_type_temp, str): - vnfm_type = vnfm_type_temp + vnfm_type = vnfm_type_temp + if isinstance(vnfm_type_temp, list): + vnfm_type = vnfm_type_temp[0] vimid = self.get_vnf_vim_id(vim_id, location_constraints, vnfd_id) vnfm_info = extsys.select_vnfm(vnfm_type=vnfm_type, vim_id=vimid) -- 2.16.6