diff options
author | fujinhua <fu.jinhua@zte.com.cn> | 2018-11-24 11:14:11 +0800 |
---|---|---|
committer | fujinhua <fu.jinhua@zte.com.cn> | 2018-11-24 11:14:11 +0800 |
commit | efbe5c7963cb93e034189bb5ade804dd104e68f6 (patch) | |
tree | 2f4b13ddf05d7b1bf23179a2353822a9a9466588 | |
parent | ab5909cac2ecda59ca6177850505ab1464334705 (diff) |
Fix vnf heal resp parse
Change-Id: I294678cbd27dbbaad79c3a0f0a68ba7d3bacfcfc
Issue-ID: VFC-1163
Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
-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): |