Avoid inst pnf exception in inst ns 32/91132/1
authorhewei-cmss <hewei@cmss.chinamobile.com>
Wed, 10 Jul 2019 07:40:29 +0000 (15:40 +0800)
committerhewei-cmss <hewei@cmss.chinamobile.com>
Wed, 10 Jul 2019 07:40:29 +0000 (15:40 +0800)
Issue-ID: VFC-1443

Signed-off-by: hewei-cmss <hewei@cmss.chinamobile.com>
Change-Id: I5a826f5364958587494c9163527840d825ebfef3

lcm/ns/biz/ns_instant.py

index ada85e8..2306081 100644 (file)
@@ -284,8 +284,8 @@ class InstantNSService(object):
         return {'vlCount': str(vls), 'sfcCount': str(sfcs), 'vnfCount': str(vnfs), 'pnfCount': str(pnfs)}
 
     def init_pnf_para(self, plan_dict):
-        pnfs_in_input = ignore_case_get(self.req_data, "addpnfData")
-        pnfs_in_nsd = ignore_case_get(plan_dict, "pnfs")
+        pnfs_in_input = ignore_case_get(self.req_data, "addpnfData", [])
+        pnfs_in_nsd = ignore_case_get(plan_dict, "pnfs", [])
         logger.debug("addpnfData ; %s" % pnfs_in_input)
         logger.debug("pnfs_in_nsd ; %s" % pnfs_in_nsd)
         pnfs = {}