From 69b84016dac990332112996b3bb5b8ec2879685e Mon Sep 17 00:00:00 2001 From: "ying.yunlong" Date: Fri, 15 Dec 2017 09:53:33 +0800 Subject: Fix vfc-ztevnfmdirver affectedvl data Change-Id: I3a9bdf9b3e1110f2228df6d05895364841c3a90b Issue-ID: VFC-620 Signed-off-by: ying.yunlong --- zte/vmanager/driver/interfaces/views.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'zte/vmanager') diff --git a/zte/vmanager/driver/interfaces/views.py b/zte/vmanager/driver/interfaces/views.py index 27983334..27b57c7a 100644 --- a/zte/vmanager/driver/interfaces/views.py +++ b/zte/vmanager/driver/interfaces/views.py @@ -353,18 +353,22 @@ def notify(request, *args, **kwargs): "vnfcInstanceId": ignorcase_get(affectedvnfc, "vnfcInstanceId"), "vduId": ignorcase_get(affectedvnfc, "vduId"), "changeType": ignorcase_get(affectedvnfc, "changeType"), - "vimid": ignorcase_get(ignorcase_get(affectedvnfc, "computeResource"), "vimId"), + "vimId": ignorcase_get(ignorcase_get(affectedvnfc, "computeResource"), "vimId"), "vmId": ignorcase_get(ignorcase_get(affectedvnfc, "computeResource"), "resourceId"), "vmName": ignorcase_get(ignorcase_get(affectedvnfc, "computeResource"), "resourceName") }) for affectedvl in affectedvls: data["affectedVl"].append({ - "vlInstanceId": ignorcase_get(affectedvl, "virtuallinkinstanceid"), - "vimid": ignorcase_get(ignorcase_get(affectedvl, "networkresource"), "vimid"), - "vldid": ignorcase_get(affectedvl, "virtuallinkdescid"), - "vllid": ignorcase_get(ignorcase_get(affectedvl, "networkresource"), "resourceid"), - "vlName": ignorcase_get(ignorcase_get(affectedvl, "networkresource"), "resourcename") + "vlInstanceId": ignorcase_get(affectedvl, "virtualLinkInstanceId"), + "changeType": ignorcase_get(affectedvl, "changeType"), + "vimId": ignorcase_get(ignorcase_get(affectedvl, "networkResource"), "vimId"), + "vldId": ignorcase_get(affectedvl, "virtuallinkdescid"), + "networkResource": { + "resourceType": "network", + "resourceId": ignorcase_get(ignorcase_get(affectedvl, "networkresource"), "resourceid"), + "resourceName": ignorcase_get(ignorcase_get(affectedvl, "networkresource"), "resourcename") + } }) for affectedcp in affectedcps: -- cgit 1.2.3-korg