From 3c24190cca30ee77c8c81d1738d7d5cbf454d647 Mon Sep 17 00:00:00 2001 From: siddharth0905 Date: Thu, 15 Mar 2018 18:14:57 +0530 Subject: Code Change & Junit for verifying Pattern5 Code change and Junit for pattern5 Change-Id: Icbe8cf25cd97250e8c5000ca75bc7dcd7900e129 Issue-ID: SDC-1085 Signed-off-by: siddharth0905 --- .../in/MANIFEST.json | 27 ++++++ .../in/main.yml | 13 +++ .../in/nested_pattern5.yml | 80 ++++++++++++++++ .../in/nested_pattern5_levelTwo.yml | 104 +++++++++++++++++++++ .../in/nested_vlan.yml | 68 ++++++++++++++ 5 files changed, 292 insertions(+) create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/fulltest/subinterface/vlantagging/pattern5/complexVFCMultiLevelNestedMultiComputeScenario/in/MANIFEST.json create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/fulltest/subinterface/vlantagging/pattern5/complexVFCMultiLevelNestedMultiComputeScenario/in/main.yml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/fulltest/subinterface/vlantagging/pattern5/complexVFCMultiLevelNestedMultiComputeScenario/in/nested_pattern5.yml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/fulltest/subinterface/vlantagging/pattern5/complexVFCMultiLevelNestedMultiComputeScenario/in/nested_pattern5_levelTwo.yml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/fulltest/subinterface/vlantagging/pattern5/complexVFCMultiLevelNestedMultiComputeScenario/in/nested_vlan.yml (limited to 'openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/fulltest/subinterface/vlantagging/pattern5/complexVFCMultiLevelNestedMultiComputeScenario/in') diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/fulltest/subinterface/vlantagging/pattern5/complexVFCMultiLevelNestedMultiComputeScenario/in/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/fulltest/subinterface/vlantagging/pattern5/complexVFCMultiLevelNestedMultiComputeScenario/in/MANIFEST.json new file mode 100644 index 0000000000..094b8097ce --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/fulltest/subinterface/vlantagging/pattern5/complexVFCMultiLevelNestedMultiComputeScenario/in/MANIFEST.json @@ -0,0 +1,27 @@ +{ + "name": "Nested test", + "description": "HOT template to create nested one level multiple compute", + "version": "2013-05-23", + "data": [ + { + "file": "main.yml", + "type": "HEAT", + "isBase": "true" + }, + { + "file": "nested_pattern5.yml", + "type": "HEAT", + "isBase": "false" + }, + { + "file": "nested_pattern5_levelTwo.yml", + "type": "HEAT", + "isBase": "false" + }, + { + "file": "nested_vlan.yml", + "type": "HEAT", + "isBase": "false" + } + ] +} diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/fulltest/subinterface/vlantagging/pattern5/complexVFCMultiLevelNestedMultiComputeScenario/in/main.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/fulltest/subinterface/vlantagging/pattern5/complexVFCMultiLevelNestedMultiComputeScenario/in/main.yml new file mode 100644 index 0000000000..05f95260c3 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/fulltest/subinterface/vlantagging/pattern5/complexVFCMultiLevelNestedMultiComputeScenario/in/main.yml @@ -0,0 +1,13 @@ +heat_template_version: 2013-05-23 + +description: > + Version 2.0 02-09-2016 (Authors: John Doe, user PROD) + +parameters: + jsa_name: + type: string + description: network name of jsa log network + +resources: + test_nested_level1: + type: nested_pattern5.yml diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/fulltest/subinterface/vlantagging/pattern5/complexVFCMultiLevelNestedMultiComputeScenario/in/nested_pattern5.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/fulltest/subinterface/vlantagging/pattern5/complexVFCMultiLevelNestedMultiComputeScenario/in/nested_pattern5.yml new file mode 100644 index 0000000000..51be6937df --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/fulltest/subinterface/vlantagging/pattern5/complexVFCMultiLevelNestedMultiComputeScenario/in/nested_pattern5.yml @@ -0,0 +1,80 @@ +heat_template_version: 2013-05-23 + +description: nested1 + +parameters: + sub_inf_net: + type: string + description: sub interface network + port_net: + type: string + description: port network + security_group_name: + type: comma_delimited_list + description: CMAUI1, CMAUI2 server names + availability_zone_0: + type: string + label: availabilityzone name + description: availabilityzone name + pd_server_1b_names: + type: comma_delimited_list + description: PD server names + pd_server_1b_image: + type: string + description: PD Image server + pd_server_1b_flavor: + type: string + description: Flavor for PD server + pd_server_1b_ips: + type: string + pd_server_2b_ips: + type: string + packet_external_network_name: + type: string + description: network name + packet_internal_network_name: + type: string + description: network name + +resources: + packet_internal_network: + type: OS::Neutron::Net + properties: + name: + get_param: packet_internal_network_name + + packet_external_network: + type: OS::Neutron::Net + properties: + name: + get_param: packet_external_network_name + + pd_server_1b_port_0: + type: OS::Neutron::Port + properties: + network: { get_resource: packet_internal_network } + fixed_ips: [{"ip_address": {get_param: [pd_server_1b_ips, 0]}}] + replacement_policy: AUTO + + server_1b_pd_0: + type: OS::Nova::Server + properties: + name: { get_param: [pd_server_1b_names, 0]} + image: { get_param: pd_server_1b_image } + availability_zone: { get_param: availability_zone_0 } + flavor: { get_param: pd_server_1b_flavor } + networks: + - port: { get_resource: pd_server_1b_port_0 } + + test_resourceGroup_0: + type: OS::Heat::ResourceGroup + properties: + count: 9 + resource_def: + type: nested_vlan.yml + properties: + parent_interface: { get_resource: pd_server_1b_port_0} + net1: { get_resource: packet_external_network} + + test_nested_level2: + type: nested_pattern5_levelTwo.yml diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/fulltest/subinterface/vlantagging/pattern5/complexVFCMultiLevelNestedMultiComputeScenario/in/nested_pattern5_levelTwo.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/fulltest/subinterface/vlantagging/pattern5/complexVFCMultiLevelNestedMultiComputeScenario/in/nested_pattern5_levelTwo.yml new file mode 100644 index 0000000000..57e3d22955 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/fulltest/subinterface/vlantagging/pattern5/complexVFCMultiLevelNestedMultiComputeScenario/in/nested_pattern5_levelTwo.yml @@ -0,0 +1,104 @@ +heat_template_version: 2013-05-23 + +description: nested1 + +parameters: + security_group_name: + type: comma_delimited_list + description: CMAUI1, CMAUI2 server names + availability_zone_0: + type: string + label: availabilityzone name + description: availabilityzone name + sub_inf_net: + type: string + description: sub interface network + port_net: + type: string + description: port network + ps_server_1b_names: + type: comma_delimited_list + description: Ps server names + ps_server_1b_image: + type: string + description: Ps Image server + ps_server_1b_flavor: + type: string + description: Flavor for PS server + ps_server_1b_ips: + type: string + ps_server_2b_ips: + type: string + packet_ext_network_name: + type: string + description: network name + packet_int_network_name: + type: string + description: network name + +resources: + packet_int_network: + type: OS::Neutron::Net + properties: + name: + get_param: packet_int_network_name + + packet_ext_network: + type: OS::Neutron::Net + properties: + name: + get_param: packet_ext_network_name + + ps_server_1b_port_1: + type: OS::Neutron::Port + properties: + network: {get_resource: packet_int_network} + fixed_ips: [{"ip_address": {get_param: [ps_server_1b_ips, 0]}}] + replacement_policy: AUTO + + server_1b_ps_1: + type: OS::Nova::Server + properties: + name: { get_param: [ps_server_1b_names, 1]} + image: { get_param: ps_server_1b_image } + availability_zone: { get_param: availability_zone_0 } + flavor: { get_param: ps_server_1b_flavor } + networks: + - port: { get_resource: ps_server_1b_port_1 } + + ps_server_1b_port_2: + type: OS::Neutron::Port + properties: + network: {get_resource: packet_int_network} + fixed_ips: [{"ip_address": {get_param: [ps_server_1b_ips, 1]}}] + replacement_policy: AUTO + + server_1b_ps_2: + type: OS::Nova::Server + properties: + name: { get_param: [ps_server_1b_names, 2]} + image: { get_param: ps_server_1b_image } + availability_zone: { get_param: availability_zone_0 } + flavor: { get_param: ps_server_1b_flavor } + networks: + - port: { get_resource: ps_server_1b_port_2 } + + test_resourceGroup_1: + type: OS::Heat::ResourceGroup + properties: + count: 9 + resource_def: + type: nested_vlan.yml + properties: + parent_interface: { get_resource: ps_server_1b_port_1} + net1: { get_resource: packet_ext_network} + + test_resourceGroup_2: + type: OS::Heat::ResourceGroup + properties: + count: 9 + resource_def: + type: nested_vlan.yml + properties: + parent_interface: { get_resource: ps_server_1b_port_2} + net1: { get_resource: packet_ext_network} \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/fulltest/subinterface/vlantagging/pattern5/complexVFCMultiLevelNestedMultiComputeScenario/in/nested_vlan.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/fulltest/subinterface/vlantagging/pattern5/complexVFCMultiLevelNestedMultiComputeScenario/in/nested_vlan.yml new file mode 100644 index 0000000000..cc50a66d6e --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/fulltest/subinterface/vlantagging/pattern5/complexVFCMultiLevelNestedMultiComputeScenario/in/nested_vlan.yml @@ -0,0 +1,68 @@ +heat_template_version: 2018-02-01 + +description: cmaui server template for vMMSC + +parameters: + parent_interface: + type: string + net1: + type: string + lb_st_vlan_type_oam: + description: dummy + type: string + mac_address: + type: string + virtual_ip_address: + type: string + virtual_ipv6_address: + type: string + vlan_ids: + type: string + subinterface_name_prefix: + type: string + subinterface_instance_index: + type: number +resources: + + template_Vlan_vmi_1: + type: OS::ContrailV2::VirtualMachineInterface + properties: + name: + str_replace: + template: $NAME$VLAN + params: + $NAME: { get_param: subinterface_name_prefix } + $VLAN: { get_param: [ vlan_ids, { get_param: subinterface_instance_index } ] } + virtual_machine_interface_properties: + { + virtual_machine_interface_properties_sub_interface_vlan_tag: { get_param: lb_st_vlan_type_oam } + } + virtual_machine_interface_mac_addresses: + { + virtual_machine_interface_mac_addresses_mac_address: [{ get_param: mac_address }], + } + virtual_machine_interface_allowed_address_pairs: + { + virtual_machine_interface_allowed_address_pairs_allowed_address_pair: [ + { + virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: active-standby, + virtual_machine_interface_allowed_address_pairs_allowed_address_pair_mac: { get_param: mac_address }, + virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip: + { + virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: virtual_ip_address }, + virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: 32 + } + }, + { + virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: active-standby, + virtual_machine_interface_allowed_address_pairs_allowed_address_pair_mac: { get_param: mac_address }, + virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip: + { + virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: virtual_ipv6_address }, + virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: 128 + } + } + ] + } + virtual_network_refs: [{ get_param: net1 }] + virtual_machine_interface_refs: [{ get_param: parent_interface }] \ No newline at end of file -- cgit 1.2.3-korg