diff options
author | YuanHong Deng <dengyuanhong@chinamobile.com> | 2020-05-14 10:44:07 +0800 |
---|---|---|
committer | Yuanhong Deng <dengyuanhong@chinamobile.com> | 2020-05-18 07:21:02 +0000 |
commit | e85c495cfb902c4dad94f87265699c3c027e4fed (patch) | |
tree | 0d69b8fab9ffc37ed843910203d4c7cd953b90b6 | |
parent | b4722c4b672a1415b37a3a7a00811d637819c48c (diff) |
Update the nslcm code to update the resourceName
Change-Id: Ib93fdb8c1097793c8bc3f8b4c8461de5bac09c28
Issue-ID: VFC-1657
Signed-off-by: YuanHong Deng <dengyuanhong@chinamobile.com>
-rw-r--r-- | lcm/ns_vnfs/biz/handle_notification.py | 2 | ||||
-rw-r--r-- | lcm/ns_vnfs/tests/tests.py | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/lcm/ns_vnfs/biz/handle_notification.py b/lcm/ns_vnfs/biz/handle_notification.py index edcebbb2..647878c9 100644 --- a/lcm/ns_vnfs/biz/handle_notification.py +++ b/lcm/ns_vnfs/biz/handle_notification.py @@ -132,7 +132,7 @@ class HandleVnfLcmOocNotification(object): if portResource: vimId = ignore_case_get(portResource, 'vimConnectionId') resourceId = ignore_case_get(portResource, 'resourceId') - resourceName = ignore_case_get(portResource, 'resourceId') # replaced with resouceId temporarily + resourceName = ignore_case_get(portResource, 'resourceProviderId') tenant = ignore_case_get(portResource, 'tenant') ipAddress = ignore_case_get(portResource, 'ipAddress') macAddress = ignore_case_get(portResource, 'macAddress') diff --git a/lcm/ns_vnfs/tests/tests.py b/lcm/ns_vnfs/tests/tests.py index c3d3008e..5614c57e 100644 --- a/lcm/ns_vnfs/tests/tests.py +++ b/lcm/ns_vnfs/tests/tests.py @@ -2271,6 +2271,7 @@ class TestVnfNotifyView(TestCase): "resourceHandle": { "vimConnectionId": "vim_connection_id", "resourceId": "resource_id", + "resourceProviderId": "resourceProviderId", "tenant": "tenant", "ipAddress": "ipAddress", "macAddress": "macAddress", @@ -2314,7 +2315,7 @@ class TestVnfNotifyView(TestCase): relatednetworkid="resource_id", vltype=0) self.assertIsInstance(vl_inst, VLInstModel) port_inst = PortInstModel.objects.get(networkid='networkId', subnetworkid='subnetId', vimid="vim_connection_id", - resourceid="resource_id", name="resource_id", instid="instId", + resourceid="resource_id", name="resourceProviderId", instid="instId", cpinstanceid="cp_instance_id", bandwidth='unknown', operationalstate='active', ipaddress="ipAddress", macaddress='macAddress', floatipaddress='unknown', serviceipaddress='unknown', @@ -2413,6 +2414,7 @@ class TestVnfNotifyView(TestCase): "resourceHandle": { "vimConnectionId": "vim_connection_id", "resourceId": "resource_id", + "resourceProviderId": "resourceProviderId", "tenant": "tenant", "ipAddress": "ipAddress", "macAddress": "macAddress", @@ -2432,7 +2434,7 @@ class TestVnfNotifyView(TestCase): relatednetworkid="resource_id", vltype=0) self.assertIsInstance(vl_inst, VLInstModel) port_inst = PortInstModel.objects.get(networkid='networkId', subnetworkid='subnetId', vimid="vim_connection_id", - resourceid="resource_id", name="resource_id", instid="instId", + resourceid="resource_id", name="resourceProviderId", instid="instId", cpinstanceid="cp_instance_id", bandwidth='unknown', operationalstate='active', ipaddress="ipAddress", macaddress='macAddress', floatipaddress='unknown', serviceipaddress='unknown', |