diff options
-rw-r--r-- | lcm/ns_vnfs/biz/heal_vnfs.py | 2 | ||||
-rw-r--r-- | lcm/pub/msapi/vnfmdriver.py | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/lcm/ns_vnfs/biz/heal_vnfs.py b/lcm/ns_vnfs/biz/heal_vnfs.py index 60d06214..ec0c9ddf 100644 --- a/lcm/ns_vnfs/biz/heal_vnfs.py +++ b/lcm/ns_vnfs/biz/heal_vnfs.py @@ -118,6 +118,8 @@ class NFHealService(threading.Thread): req_param = json.JSONEncoder().encode(self.nf_heal_params) rsp = send_nf_heal_request(self.vnfm_inst_id, self.m_nf_inst_id, req_param) vnfm_job_id = ignore_case_get(rsp, 'jobId') + if not vnfm_job_id: + return ret = wait_job_finish(self.vnfm_inst_id, self.job_id, vnfm_job_id, progress_range=None, timeout=1200, mode='1') if ret != JOB_MODEL_STATUS.FINISHED: diff --git a/lcm/pub/msapi/vnfmdriver.py b/lcm/pub/msapi/vnfmdriver.py index 7ed1b771..26d41392 100644 --- a/lcm/pub/msapi/vnfmdriver.py +++ b/lcm/pub/msapi/vnfmdriver.py @@ -77,7 +77,7 @@ def send_nf_heal_request(vnfm_inst_id, vnf_inst_id, req_param): if ret[0] > 0: logger.error("Failed to send nf heal req:%s,%s", ret[2], ret[1]) raise NSLCMException('Failed to send nf heal request to VNFM(%s)' % vnfm_inst_id) - return json.JSONDecoder().decode(ret[1]) + return json.JSONDecoder().decode(ret[1]) if ret[1] else {} def send_nf_operate_request(vnfm_inst_id, vnf_inst_id, req_param): |