From 146bb551e62c96de668b576142d7407ab2a5fa64 Mon Sep 17 00:00:00 2001 From: talio Date: Mon, 12 Mar 2018 12:47:49 +0200 Subject: Refactor port id regex Change port id regex to allow getting ids with or without digits Change-Id: Ic2738c5433c258927caf04bd11dceac9320718c6 Issue-ID: SDC-1093 Signed-off-by: talio --- .../ContrailV2VlanToInterfaceResourceConnectionTest.java | 2 +- .../inoutattr/expectedoutputfiles/MainServiceTemplate.yaml | 12 ++++++------ .../inoutattr/inputfiles/main.yml | 10 +++++----- 3 files changed, 12 insertions(+), 12 deletions(-) (limited to 'openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test') diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/ContrailV2VlanToInterfaceResourceConnectionTest.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/ContrailV2VlanToInterfaceResourceConnectionTest.java index 21aa15e98e..c7c780cceb 100644 --- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/ContrailV2VlanToInterfaceResourceConnectionTest.java +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/ContrailV2VlanToInterfaceResourceConnectionTest.java @@ -38,7 +38,7 @@ import java.util.Optional; public class ContrailV2VlanToInterfaceResourceConnectionTest extends BaseResourceTranslationTest { - private static final String PORT_NODE_TEMPLATE_ID_FOR_ATTR_TEST = "vdbe_untr_1_port"; + private static final String PORT_NODE_TEMPLATE_ID_FOR_ATTR_TEST = "vdbe_untr_vmi"; private static final int ONE = 1; private static final int TWO = 2; private static final String NETWORK_ROLE_INOUT_ATTR_TEST = "untr"; diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/subInterfaceToInterfaceConnection/inoutattr/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/subInterfaceToInterfaceConnection/inoutattr/expectedoutputfiles/MainServiceTemplate.yaml index 8f9138efec..4ad572fd32 100644 --- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/subInterfaceToInterfaceConnection/inoutattr/expectedoutputfiles/MainServiceTemplate.yaml +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/subInterfaceToInterfaceConnection/inoutattr/expectedoutputfiles/MainServiceTemplate.yaml @@ -402,7 +402,7 @@ topology_template: get_input: vnf_name name: get_input: vdbe_name_1 - vdbe_untr_1_port: + vdbe_untr_vmi: type: org.openecomp.resource.cp.nodes.heat.contrailV2.VirtualMachineInterface properties: name: @@ -460,7 +460,7 @@ topology_template: get_input: vdbe_aap_untrusted_ip_prefix attr_test: get_attribute: - - vdbe_untr_1_port + - vdbe_untr_vmi - name aap_sec_untrusted_ip_prefix: get_input: vdbe_aap_sec_untrusted_ip_prefix @@ -488,7 +488,7 @@ topology_template: mandatory: false aap_untrusted_v6_ip_prefix: get_input: vdbe_aap_untrusted_v6_ip_prefix - parent_interface: vdbe_untr_1_port + parent_interface: vdbe_untr_vmi mac_address: get_input: vdbe_hw_untr_mac_1 vlan_tag_list: @@ -508,7 +508,7 @@ topology_template: relationship: tosca.relationships.network.LinksTo - binding_vdbe_0_subint_untr_vmi_0: capability: tosca.capabilities.network.Bindable - node: vdbe_untr_1_port + node: vdbe_untr_vmi relationship: tosca.relationships.network.BindsTo - dependency: capability: tosca.capabilities.Node @@ -541,7 +541,7 @@ topology_template: Version 2.0 02-09-2016 (Authors: John Doe, user PROD) members: - vdbe_node_1 - - vdbe_untr_1_port + - vdbe_untr_vmi - vdbe_untr_1_subports - control_int_net outputs: @@ -550,4 +550,4 @@ topology_template: value: get_attribute: - vdbe_untr_1_subports - - name + - name \ 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/subInterfaceToInterfaceConnection/inoutattr/inputfiles/main.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/subInterfaceToInterfaceConnection/inoutattr/inputfiles/main.yml index 45ff90d13f..3d1ce1a78a 100644 --- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/subInterfaceToInterfaceConnection/inoutattr/inputfiles/main.yml +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/subInterfaceToInterfaceConnection/inoutattr/inputfiles/main.yml @@ -113,7 +113,7 @@ resources: name: get_param: vdbe_name_1 networks: - - port: {get_resource: vdbe_untr_1_port} + - port: {get_resource: vdbe_untr_vmi} vdbe_untr_1_subports: type: OS::Heat::ResourceGroup depends_on: control_int_net @@ -123,7 +123,7 @@ resources: resource_def: type: nested.yml properties: - attr_test: { get_attr: [ vdbe_untr_1_port, name ] } + attr_test: { get_attr: [ vdbe_untr_vmi, name ] } aap_address_mode: get_param: aap_address_mode aap_sec_untrusted_ip_prefix: @@ -147,7 +147,7 @@ resources: mac_address: get_param: vdbe_hw_untr_mac_1 parent_interface: - get_resource: vdbe_untr_1_port + get_resource: vdbe_untr_vmi subinterfaces_name_prefix: str_replace: params: @@ -162,7 +162,7 @@ resources: get_param: vdbe_untrusted_vmac_address vdbe_subport_network: get_resource: control_int_net - vdbe_untr_1_port: + vdbe_untr_vmi: properties: name: str_replace: @@ -235,4 +235,4 @@ resources: outputs: out1: description: output_test - value: {get_attr: [vdbe_untr_1_subports, name]} \ No newline at end of file + value: {get_attr: [vdbe_untr_1_subports, name]} -- cgit 1.2.3-korg