improve code coverage rate after vfclcm upgraded from python2 to python3
[vfc/gvnfm/vnflcm.git] / lcm / lcm / nf / biz / instantiate_vnf.py
index 57711f7..58ca591 100644 (file)
@@ -59,10 +59,10 @@ class InstantiateVnf(Thread):
             operation=OPERATION_TYPE.INSTANTIATE,
             task=OPERATION_TASK.INSTANTIATE
         )
-        self.pre_deal()
 
     def run(self):
         try:
+            self.pre_deal()
             self.inst_pre()
             self.lcm_op_occ.notify_lcm(OPERATION_STATE_TYPE.STARTING)
             self.apply_grant()
@@ -84,6 +84,8 @@ class InstantiateVnf(Thread):
             )
         except NFLCMException as e:
             self.vnf_inst_failed_handle(e.args[0])
+        except NFLCMExceptionConflict as e:
+            self.vnf_inst_failed_handle(e.args[0])
         except Exception as e:
             logger.error(str(e))
             logger.error(traceback.format_exc())