diff options
author | fujinhua <fu.jinhua@zte.com.cn> | 2018-11-29 08:59:06 +0800 |
---|---|---|
committer | Fu Jinhua <fu.jinhua@zte.com.cn> | 2018-11-29 04:17:47 +0000 |
commit | 729152f300acdec04fccb45974fdcd4a36aca4d6 (patch) | |
tree | 1c0e88bbf21519031f879ea8839001fcdd469a72 | |
parent | ac35f36a524ab4f60351e122297a3869f70b4e64 (diff) |
Fix vnf notify logic
Change-Id: I25cf6815d2e21a249774ab5ff693cd61d1b53f31
Issue-ID: VFC-1163
Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
(cherry picked from commit 0c6d0e485588ec6e557942a34b810ae65eda4d29)
-rw-r--r-- | lcm/lcm/pub/msapi/gvnfmdriver.py | 10 |
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({ |