diff options
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test')
28 files changed, 1800 insertions, 0 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/namingconvention/VirtualMachineInterfaceGuidelineValidatorTest.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/namingconvention/VirtualMachineInterfaceGuidelineValidatorTest.java new file mode 100644 index 0000000000..407adae932 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/namingconvention/VirtualMachineInterfaceGuidelineValidatorTest.java @@ -0,0 +1,189 @@ +package org.openecomp.sdc.validation.impl.validators.namingconvention; + +import org.openecomp.core.validation.types.MessageContainer; +import org.openecomp.sdc.heat.datatypes.model.HeatResourcesTypes; +import org.openecomp.sdc.validation.impl.validators.NamingConventionGuideLineValidator; +import org.openecomp.sdc.validation.util.ValidationTestUtil; +import org.testng.Assert; +import org.testng.annotations.Test; + +import java.util.Map; + +public class VirtualMachineInterfaceGuidelineValidatorTest { + private static final String PATH = + "/org/openecomp/validation/validators/guideLineValidator/vlan_validation/"; + + @Test + public void modeledThroughResourceGroupPositive() { + + NamingConventionGuideLineValidator baseValidator = new NamingConventionGuideLineValidator(); + VirtualMachineInterfaceGuidelineValidator resourceValidator = new + VirtualMachineInterfaceGuidelineValidator(); + Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(baseValidator, + resourceValidator, + HeatResourcesTypes.CONTRAIL_V2_VIRTUAL_MACHINE_INTERFACE_RESOURCE_TYPE.getHeatResource(), + PATH + "modeled_through_resource_group/positive_test/input"); + + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 0); + + } + + @Test + public void modeledThroughResourceGroupNegativeTwoValuesInList() { + + NamingConventionGuideLineValidator baseValidator = new NamingConventionGuideLineValidator(); + VirtualMachineInterfaceGuidelineValidator resourceValidator = new + VirtualMachineInterfaceGuidelineValidator(); + Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(baseValidator, + resourceValidator, + HeatResourcesTypes.CONTRAIL_V2_VIRTUAL_MACHINE_INTERFACE_RESOURCE_TYPE.getHeatResource(), + PATH + "modeled_through_resource_group/negative_test/input"); + + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 1); + + Assert.assertEquals(messages.get("nested.yml").getErrorMessageList().size(), 1); + Assert.assertEquals( + messages.get("nested.yml").getErrorMessageList().get(0).getMessage(), + "WARNING: [VlANG1]: VLAN Resource will not be translated as the VLAN Sub-interface " + + "[template_vmi_Vlan_2] is not modeled as resource group"); + } + + @Test + public void modeledThroughResourceGroupNegativeNonStringGetParam() { + + NamingConventionGuideLineValidator baseValidator = new NamingConventionGuideLineValidator(); + VirtualMachineInterfaceGuidelineValidator resourceValidator = new + VirtualMachineInterfaceGuidelineValidator(); + Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(baseValidator, + resourceValidator, + HeatResourcesTypes.CONTRAIL_V2_VIRTUAL_MACHINE_INTERFACE_RESOURCE_TYPE.getHeatResource(), + PATH + "modeled_through_resource_group/negative_test_non_string/input"); + + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 1); + + Assert.assertEquals(messages.get("nested.yml").getErrorMessageList().size(), 1); + Assert.assertEquals( + messages.get("nested.yml").getErrorMessageList().get(0).getMessage(), + "WARNING: [VlANG1]: VLAN Resource will not be translated as the VLAN Sub-interface " + + "[template_vmi_Vlan_2] is not modeled as resource group"); + } + + @Test + public void modeledThroughResourceGroupNegativeResource() { + + NamingConventionGuideLineValidator baseValidator = new NamingConventionGuideLineValidator(); + VirtualMachineInterfaceGuidelineValidator resourceValidator = new + VirtualMachineInterfaceGuidelineValidator(); + Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(baseValidator, + resourceValidator, + HeatResourcesTypes.CONTRAIL_V2_VIRTUAL_MACHINE_INTERFACE_RESOURCE_TYPE.getHeatResource(), + PATH + "modeled_through_resource_group/negative_get_resource/input"); + + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 1); + + Assert.assertEquals(messages.get("nested.yml").getErrorMessageList().size(), 1); + Assert.assertEquals( + messages.get("nested.yml").getErrorMessageList().get(0).getMessage(), + "WARNING: [VlANG1]: VLAN Resource will not be translated as the VLAN Sub-interface " + + "[template_vmi_Vlan_2] is not modeled as resource group"); + } + + + @Test + public void vlanAloneInFilePositive() { + + NamingConventionGuideLineValidator baseValidator = new NamingConventionGuideLineValidator(); + VirtualMachineInterfaceGuidelineValidator resourceValidator = new + VirtualMachineInterfaceGuidelineValidator(); + Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(baseValidator, + resourceValidator, + HeatResourcesTypes.CONTRAIL_V2_VIRTUAL_MACHINE_INTERFACE_RESOURCE_TYPE.getHeatResource(), + PATH + "single_vlan_resource/positive_test/input"); + + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 0); + + } + + @Test + public void vlanAloneInFileNegative_2vlans() { + + NamingConventionGuideLineValidator baseValidator = new NamingConventionGuideLineValidator(); + VirtualMachineInterfaceGuidelineValidator resourceValidator = new + VirtualMachineInterfaceGuidelineValidator(); + Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(baseValidator, + resourceValidator, + HeatResourcesTypes.CONTRAIL_V2_VIRTUAL_MACHINE_INTERFACE_RESOURCE_TYPE.getHeatResource(), + PATH + "single_vlan_resource/negative_test/two_vlans"); + + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 1); + + Assert.assertEquals(messages.get("nested.yml").getErrorMessageList().size(), 1); + Assert.assertEquals( + messages.get("nested.yml").getErrorMessageList().get(0).getMessage(), + "ERROR: [VlANG2]: There should not be any Compute Server Node, Port, " + + "Parent Port in nested file [nested.yml]"); + } + + @Test + public void vlanAloneInFileNegative_vlanAndNova() { + + NamingConventionGuideLineValidator baseValidator = new NamingConventionGuideLineValidator(); + VirtualMachineInterfaceGuidelineValidator resourceValidator = new + VirtualMachineInterfaceGuidelineValidator(); + Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(baseValidator, + resourceValidator, + HeatResourcesTypes.CONTRAIL_V2_VIRTUAL_MACHINE_INTERFACE_RESOURCE_TYPE.getHeatResource(), + PATH + "single_vlan_resource/negative_test/vlan_and_nova"); + + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 1); + + Assert.assertEquals(messages.get("nested.yml").getErrorMessageList().size(), 1); + Assert.assertEquals( + messages.get("nested.yml").getErrorMessageList().get(0).getMessage(), + "ERROR: [VlANG2]: There should not be any Compute Server Node, Port, " + + "Parent Port in nested file [nested.yml]"); + } + + @Test + public void namingConventionNegative(){ + NamingConventionGuideLineValidator baseValidator = new NamingConventionGuideLineValidator(); + VirtualMachineInterfaceGuidelineValidator resourceValidator = new + VirtualMachineInterfaceGuidelineValidator(); + Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(baseValidator, + resourceValidator, + HeatResourcesTypes.CONTRAIL_V2_VIRTUAL_MACHINE_INTERFACE_RESOURCE_TYPE.getHeatResource(), + PATH + "naming_convention/negative_test/input"); + + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 1); + + Assert.assertEquals(messages.get("nested.yml").getErrorMessageList().size(), 2); + Assert.assertEquals( + messages.get("nested.yml").getErrorMessageList().get(1).getMessage(), + "WARNING: [VlANG3]: Network role associated with VLAN Sub-interface " + + "id[template_wrong_naming_Vlan_2] is not following the naming convention"); + + } + + @Test + public void namingConventionPositive(){ + NamingConventionGuideLineValidator baseValidator = new NamingConventionGuideLineValidator(); + VirtualMachineInterfaceGuidelineValidator resourceValidator = new + VirtualMachineInterfaceGuidelineValidator(); + Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(baseValidator, + resourceValidator, + HeatResourcesTypes.CONTRAIL_V2_VIRTUAL_MACHINE_INTERFACE_RESOURCE_TYPE.getHeatResource(), + PATH + "naming_convention/positive_test/input"); + + Assert.assertNotNull(messages); + Assert.assertEquals(messages.size(), 0); + } + +}
\ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/modeled_through_resource_group/negative_get_resource/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/modeled_through_resource_group/negative_get_resource/input/MANIFEST.json new file mode 100644 index 0000000000..aca75b5055 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/modeled_through_resource_group/negative_get_resource/input/MANIFEST.json @@ -0,0 +1,17 @@ +{ + "name": "vMME_Small", + "description": "HOT template to create 2 cinder volume attachment", + "version": "2013-05-23", + "data": [ + { + "file": "main.yml", + "type": "HEAT", + "isBase": "true" + }, + { + "file": "nested.yml", + "type": "HEAT", + "isBase": "false" + } + ] +} diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/modeled_through_resource_group/negative_get_resource/input/main.yml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/modeled_through_resource_group/negative_get_resource/input/main.yml new file mode 100644 index 0000000000..a2d5166c84 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/modeled_through_resource_group/negative_get_resource/input/main.yml @@ -0,0 +1,102 @@ +heat_template_version: 2013-05-23 + +description: > + Version 2.0 02-09-2016 (Authors: John Doe, user PROD) + +parameters: + jsa_net_name: + type: string + description: network name of jsa log network + security_group_name: + type: comma_delimited_list + description: CMAUI1, CMAUI2 server names + cmaui_names: + type: comma_delimited_list + description: CMAUI1, CMAUI2 server names + cmaui_image: + type: string + description: Image for CMAUI server + availability_zone_0: + type: string + label: availabilityzone name + description: availabilityzone name + cmaui_flavor: + type: string + description: Flavor for CMAUI server + cmaui_oam_ips: + type: string + oam_sec_group_name: + type: string + lb_st_interface_type_oam: + type: string + template_PortTuple_LB1: + 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 +resources: + test_net1: + type: OS::Neutron::Net + properties: + name: {get_param: jsa_net_name} + shared: True + test_net2: + type: OS::Neutron::Net + properties: + name: {get_param: jsa_net_name} + shared: True + + server_cmaui_nova: + type: OS::Nova::Server + properties: + name: { get_param: [cmaui_names, 0]} + image: { get_param: cmaui_image } + availability_zone: { get_param: availability_zone_0 } + flavor: { get_param: cmaui_flavor } + networks: + - port: { get_resource: template_VMInt_OAM_lb_1 } + - port: { get_resource: cmaui_port_2 } + + + + cmaui_port_2: + type: OS::Neutron::Port + properties: + network: { get_resource: test_net1 } + fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}] + security_groups: [{get_param: security_group_name}] + replacement_policy: AUTO + + test_nested: + type: nested.yml + properties: + p1: { get_resource: template_VMInt_OAM_lb_1} + p2: { get_resource: cmaui_port_2} + net1: { get_resource: test_net1} + net2: { get_resource: test_net2} + + test_resourceGroup: + type: OS::Heat::ResourceGroup + properties: + count: 9 + resource_def: + type: nested.yml + properties: + p1: { get_resource: template_VMInt_OAM_lb_1} + p2: { get_resource: cmaui_port_2} + net1: { get_resource: test_net1} + net2: { get_resource: test_net2} + + test_nested_invalidConnection: + type: nested.yml + properties: + p1: { get_resource: test_Vlan1} + p2: { get_resource: server_cmaui_nova} diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/modeled_through_resource_group/negative_get_resource/input/nested.yml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/modeled_through_resource_group/negative_get_resource/input/nested.yml new file mode 100644 index 0000000000..a1846b72c7 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/modeled_through_resource_group/negative_get_resource/input/nested.yml @@ -0,0 +1,75 @@ +heat_template_version: 2013-05-23 + +description: cmaui server template for vMMSC + +parameters: + p1: + type: string + p2: + type: string + net1: + type: string + net2: + 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_vmi_Vlan_2: + 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_resource: template_VMInt_OAM_lb_1 }] + virtual_machine_interface_refs: [{ get_resource: template_VMInt_OAM_lb_1 }] + + diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/modeled_through_resource_group/negative_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/modeled_through_resource_group/negative_test/input/MANIFEST.json new file mode 100644 index 0000000000..aca75b5055 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/modeled_through_resource_group/negative_test/input/MANIFEST.json @@ -0,0 +1,17 @@ +{ + "name": "vMME_Small", + "description": "HOT template to create 2 cinder volume attachment", + "version": "2013-05-23", + "data": [ + { + "file": "main.yml", + "type": "HEAT", + "isBase": "true" + }, + { + "file": "nested.yml", + "type": "HEAT", + "isBase": "false" + } + ] +} diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/modeled_through_resource_group/negative_test/input/main.yml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/modeled_through_resource_group/negative_test/input/main.yml new file mode 100644 index 0000000000..2fc1d1614c --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/modeled_through_resource_group/negative_test/input/main.yml @@ -0,0 +1,111 @@ +heat_template_version: 2013-05-23 + +description: > + Version 2.0 02-09-2016 (Authors: John Doe, user PROD) + +parameters: + jsa_net_name: + type: string + description: network name of jsa log network + security_group_name: + type: comma_delimited_list + description: CMAUI1, CMAUI2 server names + cmaui_names: + type: comma_delimited_list + description: CMAUI1, CMAUI2 server names + cmaui_image: + type: string + description: Image for CMAUI server + availability_zone_0: + type: string + label: availabilityzone name + description: availabilityzone name + cmaui_flavor: + type: string + description: Flavor for CMAUI server + cmaui_oam_ips: + type: string + oam_sec_group_name: + type: string + lb_st_interface_type_oam: + type: string + template_PortTuple_LB1: + 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 +resources: + test_net1: + type: OS::Neutron::Net + properties: + name: {get_param: jsa_net_name} + shared: True + test_net2: + type: OS::Neutron::Net + properties: + name: {get_param: jsa_net_name} + shared: True + + server_cmaui_nova: + type: OS::Nova::Server + properties: + name: { get_param: [cmaui_names, 0]} + image: { get_param: cmaui_image } + availability_zone: { get_param: availability_zone_0 } + flavor: { get_param: cmaui_flavor } + networks: + - port: { get_resource: template_VMInt_OAM_lb_1 } + - port: { get_resource: cmaui_port_2 } + + + type: OS::ContrailV2::VirtualMachineInterface + properties: + virtual_machine_interface_properties: + { + virtual_machine_interface_properties_service_interface_type: { get_param: lb_st_interface_type_oam }, + } + virtual_network_refs: [{ get_resource: test_net1 }] + port_tuple_refs: [{ get_param: template_PortTuple_LB1 }] + security_group_refs: [{ get_param: oam_sec_group_name}] + + cmaui_port_2: + type: OS::Neutron::Port + properties: + network: { get_resource: test_net1 } + fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}] + security_groups: [{get_param: security_group_name}] + replacement_policy: AUTO + + test_nested: + type: nested.yml + properties: + p1: { get_resource: template_VMInt_OAM_lb_1} + p2: { get_resource: cmaui_port_2} + net1: { get_resource: test_net1} + net2: { get_resource: test_net2} + + test_resourceGroup: + type: OS::Heat::ResourceGroup + properties: + count: 9 + resource_def: + type: nested.yml + properties: + p1: { get_resource: template_VMInt_OAM_lb_1} + p2: { get_resource: cmaui_port_2} + net1: { get_resource: test_net1} + net2: { get_resource: test_net2} + + test_nested_invalidConnection: + type: nested.yml + properties: + p1: { get_resource: test_Vlan1} + p2: { get_resource: server_cmaui_nova} diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/modeled_through_resource_group/negative_test/input/nested.yml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/modeled_through_resource_group/negative_test/input/nested.yml new file mode 100644 index 0000000000..5b128f5ea2 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/modeled_through_resource_group/negative_test/input/nested.yml @@ -0,0 +1,76 @@ +heat_template_version: 2013-05-23 + +description: cmaui server template for vMMSC + +parameters: + p1: + type: string + p2: + type: string + net1: + type: string + net2: + 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_vmi_Vlan_2: + 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: net2 },{ get_param: net1 }] + virtual_machine_interface_refs: [{ get_param: p2 }, { get_param: p1 }] + + + diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/modeled_through_resource_group/negative_test_non_string/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/modeled_through_resource_group/negative_test_non_string/input/MANIFEST.json new file mode 100644 index 0000000000..aca75b5055 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/modeled_through_resource_group/negative_test_non_string/input/MANIFEST.json @@ -0,0 +1,17 @@ +{ + "name": "vMME_Small", + "description": "HOT template to create 2 cinder volume attachment", + "version": "2013-05-23", + "data": [ + { + "file": "main.yml", + "type": "HEAT", + "isBase": "true" + }, + { + "file": "nested.yml", + "type": "HEAT", + "isBase": "false" + } + ] +} diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/modeled_through_resource_group/negative_test_non_string/input/main.yml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/modeled_through_resource_group/negative_test_non_string/input/main.yml new file mode 100644 index 0000000000..2fc1d1614c --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/modeled_through_resource_group/negative_test_non_string/input/main.yml @@ -0,0 +1,111 @@ +heat_template_version: 2013-05-23 + +description: > + Version 2.0 02-09-2016 (Authors: John Doe, user PROD) + +parameters: + jsa_net_name: + type: string + description: network name of jsa log network + security_group_name: + type: comma_delimited_list + description: CMAUI1, CMAUI2 server names + cmaui_names: + type: comma_delimited_list + description: CMAUI1, CMAUI2 server names + cmaui_image: + type: string + description: Image for CMAUI server + availability_zone_0: + type: string + label: availabilityzone name + description: availabilityzone name + cmaui_flavor: + type: string + description: Flavor for CMAUI server + cmaui_oam_ips: + type: string + oam_sec_group_name: + type: string + lb_st_interface_type_oam: + type: string + template_PortTuple_LB1: + 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 +resources: + test_net1: + type: OS::Neutron::Net + properties: + name: {get_param: jsa_net_name} + shared: True + test_net2: + type: OS::Neutron::Net + properties: + name: {get_param: jsa_net_name} + shared: True + + server_cmaui_nova: + type: OS::Nova::Server + properties: + name: { get_param: [cmaui_names, 0]} + image: { get_param: cmaui_image } + availability_zone: { get_param: availability_zone_0 } + flavor: { get_param: cmaui_flavor } + networks: + - port: { get_resource: template_VMInt_OAM_lb_1 } + - port: { get_resource: cmaui_port_2 } + + + type: OS::ContrailV2::VirtualMachineInterface + properties: + virtual_machine_interface_properties: + { + virtual_machine_interface_properties_service_interface_type: { get_param: lb_st_interface_type_oam }, + } + virtual_network_refs: [{ get_resource: test_net1 }] + port_tuple_refs: [{ get_param: template_PortTuple_LB1 }] + security_group_refs: [{ get_param: oam_sec_group_name}] + + cmaui_port_2: + type: OS::Neutron::Port + properties: + network: { get_resource: test_net1 } + fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}] + security_groups: [{get_param: security_group_name}] + replacement_policy: AUTO + + test_nested: + type: nested.yml + properties: + p1: { get_resource: template_VMInt_OAM_lb_1} + p2: { get_resource: cmaui_port_2} + net1: { get_resource: test_net1} + net2: { get_resource: test_net2} + + test_resourceGroup: + type: OS::Heat::ResourceGroup + properties: + count: 9 + resource_def: + type: nested.yml + properties: + p1: { get_resource: template_VMInt_OAM_lb_1} + p2: { get_resource: cmaui_port_2} + net1: { get_resource: test_net1} + net2: { get_resource: test_net2} + + test_nested_invalidConnection: + type: nested.yml + properties: + p1: { get_resource: test_Vlan1} + p2: { get_resource: server_cmaui_nova} diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/modeled_through_resource_group/negative_test_non_string/input/nested.yml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/modeled_through_resource_group/negative_test_non_string/input/nested.yml new file mode 100644 index 0000000000..1b4c03fa26 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/modeled_through_resource_group/negative_test_non_string/input/nested.yml @@ -0,0 +1,76 @@ +heat_template_version: 2013-05-23 + +description: cmaui server template for vMMSC + +parameters: + p1: + type: number + p2: + type: string + net1: + type: string + net2: + 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_vmi_Vlan_2: + 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: net2 },{ get_param: net1 }] + virtual_machine_interface_refs: [{ get_param: p1 }] + + + diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/modeled_through_resource_group/positive_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/modeled_through_resource_group/positive_test/input/MANIFEST.json new file mode 100644 index 0000000000..aca75b5055 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/modeled_through_resource_group/positive_test/input/MANIFEST.json @@ -0,0 +1,17 @@ +{ + "name": "vMME_Small", + "description": "HOT template to create 2 cinder volume attachment", + "version": "2013-05-23", + "data": [ + { + "file": "main.yml", + "type": "HEAT", + "isBase": "true" + }, + { + "file": "nested.yml", + "type": "HEAT", + "isBase": "false" + } + ] +} diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/modeled_through_resource_group/positive_test/input/main.yml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/modeled_through_resource_group/positive_test/input/main.yml new file mode 100644 index 0000000000..7ec3998277 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/modeled_through_resource_group/positive_test/input/main.yml @@ -0,0 +1,66 @@ +heat_template_version: 2013-05-23 + +description: > + Version 2.0 02-09-2016 (Authors: John Doe, user PROD) + +parameters: + jsa_net_name: + type: string + description: network name of jsa log network + security_group_name: + type: comma_delimited_list + description: CMAUI1, CMAUI2 server names + cmaui_names: + type: comma_delimited_list + description: CMAUI1, CMAUI2 server names + cmaui_image: + type: string + description: Image for CMAUI server + availability_zone_0: + type: string + label: availabilityzone name + description: availabilityzone name + cmaui_flavor: + type: string + description: Flavor for CMAUI server + cmaui_oam_ips: + type: string + oam_sec_group_name: + type: string + lb_st_interface_type_oam: + type: string + template_PortTuple_LB1: + 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 +resources: + test_net1: + type: OS::Neutron::Net + properties: + name: {get_param: jsa_net_name} + shared: True + test_net2: + type: OS::Neutron::Net + properties: + name: {get_param: jsa_net_name} + shared: True + + server_cmaui_nova: + type: OS::Nova::Server + properties: + name: { get_param: [cmaui_names, 0]} + image: { get_param: cmaui_image } + availability_zone: { get_param: availability_zone_0 } + flavor: { get_param: cmaui_flavor } + networks: + - port: { get_resource: template_VMInt_OAM_lb_1 } + - port: { get_resource: cmaui_port_2 } diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/modeled_through_resource_group/positive_test/input/nested.yml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/modeled_through_resource_group/positive_test/input/nested.yml new file mode 100644 index 0000000000..272543c2a1 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/modeled_through_resource_group/positive_test/input/nested.yml @@ -0,0 +1,73 @@ +heat_template_version: 2013-05-23 + +description: cmaui server template for vMMSC + +parameters: + p1: + type: string + p2: + type: string + net1: + type: string + net2: + 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_vmi_Vlan_2: + 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: net2 },{ get_param: net1 }] + virtual_machine_interface_refs: [ { get_param: p1 }] diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/naming_convention/negative_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/naming_convention/negative_test/input/MANIFEST.json new file mode 100644 index 0000000000..aca75b5055 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/naming_convention/negative_test/input/MANIFEST.json @@ -0,0 +1,17 @@ +{ + "name": "vMME_Small", + "description": "HOT template to create 2 cinder volume attachment", + "version": "2013-05-23", + "data": [ + { + "file": "main.yml", + "type": "HEAT", + "isBase": "true" + }, + { + "file": "nested.yml", + "type": "HEAT", + "isBase": "false" + } + ] +} diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/naming_convention/negative_test/input/main.yml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/naming_convention/negative_test/input/main.yml new file mode 100644 index 0000000000..7ec3998277 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/naming_convention/negative_test/input/main.yml @@ -0,0 +1,66 @@ +heat_template_version: 2013-05-23 + +description: > + Version 2.0 02-09-2016 (Authors: John Doe, user PROD) + +parameters: + jsa_net_name: + type: string + description: network name of jsa log network + security_group_name: + type: comma_delimited_list + description: CMAUI1, CMAUI2 server names + cmaui_names: + type: comma_delimited_list + description: CMAUI1, CMAUI2 server names + cmaui_image: + type: string + description: Image for CMAUI server + availability_zone_0: + type: string + label: availabilityzone name + description: availabilityzone name + cmaui_flavor: + type: string + description: Flavor for CMAUI server + cmaui_oam_ips: + type: string + oam_sec_group_name: + type: string + lb_st_interface_type_oam: + type: string + template_PortTuple_LB1: + 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 +resources: + test_net1: + type: OS::Neutron::Net + properties: + name: {get_param: jsa_net_name} + shared: True + test_net2: + type: OS::Neutron::Net + properties: + name: {get_param: jsa_net_name} + shared: True + + server_cmaui_nova: + type: OS::Nova::Server + properties: + name: { get_param: [cmaui_names, 0]} + image: { get_param: cmaui_image } + availability_zone: { get_param: availability_zone_0 } + flavor: { get_param: cmaui_flavor } + networks: + - port: { get_resource: template_VMInt_OAM_lb_1 } + - port: { get_resource: cmaui_port_2 } diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/naming_convention/negative_test/input/nested.yml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/naming_convention/negative_test/input/nested.yml new file mode 100644 index 0000000000..5d540c4003 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/naming_convention/negative_test/input/nested.yml @@ -0,0 +1,73 @@ +heat_template_version: 2013-05-23 + +description: cmaui server template for vMMSC + +parameters: + p1: + type: string + p2: + type: string + net1: + type: string + net2: + 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_wrong_naming_Vlan_2: + 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: net2 },{ get_param: net1 }] + virtual_machine_interface_refs: [{ get_param: p2 }, { get_param: p1 }] diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/naming_convention/positive_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/naming_convention/positive_test/input/MANIFEST.json new file mode 100644 index 0000000000..aca75b5055 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/naming_convention/positive_test/input/MANIFEST.json @@ -0,0 +1,17 @@ +{ + "name": "vMME_Small", + "description": "HOT template to create 2 cinder volume attachment", + "version": "2013-05-23", + "data": [ + { + "file": "main.yml", + "type": "HEAT", + "isBase": "true" + }, + { + "file": "nested.yml", + "type": "HEAT", + "isBase": "false" + } + ] +} diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/naming_convention/positive_test/input/main.yml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/naming_convention/positive_test/input/main.yml new file mode 100644 index 0000000000..6924e8378b --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/naming_convention/positive_test/input/main.yml @@ -0,0 +1,57 @@ +heat_template_version: 2013-05-23 + +description: > + Version 2.0 02-09-2016 (Authors: John Doe, user PROD) + +parameters: + jsa_net_name: + type: string + description: network name of jsa log network + security_group_name: + type: comma_delimited_list + description: CMAUI1, CMAUI2 server names + cmaui_names: + type: comma_delimited_list + description: CMAUI1, CMAUI2 server names + cmaui_image: + type: string + description: Image for CMAUI server + availability_zone_0: + type: string + label: availabilityzone name + description: availabilityzone name + cmaui_flavor: + type: string + description: Flavor for CMAUI server + cmaui_oam_ips: + type: string + oam_sec_group_name: + type: string + lb_st_interface_type_oam: + type: string + template_PortTuple_LB1: + 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 +resources: + template_VMInt_OAM_lb_1: + type: OS::ContrailV2::VirtualMachineInterface + properties: + virtual_machine_interface_properties: + { + virtual_machine_interface_properties_service_interface_type: { get_param: lb_st_interface_type_oam }, + } + virtual_network_refs: [{ get_resource: test_net1 }] + port_tuple_refs: [{ get_param: template_PortTuple_LB1 }] + security_group_refs: [{ get_param: oam_sec_group_name}] + +
\ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/naming_convention/positive_test/input/nested.yml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/naming_convention/positive_test/input/nested.yml new file mode 100644 index 0000000000..f45f6928c9 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/naming_convention/positive_test/input/nested.yml @@ -0,0 +1,75 @@ +heat_template_version: 2013-05-23 + +description: cmaui server template for vMMSC + +parameters: + p1: + type: string + p2: + type: string + net1: + type: string + net2: + 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_vmi_Vlan_2: + 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: net2 },{ get_param: net1 }] + virtual_machine_interface_refs: [ { get_param: p1 }] + + diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/single_vlan_resource/negative_test/two_vlans/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/single_vlan_resource/negative_test/two_vlans/MANIFEST.json new file mode 100644 index 0000000000..aca75b5055 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/single_vlan_resource/negative_test/two_vlans/MANIFEST.json @@ -0,0 +1,17 @@ +{ + "name": "vMME_Small", + "description": "HOT template to create 2 cinder volume attachment", + "version": "2013-05-23", + "data": [ + { + "file": "main.yml", + "type": "HEAT", + "isBase": "true" + }, + { + "file": "nested.yml", + "type": "HEAT", + "isBase": "false" + } + ] +} diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/single_vlan_resource/negative_test/two_vlans/main.yml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/single_vlan_resource/negative_test/two_vlans/main.yml new file mode 100644 index 0000000000..176235489d --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/single_vlan_resource/negative_test/two_vlans/main.yml @@ -0,0 +1,112 @@ +heat_template_version: 2013-05-23 + +description: > + Version 2.0 02-09-2016 (Authors: John Doe, user PROD) + +parameters: + jsa_net_name: + type: string + description: network name of jsa log network + security_group_name: + type: comma_delimited_list + description: CMAUI1, CMAUI2 server names + cmaui_names: + type: comma_delimited_list + description: CMAUI1, CMAUI2 server names + cmaui_image: + type: string + description: Image for CMAUI server + availability_zone_0: + type: string + label: availabilityzone name + description: availabilityzone name + cmaui_flavor: + type: string + description: Flavor for CMAUI server + cmaui_oam_ips: + type: string + oam_sec_group_name: + type: string + lb_st_interface_type_oam: + type: string + template_PortTuple_LB1: + 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 +resources: + test_net1: + type: OS::Neutron::Net + properties: + name: {get_param: jsa_net_name} + shared: True + test_net2: + type: OS::Neutron::Net + properties: + name: {get_param: jsa_net_name} + shared: True + + server_cmaui_nova: + type: OS::Nova::Server + properties: + name: { get_param: [cmaui_names, 0]} + image: { get_param: cmaui_image } + availability_zone: { get_param: availability_zone_0 } + flavor: { get_param: cmaui_flavor } + networks: + - port: { get_resource: template_VMInt_OAM_lb_1 } + - port: { get_resource: cmaui_port_2 } + + template_VMInt_OAM_lb_1: + type: OS::ContrailV2::VirtualMachineInterface + properties: + virtual_machine_interface_properties: + { + virtual_machine_interface_properties_service_interface_type: { get_param: lb_st_interface_type_oam }, + } + virtual_network_refs: [{ get_resource: test_net1 }] + port_tuple_refs: [{ get_param: template_PortTuple_LB1 }] + security_group_refs: [{ get_param: oam_sec_group_name}] + + cmaui_port_2: + type: OS::Neutron::Port + properties: + network: { get_resource: test_net1 } + fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}] + security_groups: [{get_param: security_group_name}] + replacement_policy: AUTO + + + test_nested: + type: nested.yml + properties: + p1: { get_resource: template_VMInt_OAM_lb_1} + p2: { get_resource: cmaui_port_2} + net1: { get_resource: test_net1} + net2: { get_resource: test_net2} + + test_resourceGroup: + type: OS::Heat::ResourceGroup + properties: + count: 9 + resource_def: + type: nested.yml + properties: + p1: { get_resource: template_VMInt_OAM_lb_1} + p2: { get_resource: cmaui_port_2} + net1: { get_resource: test_net1} + net2: { get_resource: test_net2} + + test_nested_invalidConnection: + type: nested.yml + properties: + p1: { get_resource: test_Vlan1} + p2: { get_resource: server_cmaui_nova} diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/single_vlan_resource/negative_test/two_vlans/nested.yml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/single_vlan_resource/negative_test/two_vlans/nested.yml new file mode 100644 index 0000000000..0975493b7d --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/single_vlan_resource/negative_test/two_vlans/nested.yml @@ -0,0 +1,117 @@ +heat_template_version: 2013-05-23 + +description: cmaui server template for vMMSC + +parameters: + p1: + type: string + p2: + type: string + net1: + type: string + net2: + 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_vmi_Vlan_2: + 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: net2 },{ get_param: net1 }] + virtual_machine_interface_refs: [ { get_param: p1 }] + + template_vmi_Vlan_3_arrayParameter: + 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: [net2,1] }] + virtual_machine_interface_refs: [ { get_param: p1 }] + diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/single_vlan_resource/negative_test/vlan_and_nova/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/single_vlan_resource/negative_test/vlan_and_nova/MANIFEST.json new file mode 100644 index 0000000000..aca75b5055 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/single_vlan_resource/negative_test/vlan_and_nova/MANIFEST.json @@ -0,0 +1,17 @@ +{ + "name": "vMME_Small", + "description": "HOT template to create 2 cinder volume attachment", + "version": "2013-05-23", + "data": [ + { + "file": "main.yml", + "type": "HEAT", + "isBase": "true" + }, + { + "file": "nested.yml", + "type": "HEAT", + "isBase": "false" + } + ] +} diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/single_vlan_resource/negative_test/vlan_and_nova/main.yml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/single_vlan_resource/negative_test/vlan_and_nova/main.yml new file mode 100644 index 0000000000..59c5cfaf40 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/single_vlan_resource/negative_test/vlan_and_nova/main.yml @@ -0,0 +1,56 @@ +heat_template_version: 2013-05-23 + +description: > + Version 2.0 02-09-2016 (Authors: John Doe, user PROD) + +parameters: + jsa_net_name: + type: string + description: network name of jsa log network + security_group_name: + type: comma_delimited_list + description: CMAUI1, CMAUI2 server names + cmaui_names: + type: comma_delimited_list + description: CMAUI1, CMAUI2 server names + cmaui_image: + type: string + description: Image for CMAUI server + availability_zone_0: + type: string + label: availabilityzone name + description: availabilityzone name + cmaui_flavor: + type: string + description: Flavor for CMAUI server + cmaui_oam_ips: + type: string + oam_sec_group_name: + type: string + lb_st_interface_type_oam: + type: string + template_PortTuple_LB1: + 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 +resources: + template_VMInt_OAM_lb_1: + type: OS::Nova::ServerGroup + properties: + virtual_machine_interface_properties: + { + virtual_machine_interface_properties_service_interface_type: { get_param: lb_st_interface_type_oam }, + } + virtual_network_refs: [{ get_resource: test_net1 }] + port_tuple_refs: [{ get_param: template_PortTuple_LB1 }] + security_group_refs: [{ get_param: oam_sec_group_name}] + diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/single_vlan_resource/negative_test/vlan_and_nova/nested.yml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/single_vlan_resource/negative_test/vlan_and_nova/nested.yml new file mode 100644 index 0000000000..32f9b9b578 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/single_vlan_resource/negative_test/vlan_and_nova/nested.yml @@ -0,0 +1,80 @@ +heat_template_version: 2013-05-23 + +description: cmaui server template for vMMSC + +parameters: + p1: + type: string + p2: + type: string + net1: + type: string + net2: + 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: + cmaui_port_1: + type: OS::Neutron::Port + properties: + network: { get_param: net } + fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}] + security_groups: [{get_param: p1}, {get_param: p2}] + replacement_policy: AUTO + + template_vmi_Vlan_2: + 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: net2 },{ get_param: net1 }] + virtual_machine_interface_refs: [ { get_param: p1 }] + diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/single_vlan_resource/positive_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/single_vlan_resource/positive_test/input/MANIFEST.json new file mode 100644 index 0000000000..aca75b5055 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/single_vlan_resource/positive_test/input/MANIFEST.json @@ -0,0 +1,17 @@ +{ + "name": "vMME_Small", + "description": "HOT template to create 2 cinder volume attachment", + "version": "2013-05-23", + "data": [ + { + "file": "main.yml", + "type": "HEAT", + "isBase": "true" + }, + { + "file": "nested.yml", + "type": "HEAT", + "isBase": "false" + } + ] +} diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/single_vlan_resource/positive_test/input/main.yml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/single_vlan_resource/positive_test/input/main.yml new file mode 100644 index 0000000000..6924e8378b --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/single_vlan_resource/positive_test/input/main.yml @@ -0,0 +1,57 @@ +heat_template_version: 2013-05-23 + +description: > + Version 2.0 02-09-2016 (Authors: John Doe, user PROD) + +parameters: + jsa_net_name: + type: string + description: network name of jsa log network + security_group_name: + type: comma_delimited_list + description: CMAUI1, CMAUI2 server names + cmaui_names: + type: comma_delimited_list + description: CMAUI1, CMAUI2 server names + cmaui_image: + type: string + description: Image for CMAUI server + availability_zone_0: + type: string + label: availabilityzone name + description: availabilityzone name + cmaui_flavor: + type: string + description: Flavor for CMAUI server + cmaui_oam_ips: + type: string + oam_sec_group_name: + type: string + lb_st_interface_type_oam: + type: string + template_PortTuple_LB1: + 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 +resources: + template_VMInt_OAM_lb_1: + type: OS::ContrailV2::VirtualMachineInterface + properties: + virtual_machine_interface_properties: + { + virtual_machine_interface_properties_service_interface_type: { get_param: lb_st_interface_type_oam }, + } + virtual_network_refs: [{ get_resource: test_net1 }] + port_tuple_refs: [{ get_param: template_PortTuple_LB1 }] + security_group_refs: [{ get_param: oam_sec_group_name}] + +
\ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/single_vlan_resource/positive_test/input/nested.yml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/single_vlan_resource/positive_test/input/nested.yml new file mode 100644 index 0000000000..f45f6928c9 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/vlan_validation/single_vlan_resource/positive_test/input/nested.yml @@ -0,0 +1,75 @@ +heat_template_version: 2013-05-23 + +description: cmaui server template for vMMSC + +parameters: + p1: + type: string + p2: + type: string + net1: + type: string + net2: + 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_vmi_Vlan_2: + 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: net2 },{ get_param: net1 }] + virtual_machine_interface_refs: [ { get_param: p1 }] + + |