From 87750a79b0f803dad5c46609b1c99d3a42ccf877 Mon Sep 17 00:00:00 2001 From: fujinhua Date: Mon, 4 Dec 2017 15:27:51 +0800 Subject: Refactor ns terminate of vfc-nfvo-lcm Change-Id: I280472488030e272417757a49f552cad80a4d0ad Issue-ID: VFC-608 Signed-off-by: fujinhua --- lcm/ns/vnfs/terminate_nfs.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lcm/ns/vnfs/terminate_nfs.py b/lcm/ns/vnfs/terminate_nfs.py index 89d6de20..3afb5c67 100644 --- a/lcm/ns/vnfs/terminate_nfs.py +++ b/lcm/ns/vnfs/terminate_nfs.py @@ -70,10 +70,10 @@ class TerminateVnfs(threading.Thread): vnf_inst_info.status = VNF_STATUS.TERMINATING vnf_inst_info.save() - def check_vnf_is_exist(self): + def get_vnf_inst(self): vnf_inst = NfInstModel.objects.filter(nfinstid=self.vnf_inst_id) if not vnf_inst.exists(): - logger.warning('[VNF terminate] Vnf terminate [%s] is not exist.' % self.vnf_inst_id) + logger.warning('[VNF terminate] Vnf terminate [%s] does not exist.' % self.vnf_inst_id) return None return vnf_inst[0] @@ -81,7 +81,7 @@ class TerminateVnfs(threading.Thread): JobUtil.add_job_status(self.job_id, progress, status_decs, error_code) def initdata(self): - vnf_inst_info = self.check_vnf_is_exist() + vnf_inst_info = self.get_vnf_inst() if not vnf_inst_info: self.add_progress(100, "TERM_VNF_NOT_EXIST_SUCCESS", "finished") self.add_progress(2, "GET_VNF_INST_SUCCESS") -- cgit 1.2.3-korg