aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfujinhua <fu.jinhua@zte.com.cn>2017-12-04 15:27:51 +0800
committerfujinhua <fu.jinhua@zte.com.cn>2017-12-04 15:27:51 +0800
commit87750a79b0f803dad5c46609b1c99d3a42ccf877 (patch)
tree7b451f587bc70f2cc249543529af6be47ce8f94a
parent677cd84bc57996ff551d2a960c6a9f6d433908d8 (diff)
Refactor ns terminate of vfc-nfvo-lcm
Change-Id: I280472488030e272417757a49f552cad80a4d0ad Issue-ID: VFC-608 Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
-rw-r--r--lcm/ns/vnfs/terminate_nfs.py6
1 files 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")