X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=lcm%2Flcm%2Fnf%2Fbiz%2Fterminate_vnf.py;h=5081422f91bb136a925fd8b807d0d04d5df71aa1;hb=158a6e301d83cc24511cb7c55d8d87d45b734c03;hp=3327660e7b67b93d34fbfc66e90c43641e12656e;hpb=bd2d965471ca2a5a05c9b61fc4379e63c2a43547;p=vfc%2Fgvnfm%2Fvnflcm.git diff --git a/lcm/lcm/nf/biz/terminate_vnf.py b/lcm/lcm/nf/biz/terminate_vnf.py index 3327660e..5081422f 100644 --- a/lcm/lcm/nf/biz/terminate_vnf.py +++ b/lcm/lcm/nf/biz/terminate_vnf.py @@ -40,11 +40,15 @@ class TerminateVnf(Thread): self.terminationType = ignore_case_get(self.data, "terminationType") self.gracefulTerminationTimeout = ignore_case_get(self.data, "gracefulTerminationTimeout") self.inst_resource = {'volumn': [], 'network': [], 'subnet': [], 'port': [], 'flavor': [], 'vm': []} + self.grant_type = "Terminate" def run(self): try: if self.term_pre(): - grant_resource(nf_inst_id=self.nf_inst_id, job_id=self.job_id) + vdus = VmInstModel.objects.filter(instid=self.nf_inst_id, is_predefined=1) + apply_result = grant_resource(data=self.data, nf_inst_id=self.nf_inst_id, job_id=self.job_id, + grant_type=self.grant_type, vdus=vdus) + logger.info("Grant resource end, response: %s" % apply_result) JobUtil.add_job_status(self.job_id, 20, 'Nf terminating grant_resource finish') self.query_inst_resource() self.query_notify_data()