summaryrefslogtreecommitdiffstats
path: root/lcm/lcm/nf/biz/heal_vnf.py
diff options
context:
space:
mode:
Diffstat (limited to 'lcm/lcm/nf/biz/heal_vnf.py')
-rw-r--r--lcm/lcm/nf/biz/heal_vnf.py13
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()),