Fix bugs for nslcm 29/87429/1
authorfujinhua <fu.jinhua@zte.com.cn>
Fri, 10 May 2019 09:04:17 +0000 (17:04 +0800)
committerfujinhua <fu.jinhua@zte.com.cn>
Fri, 10 May 2019 09:04:17 +0000 (17:04 +0800)
Change-Id: I05d080d32a36eba308be33d99383f3ca2c6c2fed
Issue-ID: VFC-1306
Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
lcm/ns_vnfs/biz/create_vnfs.py

index a968d64..4f270b5 100644 (file)
@@ -352,7 +352,7 @@ class CreateVnfs(Thread):
                 cloud_region_id="none",
                 vdu_info="none"
             )
-            raise Exception("Received a Bad Sync from OOF with response code %s" % resp_status)
+            logger.error("Received a Bad Sync from OOF with response code %s" % resp_status)
         logger.info("Completed Homing request to OOF")
 
     def send_get_vnfm_request_to_extsys(self):
@@ -395,7 +395,10 @@ class CreateVnfs(Thread):
             'vnfInstanceId': self.vnfm_nf_inst_id,
             'vnfmId': self.vnfm_inst_id
         }
-        SubscriptionCreation(data).do_biz()
+        try:
+            SubscriptionCreation(data).do_biz()
+        except Exception as e:
+            logger.error("subscribe failed: %s", e.message)
 
     def write_vnf_creation_info(self):
         logger.debug("write_vnf_creation_info start")