summaryrefslogtreecommitdiffstats
path: root/lcm
diff options
context:
space:
mode:
authorfujinhua <fu.jinhua@zte.com.cn>2018-11-29 08:59:06 +0800
committerfujinhua <fu.jinhua@zte.com.cn>2018-11-29 11:32:27 +0800
commit0c6d0e485588ec6e557942a34b810ae65eda4d29 (patch)
tree1c0e88bbf21519031f879ea8839001fcdd469a72 /lcm
parent16b6b58439b3815b086c1132f73af7e4e4cd06cf (diff)
Fix vnf notify logic
Change-Id: I25cf6815d2e21a249774ab5ff693cd61d1b53f31 Issue-ID: VFC-1163 Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
Diffstat (limited to 'lcm')
-rw-r--r--lcm/lcm/pub/msapi/gvnfmdriver.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/lcm/lcm/pub/msapi/gvnfmdriver.py b/lcm/lcm/pub/msapi/gvnfmdriver.py
index c2519ea0..41e04f87 100644
--- a/lcm/lcm/pub/msapi/gvnfmdriver.py
+++ b/lcm/lcm/pub/msapi/gvnfmdriver.py
@@ -101,15 +101,15 @@ def prepare_notification_data(nfinstid, jobid, changetype, operation):
'resourceProviderId': port.name, # TODO: is resourceName mapped to resourceProviderId?
'vimLevelResourceType': 'port'
},
- 'cpInstanceId': port.cpinstanceid # TODO: port.cpinstanceid is not initiated when create port resource.
+ 'cpInstanceId': port.portid # TODO: port.cpinstanceid is not initiated when create port resource.
})
for network_id, ext_link_ports in ext_connectivity_map.items():
networks = NetworkInstModel.objects.filter(networkid=network_id)
- network = networks[0]
+ net_name = networks[0].name if networks else network_id
network_resource = {
- 'vimConnectionId': network.vimid,
- 'resourceId': network.resourceid,
- 'resourceProviderId': network.name, # TODO: is resourceName mapped to resourceProviderId?
+ 'vimConnectionId': ext_link_ports[0]['resourceHandle']['vimConnectionId'],
+ 'resourceId': network_id,
+ 'resourceProviderId': net_name, # TODO: is resourceName mapped to resourceProviderId?
'vimLevelResourceType': 'network'
}
ext_connectivity.append({