diff options
author | 2017-12-04 15:06:45 +0800 | |
---|---|---|
committer | 2017-12-04 15:06:45 +0800 | |
commit | 92518a9b3013ad2ca1238fd9e164a58129d8491e (patch) | |
tree | 45c6b2ab213528c2cea29dbdad3b62e0f5708788 | |
parent | 6260d644ff043f8f132fa5a9165b34a8d781d5df (diff) |
Refactor ns terminate of vfc-nfvo-lcm
Change-Id: Ib24beb461de711d37e4a9531e4396703d802f216
Issue-ID: VFC-608
Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
-rw-r--r-- | lcm/ns/vnfs/terminate_nfs.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lcm/ns/vnfs/terminate_nfs.py b/lcm/ns/vnfs/terminate_nfs.py index 2574dcb4..02dcc027 100644 --- a/lcm/ns/vnfs/terminate_nfs.py +++ b/lcm/ns/vnfs/terminate_nfs.py @@ -56,10 +56,10 @@ class TerminateVnfs(threading.Thread): self.delete_vnf_in_aai() self.delete_data_from_db() except NSLCMException as e: - self.exception(e.message) + self.set_job_err(e.message) except Exception: logger.error(traceback.format_exc()) - self.exception('unexpected exception') + self.set_job_err('unexpected exception') def set_vnf_status(self, vnf_inst_info): vnf_status = vnf_inst_info.status @@ -100,7 +100,7 @@ class TerminateVnfs(threading.Thread): raise NSLCMException('[VNF terminate] Vnf instance is not exist.') self.set_vnf_status(vnf_inst[0]) - def exception(self, error_msg): + def set_job_err(self, error_msg): logger.error('VNF Terminate failed, detail message: %s' % error_msg) NfInstModel.objects.filter(nfinstid=self.vnf_inst_id).update(status=VNF_STATUS.FAILED) JobUtil.add_job_status(self.job_id, 255, 'VNF Terminate failed, detail message: %s' % error_msg, 0) |