X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=lcm%2Flcm%2Fnf%2Fbiz%2Fscale_vnf.py;h=ad828dd026abc27dda7e6abdae15e706eaf06f15;hb=c71175866d16bedda627b47acde2d46f33559127;hp=9f59193141b45405f38c03afc935eb352821af54;hpb=18d3348e28cad6e09d8822fd1bf8ca6b83f7dfcc;p=vfc%2Fgvnfm%2Fvnflcm.git diff --git a/lcm/lcm/nf/biz/scale_vnf.py b/lcm/lcm/nf/biz/scale_vnf.py index 9f591931..ad828dd0 100644 --- a/lcm/lcm/nf/biz/scale_vnf.py +++ b/lcm/lcm/nf/biz/scale_vnf.py @@ -19,7 +19,7 @@ from threading import Thread from lcm.nf.biz import common from lcm.nf.biz.grant_vnf import grant_resource -from lcm.nf.const import VNF_STATUS, GRANT_TYPE, CHANGE_TYPE +from lcm.nf.const import GRANT_TYPE, CHANGE_TYPE from lcm.nf.const import RESOURCE_MAP, OPERATION_STATE_TYPE from lcm.nf.const import INSTANTIATION_STATE from lcm.nf.const import OPERATION_TYPE @@ -53,6 +53,7 @@ class ScaleVnf(Thread): operation=OPERATION_TYPE.SCALE, task=OPERATION_TASK.SCALE ) + self.op_type = OPERATION_TYPE.SCALE def run(self): try: @@ -155,7 +156,7 @@ class ScaleVnf(Thread): def send_notification(self): data = prepare_notification(nfinstid=self.nf_inst_id, jobid=self.job_id, - operation=OPERATION_TYPE.SCALE, + operation=self.op_type, operation_state=OPERATION_STATE_TYPE.COMPLETED) # TODO: need set changedExtConnectivity for data @@ -288,7 +289,7 @@ class ScaleVnf(Thread): def vnf_scale_failed_handle(self, error_msg): logger.error('VNF scaling failed, detail message: %s', error_msg) - self.vnf_insts.update(status=VNF_STATUS.FAILED, - lastuptime=now_time()) + self.vnf_insts.update( # status=VNF_STATUS.FAILED, + lastuptime=now_time()) self.lcm_op_occ.notify_lcm(OPERATION_STATE_TYPE.FAILED, error_msg) JobUtil.add_job_status(self.job_id, 255, error_msg)