aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfujinhua <fu.jinhua@zte.com.cn>2018-12-05 13:56:30 +0800
committerfujinhua <fu.jinhua@zte.com.cn>2018-12-05 13:56:30 +0800
commit46f5355dc0d3401ab76ee2d8def56b6cd2651689 (patch)
treef66eaa86c64b1784e5d690d3c53aec346a86dfda
parent9cd20c3a0d033a07b8526d17e7b4439bda83bd3c (diff)
Fix vnfm_type get logic when upgrade tosca-parser
Change-Id: I0573e6e6468f361db429d54d85212236e2679d8c Issue-ID: VFC-1197 Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
-rw-r--r--lcm/ns/biz/ns_instant.py8
1 files 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)