diff options
author | fujinhua <fu.jinhua@zte.com.cn> | 2018-11-22 15:42:46 +0800 |
---|---|---|
committer | Fu Jinhua <fu.jinhua@zte.com.cn> | 2018-11-22 07:56:04 +0000 |
commit | d8398af2096d455789e977ee3783b6798a46bc8a (patch) | |
tree | 28bfe8fba72aa3f717f7d99f1062a3fe034cafbf | |
parent | 789dcca35f52c271f768378b6a3dfb64569c3877 (diff) |
Fix vnf heal logic
Change-Id: I45c581a8423695f3287edd664250c1992df3d01b
Issue-ID: VFC-1163
Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
(cherry picked from commit 8e603024f9d1a6292b9cafffb336966b75eeff35)
-rw-r--r-- | lcm/lcm/nf/biz/heal_vnf.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lcm/lcm/nf/biz/heal_vnf.py b/lcm/lcm/nf/biz/heal_vnf.py index 4d32d509..5e013042 100644 --- a/lcm/lcm/nf/biz/heal_vnf.py +++ b/lcm/lcm/nf/biz/heal_vnf.py @@ -143,12 +143,13 @@ class HealVnf(Thread): 'resourceId': vm[0].resourceid, 'vimLevelResourceType': 'vm' } - affected_vnfcs.append({ - 'id': vnfcs[0].vnfcinstanceid, - 'vduId': vnfcs[0].vduid, - 'changeType': chtype, - 'computeResource': vm_resource - }) + if vnfcs: + affected_vnfcs.append({ + 'id': vnfcs[0].vnfcinstanceid, + 'vduId': vnfcs[0].vduid, + 'changeType': chtype, + 'computeResource': vm_resource + }) notification_content = { "id": str(uuid.uuid4()), |