From 533b60741b7f2a85dd555348a055760eb42463b0 Mon Sep 17 00:00:00 2001 From: Wataru Juso Date: Fri, 7 May 2021 10:22:52 +0900 Subject: [PATCH] Modify Network Resource Information used by FT I have confirmed that the FT results are incorrect. This is not a problem with the code, but with the test parameters. This patch will improve the test code so that the correct results are displayed. * This patch is not a bug fixed but an improvement. - Fixed the mismatch between VNFD and HOT resource information. - Fixed the parameter of the external network resource information in Instantiation. Change-Id: I41462d981caabcd742573748216149e265e8c5c4 --- .../BaseHOT/simple/helloworld3.yaml | 30 +++++++++++-------- .../functional/sol/vnflcm/fake_vnflcm.py | 3 ++ 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/tacker/tests/etc/samples/etsi/nfv/functional5/BaseHOT/simple/helloworld3.yaml b/tacker/tests/etc/samples/etsi/nfv/functional5/BaseHOT/simple/helloworld3.yaml index f8d1788a9..989619a81 100644 --- a/tacker/tests/etc/samples/etsi/nfv/functional5/BaseHOT/simple/helloworld3.yaml +++ b/tacker/tests/etc/samples/etsi/nfv/functional5/BaseHOT/simple/helloworld3.yaml @@ -20,9 +20,9 @@ resources: zone: { get_param: [ nfv, vdu, VDU1, zone ] } net1: { get_param: [ nfv, CP, VDU1_CP1, network ] } net2: { get_param: [ nfv, CP, VDU1_CP2, network ] } - net3: { get_resource: extmanageNW_1 } - net4: { get_resource: extmanageNW_2 } - net5: { get_resource: internalNW_1 } + net3: { get_resource: internalVL1 } + net4: { get_resource: internalVL2 } + net5: { get_resource: internalVL3 } subnet: { get_param: [nfv, CP, VDU1_CP2, fixed_ips, 0, subnet]} VDU1_scale_scale_out: type: OS::Heat::ScalingPolicy @@ -52,9 +52,9 @@ resources: zone: { get_param: [ nfv, vdu, VDU2, zone ] } net1: { get_param: [ nfv, CP, VDU2_CP1, network ] } net2: { get_param: [ nfv, CP, VDU2_CP2, network ] } - net3: { get_resource: extmanageNW_1 } - net4: { get_resource: extmanageNW_2 } - net5: { get_resource: internalNW_1 } + net3: { get_resource: internalVL1 } + net4: { get_resource: internalVL2 } + net5: { get_resource: internalVL3 } ip1: { get_param: [nfv, CP, VDU2_CP2, fixed_ips, 0, ip_address]} subnet: { get_param: [nfv, CP, VDU2_CP2, fixed_ips, 0, subnet]} VDU2_scale_scale_out: @@ -75,27 +75,31 @@ resources: type: OS::Neutron::Net extmanageNW_2: type: OS::Neutron::Net - internalNW_1: + internalVL1: type: OS::Neutron::Net - extmanageNW_1_subnet: + internalVL2: + type: OS::Neutron::Net + internalVL3: + type: OS::Neutron::Net + internalVL1_subnet: type: OS::Neutron::Subnet properties: ip_version: 4 network: - get_resource: extmanageNW_1 + get_resource: internalVL1 cidr: 192.168.3.0/24 - extmanageNW_2_subnet: + internalVL2_subnet: type: OS::Neutron::Subnet properties: ip_version: 4 network: - get_resource: extmanageNW_2 + get_resource: internalVL2 cidr: 192.168.4.0/24 - internalNW_1_subnet: + internalVL3_subnet: type: OS::Neutron::Subnet properties: ip_version: 4 network: - get_resource: internalNW_1 + get_resource: internalVL3 cidr: 192.168.5.0/24 outputs: {} diff --git a/tacker/tests/functional/sol/vnflcm/fake_vnflcm.py b/tacker/tests/functional/sol/vnflcm/fake_vnflcm.py index 6fa57314b..b9b14a273 100644 --- a/tacker/tests/functional/sol/vnflcm/fake_vnflcm.py +++ b/tacker/tests/functional/sol/vnflcm/fake_vnflcm.py @@ -106,6 +106,7 @@ def _set_ext_virtual_link_cp1(networks_id, external_ports_id): ext_virtual_link_cp1 = { "id": uuidsentinel.evl1_id, "resourceId": networks_id[0], + "vimConnectionId": uuidsentinel.vim_connection_id, "extCps": [ext_vdu1_cp1, ext_vdu2_cp1], "extLinkPorts": [ _set_ext_link_port1(external_ports_id), @@ -194,6 +195,7 @@ def _set_ext_virtual_link_cp2(networks_id, external_subnets_id): ext_virtual_link_cp2 = { "id": uuidsentinel.evl2_id, "resourceId": networks_id[1], + "vimConnectionId": uuidsentinel.vim_connection_id, "extCps": [ _set_ext_cps_vdu1_cp2(external_subnets_id), _set_ext_cps_vdu2_cp2(external_subnets_id) @@ -206,6 +208,7 @@ def _set_ext_virtual_link_cp2_in_num_dynamic(networks_id, external_subnets_id): ext_virtual_link_cp2_in_num_dynamic = { "id": uuidsentinel.evl2_id, "resourceId": networks_id[1], + "vimConnectionId": uuidsentinel.vim_connection_id, "extCps": [ _set_ext_cps_vdu1_cp2_in_num_dynamic(external_subnets_id), _set_ext_cps_vdu2_cp2_in_num_dynamic(external_subnets_id)