summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYan Yang <yangyanyj@chinamobile.com>2018-11-22 08:11:09 +0000
committerGerrit Code Review <gerrit@onap.org>2018-11-22 08:11:09 +0000
commit34a773827e5a6ba01d115093f00da05fecb6e573 (patch)
tree34f3a6f187354491a4fe2206373ab3c63b46b853
parent0bd22b1852ed5b9f655f08466dee267b8e08bb75 (diff)
parentd8398af2096d455789e977ee3783b6798a46bc8a (diff)
Merge "Fix vnf heal logic" into casablanca
-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()),