From 51e051e86f9f5d10c9439e9e5e57d1e9ee8f8e06 Mon Sep 17 00:00:00 2001 From: ojasdubey Date: Thu, 22 Feb 2018 14:32:06 +0530 Subject: VLAN tagging - Pattern 1A, 1C1 1. Implementation for supporting VLAN tagging in Pattern 1A and 1C1 heats 2. Updated code for switch case refactor with command design pattern 3. Added unit tests and bug fixes Change-Id: I54938ffd6673f865b4506a890ec8e7b9c54597b1 Issue-ID: SDC-1036 Signed-off-by: ojasdubey --- .../expectedoutputfiles/MainServiceTemplate.yaml | 305 --------------------- .../hot_templateServiceTemplate.yaml | 149 ++++++++++ .../listNet/inputfiles/MANIFEST.json | 5 + .../listNet/inputfiles/base_hot_template.yml | 23 ++ .../listNet/inputfiles/hot_template.yml | 122 +-------- .../expectedoutputfiles/MainServiceTemplate.yaml | 135 --------- .../vmme_vlcServiceTemplate.yaml | 119 ++++++++ .../macAddressStaticValue/inputfiles/MANIFEST.json | 5 + .../inputfiles/base_vmme_vlc.yml | 51 ++++ .../expectedoutputfiles/MainServiceTemplate.yaml | 135 --------- .../vmme_vlcServiceTemplate.yaml | 119 ++++++++ .../inputfiles/MANIFEST.json | 5 + .../inputfiles/base_vmme_vlc.yml | 51 ++++ .../expectedoutputfiles/MainServiceTemplate.yaml | 147 ---------- .../vmme_vlcServiceTemplate.yaml | 173 ++++++++++++ .../inputfiles/MANIFEST.json | 5 + .../inputfiles/base_vmme_vlc.yml | 51 ++++ .../expectedoutputfiles/MainServiceTemplate.yaml | 136 --------- .../vmme_vlcServiceTemplate.yaml | 120 ++++++++ .../inputfiles/MANIFEST.json | 5 + .../inputfiles/base_vmme_vlc.yml | 51 ++++ .../expectedoutputfiles/MainServiceTemplate.yaml | 132 --------- .../vmme_vlcServiceTemplate.yaml | 116 ++++++++ .../inputfiles/MANIFEST.json | 5 + .../inputfiles/base_vmme_vlc.yml | 51 ++++ .../expectedoutputfiles/MainServiceTemplate.yaml | 256 ----------------- .../hot_templateServiceTemplate.yaml | 153 +++++++++++ .../oneNet/inputfiles/MANIFEST.json | 5 + .../oneNet/inputfiles/base_hot_template.yml | 23 ++ .../oneNet/inputfiles/hot_template.yml | 193 +++++-------- 30 files changed, 1347 insertions(+), 1499 deletions(-) delete mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/listNet/expectedoutputfiles/MainServiceTemplate.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/listNet/expectedoutputfiles/hot_templateServiceTemplate.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/listNet/inputfiles/base_hot_template.yml delete mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressStaticValue/expectedoutputfiles/MainServiceTemplate.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressStaticValue/expectedoutputfiles/vmme_vlcServiceTemplate.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressStaticValue/inputfiles/base_vmme_vlc.yml delete mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueInProperForm/expectedoutputfiles/MainServiceTemplate.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueInProperForm/expectedoutputfiles/vmme_vlcServiceTemplate.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueInProperForm/inputfiles/base_vmme_vlc.yml delete mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueMapOneItem/expectedoutputfiles/MainServiceTemplate.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueMapOneItem/expectedoutputfiles/vmme_vlcServiceTemplate.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueMapOneItem/inputfiles/base_vmme_vlc.yml delete mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueMapTwoItems/expectedoutputfiles/MainServiceTemplate.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueMapTwoItems/expectedoutputfiles/vmme_vlcServiceTemplate.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueMapTwoItems/inputfiles/base_vmme_vlc.yml delete mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueNotAList/expectedoutputfiles/MainServiceTemplate.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueNotAList/expectedoutputfiles/vmme_vlcServiceTemplate.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueNotAList/inputfiles/base_vmme_vlc.yml delete mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/oneNet/expectedoutputfiles/MainServiceTemplate.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/oneNet/expectedoutputfiles/hot_templateServiceTemplate.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/oneNet/inputfiles/base_hot_template.yml (limited to 'openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface') diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/listNet/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/listNet/expectedoutputfiles/MainServiceTemplate.yaml deleted file mode 100644 index e1965246f7..0000000000 --- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/listNet/expectedoutputfiles/MainServiceTemplate.yaml +++ /dev/null @@ -1,305 +0,0 @@ -tosca_definitions_version: tosca_simple_yaml_1_0_0 -metadata: - template_name: Main -imports: -- openecomp_heat_index: - file: openecomp-heat/_index.yml -topology_template: - inputs: - template_PortTuple_LB1: - hidden: false - immutable: false - annotations: - source: - type: org.openecomp.annotations.Source - properties: - vf_module_label: - - hot_template - source_type: HEAT - param_name: template_PortTuple_LB1 - type: string - description: dummy - lb_st_interface_type_oam: - hidden: false - immutable: false - annotations: - source: - type: org.openecomp.annotations.Source - properties: - vf_module_label: - - hot_template - source_type: HEAT - param_name: lb_st_interface_type_oam - type: string - description: dummy - oam_sec_group_name: - hidden: false - immutable: false - annotations: - source: - type: org.openecomp.annotations.Source - properties: - vf_module_label: - - hot_template - source_type: HEAT - param_name: oam_sec_group_name - type: string - description: dummy - nems_traffic_name: - hidden: false - immutable: false - annotations: - source: - type: org.openecomp.annotations.Source - properties: - vf_module_label: - - hot_template - source_type: HEAT - param_name: nems_traffic_name - type: string - description: dummy - network_ipam_refs_data_ipam_subnets_addr_from_start_true: - hidden: false - immutable: false - annotations: - source: - type: org.openecomp.annotations.Source - properties: - vf_module_label: - - hot_template - source_type: HEAT - param_name: network_ipam_refs_data_ipam_subnets_addr_from_start_true - type: string - description: dummy - network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2: - hidden: false - immutable: false - annotations: - source: - type: org.openecomp.annotations.Source - properties: - vf_module_label: - - hot_template - source_type: HEAT - param_name: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2 - type: string - description: dummy - jsa_net_name: - hidden: false - immutable: false - annotations: - source: - type: org.openecomp.annotations.Source - properties: - vf_module_label: - - hot_template - source_type: HEAT - param_name: jsa_net_name - type: string - description: dummy - network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2: - hidden: false - immutable: false - annotations: - source: - type: org.openecomp.annotations.Source - properties: - vf_module_label: - - hot_template - source_type: HEAT - param_name: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2 - type: string - description: dummy - node_templates: - jsa_net3: - type: org.openecomp.resource.vl.nodes.heat.network.contrailV2.VirtualNetwork - properties: - network_ipam_refs_data: - - network_ipam_refs_data_ipam_subnets: - - network_ipam_refs_data_ipam_subnets_subnet: - network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len: - get_input: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2 - network_ipam_refs_data_ipam_subnets_subnet_ip_prefix: - get_input: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2 - network_ipam_refs_data_ipam_subnets_addr_from_start: - get_input: network_ipam_refs_data_ipam_subnets_addr_from_start_true - network_name: aaa - template_VMInt_OAM_lb_5: - type: org.openecomp.resource.cp.nodes.heat.contrailV2.VirtualMachineInterface - properties: - security_group_refs: - - get_input: oam_sec_group_name - virtual_network_refs: [ - ] - virtual_machine_interface_properties: - service_interface_type: - get_input: lb_st_interface_type_oam - port_tuple_refs: - - get_input: template_PortTuple_LB1 - jsa_net2: - type: org.openecomp.resource.vl.nodes.heat.network.contrailV2.VirtualNetwork - properties: - network_ipam_refs_data: - - network_ipam_refs_data_ipam_subnets: - - network_ipam_refs_data_ipam_subnets_subnet: - network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len: - get_input: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2 - network_ipam_refs_data_ipam_subnets_subnet_ip_prefix: - get_input: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2 - network_ipam_refs_data_ipam_subnets_addr_from_start: - get_input: network_ipam_refs_data_ipam_subnets_addr_from_start_true - network_name: aaa - template_VMInt_OAM_lb_6: - type: org.openecomp.resource.cp.nodes.heat.contrailV2.VirtualMachineInterface - properties: - security_group_refs: - - get_input: oam_sec_group_name - virtual_network_refs: - get_attribute: - - jsa_net3 - - fq_name - virtual_machine_interface_properties: - service_interface_type: - get_input: lb_st_interface_type_oam - port_tuple_refs: - - get_input: template_PortTuple_LB1 - template_VMInt_OAM_lb_7: - type: org.openecomp.resource.cp.nodes.heat.contrailV2.VirtualMachineInterface - properties: - security_group_refs: - - get_input: oam_sec_group_name - virtual_machine_interface_properties: - service_interface_type: - get_input: lb_st_interface_type_oam - port_tuple_refs: - - get_input: template_PortTuple_LB1 - jsa_net5: - type: org.openecomp.resource.vl.nodes.heat.network.contrailV2.VirtualNetwork - properties: - network_ipam_refs_data: - - network_ipam_refs_data_ipam_subnets: - - network_ipam_refs_data_ipam_subnets_subnet: - network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len: - get_input: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2 - network_ipam_refs_data_ipam_subnets_subnet_ip_prefix: - get_input: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2 - network_ipam_refs_data_ipam_subnets_addr_from_start: - get_input: network_ipam_refs_data_ipam_subnets_addr_from_start_true - network_name: aaa - jsa_net4: - type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork - properties: - network_name: - get_input: nems_traffic_name - template_VMInt_OAM_lb_1: - type: org.openecomp.resource.cp.nodes.heat.contrailV2.VirtualMachineInterface - properties: - security_group_refs: - - get_input: oam_sec_group_name - virtual_network_refs: - - jsa_net1 - - jsa_net5 - virtual_machine_interface_properties: - service_interface_type: - get_input: lb_st_interface_type_oam - port_tuple_refs: - - get_input: template_PortTuple_LB1 - requirements: - - link: - capability: tosca.capabilities.network.Linkable - node: jsa_net1 - relationship: tosca.relationships.network.LinksTo - template_VMInt_OAM_lb_2: - type: org.openecomp.resource.cp.nodes.heat.contrailV2.VirtualMachineInterface - properties: - security_group_refs: - - get_input: oam_sec_group_name - virtual_network_refs: - - list_join: - - ':' - - get_attribute: - - jsa_net2 - - fq_name - - list_join: - - ':' - - get_attribute: - - jsa_net5 - - fq_name - virtual_machine_interface_properties: - service_interface_type: - get_input: lb_st_interface_type_oam - port_tuple_refs: - - get_input: template_PortTuple_LB1 - requirements: - - link: - capability: tosca.capabilities.network.Linkable - node: jsa_net2 - relationship: tosca.relationships.network.LinksTo - jsa_net1: - type: org.openecomp.resource.vl.nodes.heat.network.contrailV2.VirtualNetwork - properties: - network_ipam_refs_data: - - network_ipam_refs_data_ipam_subnets: - - network_ipam_refs_data_ipam_subnets_subnet: - network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len: - get_input: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2 - network_ipam_refs_data_ipam_subnets_subnet_ip_prefix: - get_input: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2 - network_ipam_refs_data_ipam_subnets_addr_from_start: - get_input: network_ipam_refs_data_ipam_subnets_addr_from_start_true - network_name: aaa - template_VMInt_OAM_lb_3: - type: org.openecomp.resource.cp.nodes.heat.contrailV2.VirtualMachineInterface - properties: - security_group_refs: - - get_input: oam_sec_group_name - virtual_network_refs: - - get_attribute: - - jsa_net3 - - fq_name - - get_attribute: - - jsa_net5 - - fq_name - virtual_machine_interface_properties: - service_interface_type: - get_input: lb_st_interface_type_oam - port_tuple_refs: - - get_input: template_PortTuple_LB1 - requirements: - - link: - capability: tosca.capabilities.network.Linkable - node: jsa_net3 - relationship: tosca.relationships.network.LinksTo - template_VMInt_OAM_lb_4: - type: org.openecomp.resource.cp.nodes.heat.contrailV2.VirtualMachineInterface - properties: - security_group_refs: - - get_input: oam_sec_group_name - virtual_network_refs: - - get_attribute: - - jsa_net4 - - fq_name - virtual_machine_interface_properties: - service_interface_type: - get_input: lb_st_interface_type_oam - port_tuple_refs: - - get_input: template_PortTuple_LB1 - groups: - hot_template_group: - type: org.openecomp.groups.heat.HeatStack - properties: - heat_file: ../Artifacts/hot_template.yml - description: cmaui server template for vMMSC - members: - - jsa_net3 - - template_VMInt_OAM_lb_5 - - jsa_net2 - - template_VMInt_OAM_lb_6 - - template_VMInt_OAM_lb_7 - - jsa_net5 - - jsa_net4 - - template_VMInt_OAM_lb_1 - - template_VMInt_OAM_lb_2 - - jsa_net1 - - template_VMInt_OAM_lb_3 - - template_VMInt_OAM_lb_4 diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/listNet/expectedoutputfiles/hot_templateServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/listNet/expectedoutputfiles/hot_templateServiceTemplate.yaml new file mode 100644 index 0000000000..84301a0312 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/listNet/expectedoutputfiles/hot_templateServiceTemplate.yaml @@ -0,0 +1,149 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: hot_template +imports: +- openecomp_heat_index: + file: openecomp-heat/_index.yml +- GlobalSubstitutionTypes: + file: GlobalSubstitutionTypesServiceTemplate.yaml +topology_template: + inputs: + template_PortTuple_LB1: + hidden: false + immutable: false + type: string + description: dummy + lb_st_interface_type_oam: + hidden: false + immutable: false + type: string + description: dummy + oam_sec_group_name: + hidden: false + immutable: false + type: string + description: dummy + nems_traffic_name: + hidden: false + immutable: false + type: string + description: dummy + network_ipam_refs_data_ipam_subnets_addr_from_start_true: + hidden: false + immutable: false + type: string + description: dummy + network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2: + hidden: false + immutable: false + type: string + description: dummy + jsa_net_name: + hidden: false + immutable: false + type: string + description: dummy + network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2: + hidden: false + immutable: false + type: string + description: dummy + node_templates: + template_VMInt_OAM_lb_1: + type: org.openecomp.resource.cp.nodes.heat.contrailV2.VirtualMachineInterface + properties: + security_group_refs: + - get_input: oam_sec_group_name + virtual_network_refs: + - jsa_net1 + - jsa_net1 + virtual_machine_interface_properties: + service_interface_type: + get_input: lb_st_interface_type_oam + port_tuple_refs: + - get_input: template_PortTuple_LB1 + requirements: + - link: + capability: tosca.capabilities.network.Linkable + node: jsa_net1 + relationship: tosca.relationships.network.LinksTo + jsa_net1: + type: org.openecomp.resource.vl.nodes.heat.network.contrailV2.VirtualNetwork + properties: + network_ipam_refs_data: + - network_ipam_refs_data_ipam_subnets: + - network_ipam_refs_data_ipam_subnets_subnet: + network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len: + get_input: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2 + network_ipam_refs_data_ipam_subnets_subnet_ip_prefix: + get_input: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2 + network_ipam_refs_data_ipam_subnets_addr_from_start: + get_input: network_ipam_refs_data_ipam_subnets_addr_from_start_true + network_name: aaa + groups: + hot_template_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/hot_template.yml + description: cmaui server template for vMMSC + members: + - template_VMInt_OAM_lb_1 + - jsa_net1 + substitution_mappings: + node_type: org.openecomp.resource.abstract.nodes.heat.hot_template + capabilities: + network.outpoing.packets_template_VMInt_OAM_lb_1: + - template_VMInt_OAM_lb_1 + - network.outpoing.packets + network.incoming.bytes.rate_template_VMInt_OAM_lb_1: + - template_VMInt_OAM_lb_1 + - network.incoming.bytes.rate + binding_template_VMInt_OAM_lb_1: + - template_VMInt_OAM_lb_1 + - binding + network.incoming.packets.rate_template_VMInt_OAM_lb_1: + - template_VMInt_OAM_lb_1 + - network.incoming.packets.rate + network.incoming.packets_template_VMInt_OAM_lb_1: + - template_VMInt_OAM_lb_1 + - network.incoming.packets + feature_template_VMInt_OAM_lb_1: + - template_VMInt_OAM_lb_1 + - feature + network.outgoing.packets.rate_template_VMInt_OAM_lb_1: + - template_VMInt_OAM_lb_1 + - network.outgoing.packets.rate + network.outgoing.bytes_template_VMInt_OAM_lb_1: + - template_VMInt_OAM_lb_1 + - network.outgoing.bytes + forwarder_template_VMInt_OAM_lb_1: + - template_VMInt_OAM_lb_1 + - forwarder + feature_jsa_net1: + - jsa_net1 + - feature + end_point_jsa_net1: + - jsa_net1 + - end_point + network.outgoing.bytes.rate_template_VMInt_OAM_lb_1: + - template_VMInt_OAM_lb_1 + - network.outgoing.bytes.rate + link_jsa_net1: + - jsa_net1 + - link + attachment_jsa_net1: + - jsa_net1 + - attachment + network.incoming.bytes_template_VMInt_OAM_lb_1: + - template_VMInt_OAM_lb_1 + - network.incoming.bytes + requirements: + binding_template_VMInt_OAM_lb_1: + - template_VMInt_OAM_lb_1 + - binding + dependency_template_VMInt_OAM_lb_1: + - template_VMInt_OAM_lb_1 + - dependency + dependency_jsa_net1: + - jsa_net1 + - dependency \ 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/contrailv2VMinterface/listNet/inputfiles/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/listNet/inputfiles/MANIFEST.json index 70cdc7d237..7b19bb8bdc 100644 --- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/listNet/inputfiles/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/listNet/inputfiles/MANIFEST.json @@ -3,6 +3,11 @@ "description": "HOT template to create 2 cinder volumes", "version": "2013-05-23", "data": [ + { + "isBase": true, + "file": "base_hot_template.yml", + "type": "HEAT" + }, { "file": "hot_template.yml", "type": "HEAT" diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/listNet/inputfiles/base_hot_template.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/listNet/inputfiles/base_hot_template.yml new file mode 100644 index 0000000000..afe369c6f3 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/listNet/inputfiles/base_hot_template.yml @@ -0,0 +1,23 @@ +heat_template_version: 2015-04-30 + +description: > + Module HOT template to create vmme 2 vlc + +parameters: + lb_st_interface_type_oam: + description: dummy + type: string + +resources: + template_VMInt_INT1_VLC: + type: OS::Heat::ResourceGroup + properties: + count: 3 + resource_def: + type: hot_template.yml + properties: + virtual_machine_interface_properties: + { + virtual_machine_interface_properties_service_interface_type: { get_param: lb_st_interface_type_oam }, + } + diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/listNet/inputfiles/hot_template.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/listNet/inputfiles/hot_template.yml index 46e80667ab..7b626ed8a4 100644 --- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/listNet/inputfiles/hot_template.yml +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/listNet/inputfiles/hot_template.yml @@ -36,131 +36,11 @@ resources: { virtual_machine_interface_properties_service_interface_type: { get_param: lb_st_interface_type_oam }, } - virtual_network_refs: [{ get_resource: jsa_net1 },{ get_resource: jsa_net5 }] + virtual_network_refs: [{ get_resource: jsa_net1 },{ get_resource: jsa_net1 }] port_tuple_refs: [{ get_param: template_PortTuple_LB1 }] security_group_refs: [{ get_param: oam_sec_group_name}] jsa_net1: - properties: - name: aaa - network_ipam_refs_data: - - - network_ipam_refs_data_ipam_subnets: - - - network_ipam_refs_data_ipam_subnets_addr_from_start: - get_param: network_ipam_refs_data_ipam_subnets_addr_from_start_true - network_ipam_refs_data_ipam_subnets_subnet: - network_ipam_refs_data_ipam_subnets_subnet_ip_prefix: - get_param: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2 - network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len: - get_param: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2 - type: "OS::ContrailV2::VirtualNetwork" - - template_VMInt_OAM_lb_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: [ { list_join: [':', { get_attr: [ jsa_net2, fq_name ] } ] },{ list_join: [':', { get_attr: [ jsa_net5, fq_name ] } ] }] - port_tuple_refs: [{ get_param: template_PortTuple_LB1 }] - security_group_refs: [{ get_param: oam_sec_group_name}] - - jsa_net2: - properties: - name: aaa - network_ipam_refs_data: - - - network_ipam_refs_data_ipam_subnets: - - - network_ipam_refs_data_ipam_subnets_addr_from_start: - get_param: network_ipam_refs_data_ipam_subnets_addr_from_start_true - network_ipam_refs_data_ipam_subnets_subnet: - network_ipam_refs_data_ipam_subnets_subnet_ip_prefix: - get_param: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2 - network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len: - get_param: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2 - type: "OS::ContrailV2::VirtualNetwork" - - template_VMInt_OAM_lb_3: - 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_attr: [ jsa_net3, fq_name ] } ,{ get_attr: [ jsa_net5, fq_name ] }] - port_tuple_refs: [{ get_param: template_PortTuple_LB1 }] - security_group_refs: [{ get_param: oam_sec_group_name}] - - jsa_net3: - properties: - name: aaa - network_ipam_refs_data: - - - network_ipam_refs_data_ipam_subnets: - - - network_ipam_refs_data_ipam_subnets_addr_from_start: - get_param: network_ipam_refs_data_ipam_subnets_addr_from_start_true - network_ipam_refs_data_ipam_subnets_subnet: - network_ipam_refs_data_ipam_subnets_subnet_ip_prefix: - get_param: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2 - network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len: - get_param: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2 - type: "OS::ContrailV2::VirtualNetwork" - - template_VMInt_OAM_lb_4: - 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_attr: [ jsa_net4, fq_name ] } ] # should not connect to contrail network - port_tuple_refs: [{ get_param: template_PortTuple_LB1 }] - security_group_refs: [{ get_param: oam_sec_group_name}] - - template_VMInt_OAM_lb_5: - 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: [] - port_tuple_refs: [{ get_param: template_PortTuple_LB1 }] - security_group_refs: [{ get_param: oam_sec_group_name}] - - template_VMInt_OAM_lb_6: - 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_attr: [ jsa_net3, fq_name ] } - port_tuple_refs: [{ get_param: template_PortTuple_LB1 }] - security_group_refs: [{ get_param: oam_sec_group_name}] - - - - template_VMInt_OAM_lb_7: - type: OS::ContrailV2::VirtualMachineInterface - properties: - virtual_machine_interface_properties: - { - virtual_machine_interface_properties_service_interface_type: { get_param: lb_st_interface_type_oam }, - } - port_tuple_refs: [{ get_param: template_PortTuple_LB1 }] - security_group_refs: [{ get_param: oam_sec_group_name}] - - jsa_net4: - type: OS::Contrail::VirtualNetwork - properties: - name: {get_param: nems_traffic_name} - - jsa_net5: properties: name: aaa network_ipam_refs_data: diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressStaticValue/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressStaticValue/expectedoutputfiles/MainServiceTemplate.yaml deleted file mode 100644 index 8aeffd48c3..0000000000 --- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressStaticValue/expectedoutputfiles/MainServiceTemplate.yaml +++ /dev/null @@ -1,135 +0,0 @@ -tosca_definitions_version: tosca_simple_yaml_1_0_0 -metadata: - template_name: Main -imports: -- openecomp_heat_index: - file: openecomp-heat/_index.yml -topology_template: - inputs: - vlc1_Internal2_mac: - hidden: false - immutable: false - annotations: - source: - type: org.openecomp.annotations.Source - properties: - vf_module_label: - - vmme_vlc - source_type: HEAT - param_name: vlc1_Internal2_mac - type: string - description: static mac address assigned to vlc1_Internal2 - internal_net_id_1: - hidden: false - immutable: false - annotations: - source: - type: org.openecomp.annotations.Source - properties: - vf_module_label: - - vmme_vlc - source_type: HEAT - param_name: internal_net_id_1 - type: string - description: UUID of Internal2_net - internal_net_id_0: - hidden: false - immutable: false - annotations: - source: - type: org.openecomp.annotations.Source - properties: - vf_module_label: - - vmme_vlc - source_type: HEAT - param_name: internal_net_id_0 - type: string - description: UUID of Internal1_net - security_group_int2_id: - hidden: false - immutable: false - annotations: - source: - type: org.openecomp.annotations.Source - properties: - vf_module_label: - - vmme_vlc - source_type: HEAT - param_name: security_group_int2_id - type: string - description: Security Group UUID for output - security_group_int1_id: - hidden: false - immutable: false - annotations: - source: - type: org.openecomp.annotations.Source - properties: - vf_module_label: - - vmme_vlc - source_type: HEAT - param_name: security_group_int1_id - type: string - description: Security Group UUID for output - vlc1_Internal1_mac: - hidden: false - immutable: false - annotations: - source: - type: org.openecomp.annotations.Source - properties: - vf_module_label: - - vmme_vlc - source_type: HEAT - param_name: vlc1_Internal1_mac - type: string - description: static mac address assigned to vlc1_Internal1 - vlc_st_interface_type_int1: - hidden: false - immutable: false - annotations: - source: - type: org.openecomp.annotations.Source - properties: - vf_module_label: - - vmme_vlc - source_type: HEAT - param_name: vlc_st_interface_type_int1 - type: string - description: service_interface_type for the ServiceTemplate - vlc_st_interface_type_int2: - hidden: false - immutable: false - annotations: - source: - type: org.openecomp.annotations.Source - properties: - vf_module_label: - - vmme_vlc - source_type: HEAT - param_name: vlc_st_interface_type_int2 - type: string - description: service_interface_type for the ServiceTemplate - node_templates: - template_VMInt_INT1_VLC_1: - type: org.openecomp.resource.cp.nodes.heat.contrailV2.VirtualMachineInterface - properties: - security_group_refs: - - get_input: security_group_int1_id - virtual_network_refs: - - get_input: internal_net_id_0 - virtual_machine_interface_properties: - service_interface_type: - get_input: vlc_st_interface_type_int1 - virtual_machine_interface_mac_addresses: - - get_input: vlc1_Internal1_mac - - abc - groups: - vmme_vlc_group: - type: org.openecomp.groups.heat.HeatStack - properties: - heat_file: ../Artifacts/vmme_vlc.yml - description: | - Module HOT template to create vmme 2 vlc - members: - - template_VMInt_INT1_VLC_1 diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressStaticValue/expectedoutputfiles/vmme_vlcServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressStaticValue/expectedoutputfiles/vmme_vlcServiceTemplate.yaml new file mode 100644 index 0000000000..7d30878434 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressStaticValue/expectedoutputfiles/vmme_vlcServiceTemplate.yaml @@ -0,0 +1,119 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: vmme_vlc +imports: +- openecomp_heat_index: + file: openecomp-heat/_index.yml +- GlobalSubstitutionTypes: + file: GlobalSubstitutionTypesServiceTemplate.yaml +topology_template: + inputs: + vlc1_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc1_Internal2 + internal_net_id_1: + hidden: false + immutable: false + type: string + description: UUID of Internal2_net + internal_net_id_0: + hidden: false + immutable: false + type: string + description: UUID of Internal1_net + security_group_int2_id: + hidden: false + immutable: false + type: string + description: Security Group UUID for output + security_group_int1_id: + hidden: false + immutable: false + type: string + description: Security Group UUID for output + vlc1_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc1_Internal1 + vlc_st_interface_type_int1: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + vlc_st_interface_type_int2: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + node_templates: + template_VMInt_INT1_VLC_1: + type: org.openecomp.resource.cp.nodes.heat.contrailV2.VirtualMachineInterface + properties: + security_group_refs: + - get_input: security_group_int1_id + virtual_network_refs: + - get_input: internal_net_id_0 + virtual_machine_interface_properties: + service_interface_type: + get_input: vlc_st_interface_type_int1 + virtual_machine_interface_mac_addresses: + - get_input: vlc1_Internal1_mac + - abc + groups: + vmme_vlc_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/vmme_vlc.yml + description: | + Module HOT template to create vmme 2 vlc + members: + - template_VMInt_INT1_VLC_1 + substitution_mappings: + node_type: org.openecomp.resource.abstract.nodes.heat.vmme_vlc + capabilities: + network.outgoing.packets.rate_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - network.outgoing.packets.rate + network.outpoing.packets_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - network.outpoing.packets + network.incoming.packets_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - network.incoming.packets + feature_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - feature + network.incoming.packets.rate_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - network.incoming.packets.rate + network.outgoing.bytes_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - network.outgoing.bytes + network.incoming.bytes_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - network.incoming.bytes + network.outgoing.bytes.rate_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - network.outgoing.bytes.rate + forwarder_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - forwarder + binding_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - binding + network.incoming.bytes.rate_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - network.incoming.bytes.rate + requirements: + dependency_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - dependency + link_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - link + binding_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - binding diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressStaticValue/inputfiles/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressStaticValue/inputfiles/MANIFEST.json index 93bb84803b..3122249504 100644 --- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressStaticValue/inputfiles/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressStaticValue/inputfiles/MANIFEST.json @@ -3,6 +3,11 @@ "description": "Desc", "version": "0.1", "data": [ + { + "isBase": true, + "file": "base_vmme_vlc.yml", + "type": "HEAT" + }, { "isBase": false, "file": "vmme_vlc.yml", diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressStaticValue/inputfiles/base_vmme_vlc.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressStaticValue/inputfiles/base_vmme_vlc.yml new file mode 100644 index 0000000000..79bc9b1aee --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressStaticValue/inputfiles/base_vmme_vlc.yml @@ -0,0 +1,51 @@ +heat_template_version: 2015-04-30 + +description: > + Module HOT template to create vmme 2 vlc + +parameters: + vlc1_Internal1_mac: + type: string + description: static mac address assigned to vlc1_Internal1 + vlc1_Internal2_mac: + type: string + description: static mac address assigned to vlc1_Internal2 + vlc_st_interface_type_int1: + type: string + description: service_interface_type for the ServiceTemplate + vlc_st_interface_type_int2: + type: string + description: service_interface_type for the ServiceTemplate + internal_net_id_0: + type: string + description: UUID of Internal1_net + internal_net_id_1: + type: string + description: UUID of Internal2_net + security_group_int1_id: + type: string + description: Security Group UUID for output + security_group_int2_id: + type: string + description: Security Group UUID for output + +resources: + + template_VMInt_INT1_VLC: + type: OS::Heat::ResourceGroup + properties: + count: 3 + resource_def: + type: vmme_vlc.yml + properties: + virtual_machine_interface_properties: + { + virtual_machine_interface_properties_service_interface_type: { get_param: vlc_st_interface_type_int1 } + } + virtual_network_refs: [{ get_param: internal_net_id_0}] + virtual_machine_interface_mac_addresses: + { + virtual_machine_interface_mac_addresses_mac_address: [{ get_param: vlc1_Internal1_mac }, "abc"] + } + security_group_refs: [{get_param: security_group_int1_id}] + diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueInProperForm/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueInProperForm/expectedoutputfiles/MainServiceTemplate.yaml deleted file mode 100644 index 8aeffd48c3..0000000000 --- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueInProperForm/expectedoutputfiles/MainServiceTemplate.yaml +++ /dev/null @@ -1,135 +0,0 @@ -tosca_definitions_version: tosca_simple_yaml_1_0_0 -metadata: - template_name: Main -imports: -- openecomp_heat_index: - file: openecomp-heat/_index.yml -topology_template: - inputs: - vlc1_Internal2_mac: - hidden: false - immutable: false - annotations: - source: - type: org.openecomp.annotations.Source - properties: - vf_module_label: - - vmme_vlc - source_type: HEAT - param_name: vlc1_Internal2_mac - type: string - description: static mac address assigned to vlc1_Internal2 - internal_net_id_1: - hidden: false - immutable: false - annotations: - source: - type: org.openecomp.annotations.Source - properties: - vf_module_label: - - vmme_vlc - source_type: HEAT - param_name: internal_net_id_1 - type: string - description: UUID of Internal2_net - internal_net_id_0: - hidden: false - immutable: false - annotations: - source: - type: org.openecomp.annotations.Source - properties: - vf_module_label: - - vmme_vlc - source_type: HEAT - param_name: internal_net_id_0 - type: string - description: UUID of Internal1_net - security_group_int2_id: - hidden: false - immutable: false - annotations: - source: - type: org.openecomp.annotations.Source - properties: - vf_module_label: - - vmme_vlc - source_type: HEAT - param_name: security_group_int2_id - type: string - description: Security Group UUID for output - security_group_int1_id: - hidden: false - immutable: false - annotations: - source: - type: org.openecomp.annotations.Source - properties: - vf_module_label: - - vmme_vlc - source_type: HEAT - param_name: security_group_int1_id - type: string - description: Security Group UUID for output - vlc1_Internal1_mac: - hidden: false - immutable: false - annotations: - source: - type: org.openecomp.annotations.Source - properties: - vf_module_label: - - vmme_vlc - source_type: HEAT - param_name: vlc1_Internal1_mac - type: string - description: static mac address assigned to vlc1_Internal1 - vlc_st_interface_type_int1: - hidden: false - immutable: false - annotations: - source: - type: org.openecomp.annotations.Source - properties: - vf_module_label: - - vmme_vlc - source_type: HEAT - param_name: vlc_st_interface_type_int1 - type: string - description: service_interface_type for the ServiceTemplate - vlc_st_interface_type_int2: - hidden: false - immutable: false - annotations: - source: - type: org.openecomp.annotations.Source - properties: - vf_module_label: - - vmme_vlc - source_type: HEAT - param_name: vlc_st_interface_type_int2 - type: string - description: service_interface_type for the ServiceTemplate - node_templates: - template_VMInt_INT1_VLC_1: - type: org.openecomp.resource.cp.nodes.heat.contrailV2.VirtualMachineInterface - properties: - security_group_refs: - - get_input: security_group_int1_id - virtual_network_refs: - - get_input: internal_net_id_0 - virtual_machine_interface_properties: - service_interface_type: - get_input: vlc_st_interface_type_int1 - virtual_machine_interface_mac_addresses: - - get_input: vlc1_Internal1_mac - - abc - groups: - vmme_vlc_group: - type: org.openecomp.groups.heat.HeatStack - properties: - heat_file: ../Artifacts/vmme_vlc.yml - description: | - Module HOT template to create vmme 2 vlc - members: - - template_VMInt_INT1_VLC_1 diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueInProperForm/expectedoutputfiles/vmme_vlcServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueInProperForm/expectedoutputfiles/vmme_vlcServiceTemplate.yaml new file mode 100644 index 0000000000..c6562aae37 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueInProperForm/expectedoutputfiles/vmme_vlcServiceTemplate.yaml @@ -0,0 +1,119 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: vmme_vlc +imports: +- openecomp_heat_index: + file: openecomp-heat/_index.yml +- GlobalSubstitutionTypes: + file: GlobalSubstitutionTypesServiceTemplate.yaml +topology_template: + inputs: + vlc1_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc1_Internal2 + internal_net_id_1: + hidden: false + immutable: false + type: string + description: UUID of Internal2_net + internal_net_id_0: + hidden: false + immutable: false + type: string + description: UUID of Internal1_net + security_group_int2_id: + hidden: false + immutable: false + type: string + description: Security Group UUID for output + security_group_int1_id: + hidden: false + immutable: false + type: string + description: Security Group UUID for output + vlc1_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc1_Internal1 + vlc_st_interface_type_int1: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + vlc_st_interface_type_int2: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + node_templates: + template_VMInt_INT1_VLC_1: + type: org.openecomp.resource.cp.nodes.heat.contrailV2.VirtualMachineInterface + properties: + security_group_refs: + - get_input: security_group_int1_id + virtual_network_refs: + - get_input: internal_net_id_0 + virtual_machine_interface_properties: + service_interface_type: + get_input: vlc_st_interface_type_int1 + virtual_machine_interface_mac_addresses: + - get_input: vlc1_Internal1_mac + - abc + groups: + vmme_vlc_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/vmme_vlc.yml + description: | + Module HOT template to create vmme 2 vlc + members: + - template_VMInt_INT1_VLC_1 + substitution_mappings: + node_type: org.openecomp.resource.abstract.nodes.heat.vmme_vlc + capabilities: + network.outgoing.packets.rate_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - network.outgoing.packets.rate + network.outpoing.packets_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - network.outpoing.packets + network.incoming.packets_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - network.incoming.packets + feature_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - feature + network.incoming.packets.rate_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - network.incoming.packets.rate + network.outgoing.bytes_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - network.outgoing.bytes + network.incoming.bytes_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - network.incoming.bytes + network.outgoing.bytes.rate_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - network.outgoing.bytes.rate + forwarder_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - forwarder + binding_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - binding + network.incoming.bytes.rate_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - network.incoming.bytes.rate + requirements: + dependency_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - dependency + link_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - link + binding_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - binding \ 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/contrailv2VMinterface/macAddressesValueInProperForm/inputfiles/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueInProperForm/inputfiles/MANIFEST.json index 93bb84803b..3122249504 100644 --- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueInProperForm/inputfiles/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueInProperForm/inputfiles/MANIFEST.json @@ -3,6 +3,11 @@ "description": "Desc", "version": "0.1", "data": [ + { + "isBase": true, + "file": "base_vmme_vlc.yml", + "type": "HEAT" + }, { "isBase": false, "file": "vmme_vlc.yml", diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueInProperForm/inputfiles/base_vmme_vlc.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueInProperForm/inputfiles/base_vmme_vlc.yml new file mode 100644 index 0000000000..79bc9b1aee --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueInProperForm/inputfiles/base_vmme_vlc.yml @@ -0,0 +1,51 @@ +heat_template_version: 2015-04-30 + +description: > + Module HOT template to create vmme 2 vlc + +parameters: + vlc1_Internal1_mac: + type: string + description: static mac address assigned to vlc1_Internal1 + vlc1_Internal2_mac: + type: string + description: static mac address assigned to vlc1_Internal2 + vlc_st_interface_type_int1: + type: string + description: service_interface_type for the ServiceTemplate + vlc_st_interface_type_int2: + type: string + description: service_interface_type for the ServiceTemplate + internal_net_id_0: + type: string + description: UUID of Internal1_net + internal_net_id_1: + type: string + description: UUID of Internal2_net + security_group_int1_id: + type: string + description: Security Group UUID for output + security_group_int2_id: + type: string + description: Security Group UUID for output + +resources: + + template_VMInt_INT1_VLC: + type: OS::Heat::ResourceGroup + properties: + count: 3 + resource_def: + type: vmme_vlc.yml + properties: + virtual_machine_interface_properties: + { + virtual_machine_interface_properties_service_interface_type: { get_param: vlc_st_interface_type_int1 } + } + virtual_network_refs: [{ get_param: internal_net_id_0}] + virtual_machine_interface_mac_addresses: + { + virtual_machine_interface_mac_addresses_mac_address: [{ get_param: vlc1_Internal1_mac }, "abc"] + } + security_group_refs: [{get_param: security_group_int1_id}] + diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueMapOneItem/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueMapOneItem/expectedoutputfiles/MainServiceTemplate.yaml deleted file mode 100644 index 977f6a6e57..0000000000 --- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueMapOneItem/expectedoutputfiles/MainServiceTemplate.yaml +++ /dev/null @@ -1,147 +0,0 @@ -tosca_definitions_version: tosca_simple_yaml_1_0_0 -metadata: - template_name: Main -imports: -- openecomp_heat_index: - file: openecomp-heat/_index.yml -topology_template: - inputs: - vlc1_Internal2_mac: - hidden: false - immutable: false - annotations: - source: - type: org.openecomp.annotations.Source - properties: - vf_module_label: - - vmme_vlc - source_type: HEAT - param_name: vlc1_Internal2_mac - type: string - description: static mac address assigned to vlc1_Internal2 - internal_net_id_1: - hidden: false - immutable: false - annotations: - source: - type: org.openecomp.annotations.Source - properties: - vf_module_label: - - vmme_vlc - source_type: HEAT - param_name: internal_net_id_1 - type: string - description: UUID of Internal2_net - internal_net_id_0: - hidden: false - immutable: false - annotations: - source: - type: org.openecomp.annotations.Source - properties: - vf_module_label: - - vmme_vlc - source_type: HEAT - param_name: internal_net_id_0 - type: string - description: UUID of Internal1_net - security_group_int2_id: - hidden: false - immutable: false - annotations: - source: - type: org.openecomp.annotations.Source - properties: - vf_module_label: - - vmme_vlc - source_type: HEAT - param_name: security_group_int2_id - type: string - description: Security Group UUID for output - security_group_int1_id: - hidden: false - immutable: false - annotations: - source: - type: org.openecomp.annotations.Source - properties: - vf_module_label: - - vmme_vlc - source_type: HEAT - param_name: security_group_int1_id - type: string - description: Security Group UUID for output - vlc1_Internal1_mac: - hidden: false - immutable: false - annotations: - source: - type: org.openecomp.annotations.Source - properties: - vf_module_label: - - vmme_vlc - source_type: HEAT - param_name: vlc1_Internal1_mac - type: string - description: static mac address assigned to vlc1_Internal1 - vlc_st_interface_type_int1: - hidden: false - immutable: false - annotations: - source: - type: org.openecomp.annotations.Source - properties: - vf_module_label: - - vmme_vlc - source_type: HEAT - param_name: vlc_st_interface_type_int1 - type: string - description: service_interface_type for the ServiceTemplate - vlc_st_interface_type_int2: - hidden: false - immutable: false - annotations: - source: - type: org.openecomp.annotations.Source - properties: - vf_module_label: - - vmme_vlc - source_type: HEAT - param_name: vlc_st_interface_type_int2 - type: string - description: service_interface_type for the ServiceTemplate - node_templates: - template_VMInt_INT2_VLC_1: - type: org.openecomp.resource.cp.nodes.heat.contrailV2.VirtualMachineInterface - properties: - security_group_refs: - - get_input: security_group_int2_id - virtual_network_refs: - - get_input: internal_net_id_1 - virtual_machine_interface_properties: - service_interface_type: - get_input: vlc_st_interface_type_int2 - virtual_machine_interface_mac_addresses: - - get_input: vlc1_Internal2_mac - template_VMInt_INT1_VLC_1: - type: org.openecomp.resource.cp.nodes.heat.contrailV2.VirtualMachineInterface - properties: - security_group_refs: - - get_input: security_group_int1_id - virtual_network_refs: - - get_input: internal_net_id_0 - virtual_machine_interface_properties: - service_interface_type: - get_input: vlc_st_interface_type_int1 - virtual_machine_interface_mac_addresses: - - get_input: vlc1_Internal1_mac - groups: - vmme_vlc_group: - type: org.openecomp.groups.heat.HeatStack - properties: - heat_file: ../Artifacts/vmme_vlc.yml - description: | - Module HOT template to create vmme 2 vlc - members: - - template_VMInt_INT2_VLC_1 - - template_VMInt_INT1_VLC_1 diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueMapOneItem/expectedoutputfiles/vmme_vlcServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueMapOneItem/expectedoutputfiles/vmme_vlcServiceTemplate.yaml new file mode 100644 index 0000000000..80763b5c6a --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueMapOneItem/expectedoutputfiles/vmme_vlcServiceTemplate.yaml @@ -0,0 +1,173 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: vmme_vlc +imports: +- openecomp_heat_index: + file: openecomp-heat/_index.yml +- GlobalSubstitutionTypes: + file: GlobalSubstitutionTypesServiceTemplate.yaml +topology_template: + inputs: + vlc1_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc1_Internal2 + internal_net_id_1: + hidden: false + immutable: false + type: string + description: UUID of Internal2_net + internal_net_id_0: + hidden: false + immutable: false + type: string + description: UUID of Internal1_net + security_group_int2_id: + hidden: false + immutable: false + type: string + description: Security Group UUID for output + security_group_int1_id: + hidden: false + immutable: false + type: string + description: Security Group UUID for output + vlc1_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc1_Internal1 + vlc_st_interface_type_int1: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + vlc_st_interface_type_int2: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + node_templates: + template_VMInt_INT2_VLC_1: + type: org.openecomp.resource.cp.nodes.heat.contrailV2.VirtualMachineInterface + properties: + security_group_refs: + - get_input: security_group_int2_id + virtual_network_refs: + - get_input: internal_net_id_1 + virtual_machine_interface_properties: + service_interface_type: + get_input: vlc_st_interface_type_int2 + virtual_machine_interface_mac_addresses: + - get_input: vlc1_Internal2_mac + template_VMInt_INT1_VLC_1: + type: org.openecomp.resource.cp.nodes.heat.contrailV2.VirtualMachineInterface + properties: + security_group_refs: + - get_input: security_group_int1_id + virtual_network_refs: + - get_input: internal_net_id_0 + virtual_machine_interface_properties: + service_interface_type: + get_input: vlc_st_interface_type_int1 + virtual_machine_interface_mac_addresses: + - get_input: vlc1_Internal1_mac + groups: + vmme_vlc_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/vmme_vlc.yml + description: | + Module HOT template to create vmme 2 vlc + members: + - template_VMInt_INT2_VLC_1 + - template_VMInt_INT1_VLC_1 + substitution_mappings: + node_type: org.openecomp.resource.abstract.nodes.heat.vmme_vlc + capabilities: + network.incoming.bytes.rate_template_VMInt_INT2_VLC_1: + - template_VMInt_INT2_VLC_1 + - network.incoming.bytes.rate + network.incoming.packets.rate_template_VMInt_INT2_VLC_1: + - template_VMInt_INT2_VLC_1 + - network.incoming.packets.rate + network.outpoing.packets_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - network.outpoing.packets + network.incoming.packets.rate_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - network.incoming.packets.rate + network.outgoing.bytes_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - network.outgoing.bytes + network.incoming.bytes_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - network.incoming.bytes + network.outgoing.bytes.rate_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - network.outgoing.bytes.rate + network.outpoing.packets_template_VMInt_INT2_VLC_1: + - template_VMInt_INT2_VLC_1 + - network.outpoing.packets + network.outgoing.bytes_template_VMInt_INT2_VLC_1: + - template_VMInt_INT2_VLC_1 + - network.outgoing.bytes + forwarder_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - forwarder + binding_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - binding + network.incoming.bytes.rate_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - network.incoming.bytes.rate + network.outgoing.bytes.rate_template_VMInt_INT2_VLC_1: + - template_VMInt_INT2_VLC_1 + - network.outgoing.bytes.rate + network.incoming.bytes_template_VMInt_INT2_VLC_1: + - template_VMInt_INT2_VLC_1 + - network.incoming.bytes + binding_template_VMInt_INT2_VLC_1: + - template_VMInt_INT2_VLC_1 + - binding + network.outgoing.packets.rate_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - network.outgoing.packets.rate + network.incoming.packets_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - network.incoming.packets + forwarder_template_VMInt_INT2_VLC_1: + - template_VMInt_INT2_VLC_1 + - forwarder + feature_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - feature + network.incoming.packets_template_VMInt_INT2_VLC_1: + - template_VMInt_INT2_VLC_1 + - network.incoming.packets + network.outgoing.packets.rate_template_VMInt_INT2_VLC_1: + - template_VMInt_INT2_VLC_1 + - network.outgoing.packets.rate + feature_template_VMInt_INT2_VLC_1: + - template_VMInt_INT2_VLC_1 + - feature + requirements: + dependency_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - dependency + binding_template_VMInt_INT2_VLC_1: + - template_VMInt_INT2_VLC_1 + - binding + link_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - link + dependency_template_VMInt_INT2_VLC_1: + - template_VMInt_INT2_VLC_1 + - dependency + link_template_VMInt_INT2_VLC_1: + - template_VMInt_INT2_VLC_1 + - link + binding_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - binding diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueMapOneItem/inputfiles/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueMapOneItem/inputfiles/MANIFEST.json index 93bb84803b..3122249504 100644 --- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueMapOneItem/inputfiles/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueMapOneItem/inputfiles/MANIFEST.json @@ -3,6 +3,11 @@ "description": "Desc", "version": "0.1", "data": [ + { + "isBase": true, + "file": "base_vmme_vlc.yml", + "type": "HEAT" + }, { "isBase": false, "file": "vmme_vlc.yml", diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueMapOneItem/inputfiles/base_vmme_vlc.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueMapOneItem/inputfiles/base_vmme_vlc.yml new file mode 100644 index 0000000000..79bc9b1aee --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueMapOneItem/inputfiles/base_vmme_vlc.yml @@ -0,0 +1,51 @@ +heat_template_version: 2015-04-30 + +description: > + Module HOT template to create vmme 2 vlc + +parameters: + vlc1_Internal1_mac: + type: string + description: static mac address assigned to vlc1_Internal1 + vlc1_Internal2_mac: + type: string + description: static mac address assigned to vlc1_Internal2 + vlc_st_interface_type_int1: + type: string + description: service_interface_type for the ServiceTemplate + vlc_st_interface_type_int2: + type: string + description: service_interface_type for the ServiceTemplate + internal_net_id_0: + type: string + description: UUID of Internal1_net + internal_net_id_1: + type: string + description: UUID of Internal2_net + security_group_int1_id: + type: string + description: Security Group UUID for output + security_group_int2_id: + type: string + description: Security Group UUID for output + +resources: + + template_VMInt_INT1_VLC: + type: OS::Heat::ResourceGroup + properties: + count: 3 + resource_def: + type: vmme_vlc.yml + properties: + virtual_machine_interface_properties: + { + virtual_machine_interface_properties_service_interface_type: { get_param: vlc_st_interface_type_int1 } + } + virtual_network_refs: [{ get_param: internal_net_id_0}] + virtual_machine_interface_mac_addresses: + { + virtual_machine_interface_mac_addresses_mac_address: [{ get_param: vlc1_Internal1_mac }, "abc"] + } + security_group_refs: [{get_param: security_group_int1_id}] + diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueMapTwoItems/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueMapTwoItems/expectedoutputfiles/MainServiceTemplate.yaml deleted file mode 100644 index 6d84ffec48..0000000000 --- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueMapTwoItems/expectedoutputfiles/MainServiceTemplate.yaml +++ /dev/null @@ -1,136 +0,0 @@ -tosca_definitions_version: tosca_simple_yaml_1_0_0 -metadata: - template_name: Main -imports: -- openecomp_heat_index: - file: openecomp-heat/_index.yml -topology_template: - inputs: - vlc1_Internal2_mac: - hidden: false - immutable: false - annotations: - source: - type: org.openecomp.annotations.Source - properties: - vf_module_label: - - vmme_vlc - source_type: HEAT - param_name: vlc1_Internal2_mac - type: string - description: static mac address assigned to vlc1_Internal2 - internal_net_id_1: - hidden: false - immutable: false - annotations: - source: - type: org.openecomp.annotations.Source - properties: - vf_module_label: - - vmme_vlc - source_type: HEAT - param_name: internal_net_id_1 - type: string - description: UUID of Internal2_net - internal_net_id_0: - hidden: false - immutable: false - annotations: - source: - type: org.openecomp.annotations.Source - properties: - vf_module_label: - - vmme_vlc - source_type: HEAT - param_name: internal_net_id_0 - type: string - description: UUID of Internal1_net - security_group_int2_id: - hidden: false - immutable: false - annotations: - source: - type: org.openecomp.annotations.Source - properties: - vf_module_label: - - vmme_vlc - source_type: HEAT - param_name: security_group_int2_id - type: string - description: Security Group UUID for output - security_group_int1_id: - hidden: false - immutable: false - annotations: - source: - type: org.openecomp.annotations.Source - properties: - vf_module_label: - - vmme_vlc - source_type: HEAT - param_name: security_group_int1_id - type: string - description: Security Group UUID for output - vlc1_Internal1_mac: - hidden: false - immutable: false - annotations: - source: - type: org.openecomp.annotations.Source - properties: - vf_module_label: - - vmme_vlc - source_type: HEAT - param_name: vlc1_Internal1_mac - type: string - description: static mac address assigned to vlc1_Internal1 - vlc_st_interface_type_int1: - hidden: false - immutable: false - annotations: - source: - type: org.openecomp.annotations.Source - properties: - vf_module_label: - - vmme_vlc - source_type: HEAT - param_name: vlc_st_interface_type_int1 - type: string - description: service_interface_type for the ServiceTemplate - vlc_st_interface_type_int2: - hidden: false - immutable: false - annotations: - source: - type: org.openecomp.annotations.Source - properties: - vf_module_label: - - vmme_vlc - source_type: HEAT - param_name: vlc_st_interface_type_int2 - type: string - description: service_interface_type for the ServiceTemplate - node_templates: - template_VMInt_INT1_VLC_1: - type: org.openecomp.resource.cp.nodes.heat.contrailV2.VirtualMachineInterface - properties: - security_group_refs: - - get_input: security_group_int1_id - virtual_network_refs: - - get_input: internal_net_id_0 - virtual_machine_interface_properties: - service_interface_type: - get_input: vlc_st_interface_type_int1 - virtual_machine_interface_mac_addresses: - - get_input: vlc1_Internal1_mac - - get_input: vlc1_Internal2_mac - - abc - groups: - vmme_vlc_group: - type: org.openecomp.groups.heat.HeatStack - properties: - heat_file: ../Artifacts/vmme_vlc.yml - description: | - Module HOT template to create vmme 2 vlc - members: - - template_VMInt_INT1_VLC_1 diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueMapTwoItems/expectedoutputfiles/vmme_vlcServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueMapTwoItems/expectedoutputfiles/vmme_vlcServiceTemplate.yaml new file mode 100644 index 0000000000..1d9f79e7e4 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueMapTwoItems/expectedoutputfiles/vmme_vlcServiceTemplate.yaml @@ -0,0 +1,120 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: vmme_vlc +imports: +- openecomp_heat_index: + file: openecomp-heat/_index.yml +- GlobalSubstitutionTypes: + file: GlobalSubstitutionTypesServiceTemplate.yaml +topology_template: + inputs: + vlc1_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc1_Internal2 + internal_net_id_1: + hidden: false + immutable: false + type: string + description: UUID of Internal2_net + internal_net_id_0: + hidden: false + immutable: false + type: string + description: UUID of Internal1_net + security_group_int2_id: + hidden: false + immutable: false + type: string + description: Security Group UUID for output + security_group_int1_id: + hidden: false + immutable: false + type: string + description: Security Group UUID for output + vlc1_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc1_Internal1 + vlc_st_interface_type_int1: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + vlc_st_interface_type_int2: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + node_templates: + template_VMInt_INT1_VLC_1: + type: org.openecomp.resource.cp.nodes.heat.contrailV2.VirtualMachineInterface + properties: + security_group_refs: + - get_input: security_group_int1_id + virtual_network_refs: + - get_input: internal_net_id_0 + virtual_machine_interface_properties: + service_interface_type: + get_input: vlc_st_interface_type_int1 + virtual_machine_interface_mac_addresses: + - get_input: vlc1_Internal1_mac + - get_input: vlc1_Internal2_mac + - abc + groups: + vmme_vlc_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/vmme_vlc.yml + description: | + Module HOT template to create vmme 2 vlc + members: + - template_VMInt_INT1_VLC_1 + substitution_mappings: + node_type: org.openecomp.resource.abstract.nodes.heat.vmme_vlc + capabilities: + network.outgoing.packets.rate_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - network.outgoing.packets.rate + network.outpoing.packets_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - network.outpoing.packets + network.incoming.packets_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - network.incoming.packets + feature_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - feature + network.incoming.packets.rate_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - network.incoming.packets.rate + network.outgoing.bytes_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - network.outgoing.bytes + network.incoming.bytes_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - network.incoming.bytes + network.outgoing.bytes.rate_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - network.outgoing.bytes.rate + forwarder_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - forwarder + binding_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - binding + network.incoming.bytes.rate_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - network.incoming.bytes.rate + requirements: + dependency_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - dependency + link_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - link + binding_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - binding \ 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/contrailv2VMinterface/macAddressesValueMapTwoItems/inputfiles/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueMapTwoItems/inputfiles/MANIFEST.json index 93bb84803b..3122249504 100644 --- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueMapTwoItems/inputfiles/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueMapTwoItems/inputfiles/MANIFEST.json @@ -3,6 +3,11 @@ "description": "Desc", "version": "0.1", "data": [ + { + "isBase": true, + "file": "base_vmme_vlc.yml", + "type": "HEAT" + }, { "isBase": false, "file": "vmme_vlc.yml", diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueMapTwoItems/inputfiles/base_vmme_vlc.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueMapTwoItems/inputfiles/base_vmme_vlc.yml new file mode 100644 index 0000000000..79bc9b1aee --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueMapTwoItems/inputfiles/base_vmme_vlc.yml @@ -0,0 +1,51 @@ +heat_template_version: 2015-04-30 + +description: > + Module HOT template to create vmme 2 vlc + +parameters: + vlc1_Internal1_mac: + type: string + description: static mac address assigned to vlc1_Internal1 + vlc1_Internal2_mac: + type: string + description: static mac address assigned to vlc1_Internal2 + vlc_st_interface_type_int1: + type: string + description: service_interface_type for the ServiceTemplate + vlc_st_interface_type_int2: + type: string + description: service_interface_type for the ServiceTemplate + internal_net_id_0: + type: string + description: UUID of Internal1_net + internal_net_id_1: + type: string + description: UUID of Internal2_net + security_group_int1_id: + type: string + description: Security Group UUID for output + security_group_int2_id: + type: string + description: Security Group UUID for output + +resources: + + template_VMInt_INT1_VLC: + type: OS::Heat::ResourceGroup + properties: + count: 3 + resource_def: + type: vmme_vlc.yml + properties: + virtual_machine_interface_properties: + { + virtual_machine_interface_properties_service_interface_type: { get_param: vlc_st_interface_type_int1 } + } + virtual_network_refs: [{ get_param: internal_net_id_0}] + virtual_machine_interface_mac_addresses: + { + virtual_machine_interface_mac_addresses_mac_address: [{ get_param: vlc1_Internal1_mac }, "abc"] + } + security_group_refs: [{get_param: security_group_int1_id}] + diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueNotAList/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueNotAList/expectedoutputfiles/MainServiceTemplate.yaml deleted file mode 100644 index c17f56efc8..0000000000 --- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueNotAList/expectedoutputfiles/MainServiceTemplate.yaml +++ /dev/null @@ -1,132 +0,0 @@ -tosca_definitions_version: tosca_simple_yaml_1_0_0 -metadata: - template_name: Main -imports: -- openecomp_heat_index: - file: openecomp-heat/_index.yml -topology_template: - inputs: - vlc1_Internal2_mac: - hidden: false - immutable: false - annotations: - source: - type: org.openecomp.annotations.Source - properties: - vf_module_label: - - vmme_vlc - source_type: HEAT - param_name: vlc1_Internal2_mac - type: string - description: static mac address assigned to vlc1_Internal2 - internal_net_id_1: - hidden: false - immutable: false - annotations: - source: - type: org.openecomp.annotations.Source - properties: - vf_module_label: - - vmme_vlc - source_type: HEAT - param_name: internal_net_id_1 - type: string - description: UUID of Internal2_net - internal_net_id_0: - hidden: false - immutable: false - annotations: - source: - type: org.openecomp.annotations.Source - properties: - vf_module_label: - - vmme_vlc - source_type: HEAT - param_name: internal_net_id_0 - type: string - description: UUID of Internal1_net - security_group_int2_id: - hidden: false - immutable: false - annotations: - source: - type: org.openecomp.annotations.Source - properties: - vf_module_label: - - vmme_vlc - source_type: HEAT - param_name: security_group_int2_id - type: string - description: Security Group UUID for output - security_group_int1_id: - hidden: false - immutable: false - annotations: - source: - type: org.openecomp.annotations.Source - properties: - vf_module_label: - - vmme_vlc - source_type: HEAT - param_name: security_group_int1_id - type: string - description: Security Group UUID for output - vlc1_Internal1_mac: - hidden: false - immutable: false - annotations: - source: - type: org.openecomp.annotations.Source - properties: - vf_module_label: - - vmme_vlc - source_type: HEAT - param_name: vlc1_Internal1_mac - type: string - description: static mac address assigned to vlc1_Internal1 - vlc_st_interface_type_int1: - hidden: false - immutable: false - annotations: - source: - type: org.openecomp.annotations.Source - properties: - vf_module_label: - - vmme_vlc - source_type: HEAT - param_name: vlc_st_interface_type_int1 - type: string - description: service_interface_type for the ServiceTemplate - vlc_st_interface_type_int2: - hidden: false - immutable: false - annotations: - source: - type: org.openecomp.annotations.Source - properties: - vf_module_label: - - vmme_vlc - source_type: HEAT - param_name: vlc_st_interface_type_int2 - type: string - description: service_interface_type for the ServiceTemplate - node_templates: - template_VMInt_INT1_VLC_1: - type: org.openecomp.resource.cp.nodes.heat.contrailV2.VirtualMachineInterface - properties: - security_group_refs: - - get_input: security_group_int1_id - virtual_network_refs: - - get_input: internal_net_id_0 - virtual_machine_interface_properties: - service_interface_type: - get_input: vlc_st_interface_type_int1 - groups: - vmme_vlc_group: - type: org.openecomp.groups.heat.HeatStack - properties: - heat_file: ../Artifacts/vmme_vlc.yml - description: | - Module HOT template to create vmme 2 vlc - members: - - template_VMInt_INT1_VLC_1 diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueNotAList/expectedoutputfiles/vmme_vlcServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueNotAList/expectedoutputfiles/vmme_vlcServiceTemplate.yaml new file mode 100644 index 0000000000..6ed1a548fc --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueNotAList/expectedoutputfiles/vmme_vlcServiceTemplate.yaml @@ -0,0 +1,116 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: vmme_vlc +imports: +- openecomp_heat_index: + file: openecomp-heat/_index.yml +- GlobalSubstitutionTypes: + file: GlobalSubstitutionTypesServiceTemplate.yaml +topology_template: + inputs: + vlc1_Internal2_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc1_Internal2 + internal_net_id_1: + hidden: false + immutable: false + type: string + description: UUID of Internal2_net + internal_net_id_0: + hidden: false + immutable: false + type: string + description: UUID of Internal1_net + security_group_int2_id: + hidden: false + immutable: false + type: string + description: Security Group UUID for output + security_group_int1_id: + hidden: false + immutable: false + type: string + description: Security Group UUID for output + vlc1_Internal1_mac: + hidden: false + immutable: false + type: string + description: static mac address assigned to vlc1_Internal1 + vlc_st_interface_type_int1: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + vlc_st_interface_type_int2: + hidden: false + immutable: false + type: string + description: service_interface_type for the ServiceTemplate + node_templates: + template_VMInt_INT1_VLC_1: + type: org.openecomp.resource.cp.nodes.heat.contrailV2.VirtualMachineInterface + properties: + security_group_refs: + - get_input: security_group_int1_id + virtual_network_refs: + - get_input: internal_net_id_0 + virtual_machine_interface_properties: + service_interface_type: + get_input: vlc_st_interface_type_int1 + groups: + vmme_vlc_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/vmme_vlc.yml + description: | + Module HOT template to create vmme 2 vlc + members: + - template_VMInt_INT1_VLC_1 + substitution_mappings: + node_type: org.openecomp.resource.abstract.nodes.heat.vmme_vlc + capabilities: + network.outgoing.packets.rate_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - network.outgoing.packets.rate + network.outpoing.packets_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - network.outpoing.packets + network.incoming.packets_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - network.incoming.packets + feature_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - feature + network.incoming.packets.rate_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - network.incoming.packets.rate + network.outgoing.bytes_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - network.outgoing.bytes + network.incoming.bytes_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - network.incoming.bytes + network.outgoing.bytes.rate_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - network.outgoing.bytes.rate + forwarder_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - forwarder + binding_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - binding + network.incoming.bytes.rate_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - network.incoming.bytes.rate + requirements: + dependency_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - dependency + link_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - link + binding_template_VMInt_INT1_VLC_1: + - template_VMInt_INT1_VLC_1 + - binding \ 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/contrailv2VMinterface/macAddressesValueNotAList/inputfiles/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueNotAList/inputfiles/MANIFEST.json index 93bb84803b..3122249504 100644 --- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueNotAList/inputfiles/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueNotAList/inputfiles/MANIFEST.json @@ -3,6 +3,11 @@ "description": "Desc", "version": "0.1", "data": [ + { + "isBase": true, + "file": "base_vmme_vlc.yml", + "type": "HEAT" + }, { "isBase": false, "file": "vmme_vlc.yml", diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueNotAList/inputfiles/base_vmme_vlc.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueNotAList/inputfiles/base_vmme_vlc.yml new file mode 100644 index 0000000000..79bc9b1aee --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueNotAList/inputfiles/base_vmme_vlc.yml @@ -0,0 +1,51 @@ +heat_template_version: 2015-04-30 + +description: > + Module HOT template to create vmme 2 vlc + +parameters: + vlc1_Internal1_mac: + type: string + description: static mac address assigned to vlc1_Internal1 + vlc1_Internal2_mac: + type: string + description: static mac address assigned to vlc1_Internal2 + vlc_st_interface_type_int1: + type: string + description: service_interface_type for the ServiceTemplate + vlc_st_interface_type_int2: + type: string + description: service_interface_type for the ServiceTemplate + internal_net_id_0: + type: string + description: UUID of Internal1_net + internal_net_id_1: + type: string + description: UUID of Internal2_net + security_group_int1_id: + type: string + description: Security Group UUID for output + security_group_int2_id: + type: string + description: Security Group UUID for output + +resources: + + template_VMInt_INT1_VLC: + type: OS::Heat::ResourceGroup + properties: + count: 3 + resource_def: + type: vmme_vlc.yml + properties: + virtual_machine_interface_properties: + { + virtual_machine_interface_properties_service_interface_type: { get_param: vlc_st_interface_type_int1 } + } + virtual_network_refs: [{ get_param: internal_net_id_0}] + virtual_machine_interface_mac_addresses: + { + virtual_machine_interface_mac_addresses_mac_address: [{ get_param: vlc1_Internal1_mac }, "abc"] + } + security_group_refs: [{get_param: security_group_int1_id}] + diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/oneNet/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/oneNet/expectedoutputfiles/MainServiceTemplate.yaml deleted file mode 100644 index 557224978d..0000000000 --- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/oneNet/expectedoutputfiles/MainServiceTemplate.yaml +++ /dev/null @@ -1,256 +0,0 @@ -tosca_definitions_version: tosca_simple_yaml_1_0_0 -metadata: - template_name: Main -imports: -- openecomp_heat_index: - file: openecomp-heat/_index.yml -topology_template: - inputs: - interface_param: - hidden: false - immutable: false - annotations: - source: - type: org.openecomp.annotations.Source - properties: - vf_module_label: - - hot_template - source_type: HEAT - param_name: interface_param - type: string - description: dummy - template_PortTuple_LB1: - hidden: false - immutable: false - annotations: - source: - type: org.openecomp.annotations.Source - properties: - vf_module_label: - - hot_template - source_type: HEAT - param_name: template_PortTuple_LB1 - type: string - description: dummy - lb_st_interface_type_oam: - hidden: false - immutable: false - annotations: - source: - type: org.openecomp.annotations.Source - properties: - vf_module_label: - - hot_template - source_type: HEAT - param_name: lb_st_interface_type_oam - type: string - description: dummy - oam_sec_group_name: - hidden: false - immutable: false - annotations: - source: - type: org.openecomp.annotations.Source - properties: - vf_module_label: - - hot_template - source_type: HEAT - param_name: oam_sec_group_name - type: string - description: dummy - nems_traffic_name: - hidden: false - immutable: false - annotations: - source: - type: org.openecomp.annotations.Source - properties: - vf_module_label: - - hot_template - source_type: HEAT - param_name: nems_traffic_name - type: string - description: dummy - network_ipam_refs_data_ipam_subnets_addr_from_start_true: - hidden: false - immutable: false - annotations: - source: - type: org.openecomp.annotations.Source - properties: - vf_module_label: - - hot_template - source_type: HEAT - param_name: network_ipam_refs_data_ipam_subnets_addr_from_start_true - type: string - description: dummy - network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2: - hidden: false - immutable: false - annotations: - source: - type: org.openecomp.annotations.Source - properties: - vf_module_label: - - hot_template - source_type: HEAT - param_name: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2 - type: string - description: dummy - jsa_net_name: - hidden: false - immutable: false - annotations: - source: - type: org.openecomp.annotations.Source - properties: - vf_module_label: - - hot_template - source_type: HEAT - param_name: jsa_net_name - type: string - description: dummy - network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2: - hidden: false - immutable: false - annotations: - source: - type: org.openecomp.annotations.Source - properties: - vf_module_label: - - hot_template - source_type: HEAT - param_name: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2 - type: string - description: dummy - node_templates: - jsa_net3: - type: org.openecomp.resource.vl.nodes.heat.network.contrailV2.VirtualNetwork - properties: - network_ipam_refs_data: - - network_ipam_refs_data_ipam_subnets: - - network_ipam_refs_data_ipam_subnets_subnet: - network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len: - get_input: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2 - network_ipam_refs_data_ipam_subnets_subnet_ip_prefix: - get_input: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2 - network_ipam_refs_data_ipam_subnets_addr_from_start: - get_input: network_ipam_refs_data_ipam_subnets_addr_from_start_true - network_name: aaa - jsa_net2: - type: org.openecomp.resource.vl.nodes.heat.network.contrailV2.VirtualNetwork - properties: - network_ipam_refs_data: - - network_ipam_refs_data_ipam_subnets: - - network_ipam_refs_data_ipam_subnets_subnet: - network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len: - get_input: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2 - network_ipam_refs_data_ipam_subnets_subnet_ip_prefix: - get_input: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2 - network_ipam_refs_data_ipam_subnets_addr_from_start: - get_input: network_ipam_refs_data_ipam_subnets_addr_from_start_true - network_name: aaa - jsa_net4: - type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork - properties: - network_name: - get_input: nems_traffic_name - template_VMInt_OAM_lb_1: - type: org.openecomp.resource.cp.nodes.heat.contrailV2.VirtualMachineInterface - properties: - security_group_refs: - - get_input: oam_sec_group_name - virtual_network_refs: - - jsa_net1 - virtual_machine_interface_properties: - service_interface_type: - get_input: lb_st_interface_type_oam - port_tuple_refs: - - get_input: template_PortTuple_LB1 - requirements: - - link: - capability: tosca.capabilities.network.Linkable - node: jsa_net1 - relationship: tosca.relationships.network.LinksTo - template_VMInt_OAM_lb_2: - type: org.openecomp.resource.cp.nodes.heat.contrailV2.VirtualMachineInterface - properties: - security_group_refs: - - get_input: oam_sec_group_name - virtual_network_refs: - - list_join: - - ':' - - get_attribute: - - jsa_net2 - - fq_name - virtual_machine_interface_properties: - service_interface_type: - get_input: lb_st_interface_type_oam - port_tuple_refs: - - get_input: template_PortTuple_LB1 - requirements: - - link: - capability: tosca.capabilities.network.Linkable - node: jsa_net2 - relationship: tosca.relationships.network.LinksTo - jsa_net1: - type: org.openecomp.resource.vl.nodes.heat.network.contrailV2.VirtualNetwork - properties: - network_ipam_refs_data: - - network_ipam_refs_data_ipam_subnets: - - network_ipam_refs_data_ipam_subnets_subnet: - network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len: - get_input: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2 - network_ipam_refs_data_ipam_subnets_subnet_ip_prefix: - get_input: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2 - network_ipam_refs_data_ipam_subnets_addr_from_start: - get_input: network_ipam_refs_data_ipam_subnets_addr_from_start_true - network_name: aaa - template_VMInt_OAM_lb_3: - type: org.openecomp.resource.cp.nodes.heat.contrailV2.VirtualMachineInterface - properties: - security_group_refs: - - get_input: oam_sec_group_name - virtual_network_refs: - - get_attribute: - - jsa_net3 - - fq_name - virtual_machine_interface_properties: - service_interface_type: - get_input: lb_st_interface_type_oam - port_tuple_refs: - - get_input: template_PortTuple_LB1 - requirements: - - link: - capability: tosca.capabilities.network.Linkable - node: jsa_net3 - relationship: tosca.relationships.network.LinksTo - template_VMInt_OAM_lb_4: - type: org.openecomp.resource.cp.nodes.heat.contrailV2.VirtualMachineInterface - properties: - security_group_refs: - - get_input: oam_sec_group_name - virtual_network_refs: - - get_attribute: - - jsa_net4 - - fq_name - virtual_machine_interface_properties: - service_interface_type: - get_input: lb_st_interface_type_oam - port_tuple_refs: - - get_input: template_PortTuple_LB1 - groups: - hot_template_group: - type: org.openecomp.groups.heat.HeatStack - properties: - heat_file: ../Artifacts/hot_template.yml - description: cmaui server template for vMMSC - members: - - jsa_net3 - - jsa_net2 - - jsa_net4 - - template_VMInt_OAM_lb_1 - - template_VMInt_OAM_lb_2 - - jsa_net1 - - template_VMInt_OAM_lb_3 - - template_VMInt_OAM_lb_4 diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/oneNet/expectedoutputfiles/hot_templateServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/oneNet/expectedoutputfiles/hot_templateServiceTemplate.yaml new file mode 100644 index 0000000000..bbb323dc38 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/oneNet/expectedoutputfiles/hot_templateServiceTemplate.yaml @@ -0,0 +1,153 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: hot_template +imports: +- openecomp_heat_index: + file: openecomp-heat/_index.yml +- GlobalSubstitutionTypes: + file: GlobalSubstitutionTypesServiceTemplate.yaml +topology_template: + inputs: + interface_param: + hidden: false + immutable: false + type: string + description: dummy + template_PortTuple_LB1: + hidden: false + immutable: false + type: string + description: dummy + lb_st_interface_type_oam: + hidden: false + immutable: false + type: string + description: dummy + oam_sec_group_name: + hidden: false + immutable: false + type: string + description: dummy + nems_traffic_name: + hidden: false + immutable: false + type: string + description: dummy + network_ipam_refs_data_ipam_subnets_addr_from_start_true: + hidden: false + immutable: false + type: string + description: dummy + network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2: + hidden: false + immutable: false + type: string + description: dummy + jsa_net_name: + hidden: false + immutable: false + type: string + description: dummy + network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2: + hidden: false + immutable: false + type: string + description: dummy + node_templates: + template_VMInt_OAM_lb_1: + type: org.openecomp.resource.cp.nodes.heat.contrailV2.VirtualMachineInterface + properties: + security_group_refs: + - get_input: oam_sec_group_name + virtual_network_refs: + - jsa_net1 + virtual_machine_interface_properties: + service_interface_type: + get_input: lb_st_interface_type_oam + port_tuple_refs: + - get_input: template_PortTuple_LB1 + requirements: + - link: + capability: tosca.capabilities.network.Linkable + node: jsa_net1 + relationship: tosca.relationships.network.LinksTo + jsa_net1: + type: org.openecomp.resource.vl.nodes.heat.network.contrailV2.VirtualNetwork + properties: + network_ipam_refs_data: + - network_ipam_refs_data_ipam_subnets: + - network_ipam_refs_data_ipam_subnets_subnet: + network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len: + get_input: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2 + network_ipam_refs_data_ipam_subnets_subnet_ip_prefix: + get_input: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2 + network_ipam_refs_data_ipam_subnets_addr_from_start: + get_input: network_ipam_refs_data_ipam_subnets_addr_from_start_true + network_name: aaa + groups: + hot_template_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/hot_template.yml + description: cmaui server template for vMMSC + members: + - template_VMInt_OAM_lb_1 + - jsa_net1 + substitution_mappings: + node_type: org.openecomp.resource.abstract.nodes.heat.hot_template + capabilities: + network.outpoing.packets_template_VMInt_OAM_lb_1: + - template_VMInt_OAM_lb_1 + - network.outpoing.packets + network.incoming.bytes.rate_template_VMInt_OAM_lb_1: + - template_VMInt_OAM_lb_1 + - network.incoming.bytes.rate + binding_template_VMInt_OAM_lb_1: + - template_VMInt_OAM_lb_1 + - binding + network.incoming.packets.rate_template_VMInt_OAM_lb_1: + - template_VMInt_OAM_lb_1 + - network.incoming.packets.rate + network.incoming.packets_template_VMInt_OAM_lb_1: + - template_VMInt_OAM_lb_1 + - network.incoming.packets + feature_template_VMInt_OAM_lb_1: + - template_VMInt_OAM_lb_1 + - feature + network.outgoing.packets.rate_template_VMInt_OAM_lb_1: + - template_VMInt_OAM_lb_1 + - network.outgoing.packets.rate + network.outgoing.bytes_template_VMInt_OAM_lb_1: + - template_VMInt_OAM_lb_1 + - network.outgoing.bytes + forwarder_template_VMInt_OAM_lb_1: + - template_VMInt_OAM_lb_1 + - forwarder + feature_jsa_net1: + - jsa_net1 + - feature + end_point_jsa_net1: + - jsa_net1 + - end_point + network.outgoing.bytes.rate_template_VMInt_OAM_lb_1: + - template_VMInt_OAM_lb_1 + - network.outgoing.bytes.rate + link_jsa_net1: + - jsa_net1 + - link + attachment_jsa_net1: + - jsa_net1 + - attachment + network.incoming.bytes_template_VMInt_OAM_lb_1: + - template_VMInt_OAM_lb_1 + - network.incoming.bytes + requirements: + binding_template_VMInt_OAM_lb_1: + - template_VMInt_OAM_lb_1 + - binding + dependency_template_VMInt_OAM_lb_1: + - template_VMInt_OAM_lb_1 + - dependency + dependency_jsa_net1: + - jsa_net1 + - dependency \ 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/contrailv2VMinterface/oneNet/inputfiles/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/oneNet/inputfiles/MANIFEST.json index 70cdc7d237..7b19bb8bdc 100644 --- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/oneNet/inputfiles/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/oneNet/inputfiles/MANIFEST.json @@ -3,6 +3,11 @@ "description": "HOT template to create 2 cinder volumes", "version": "2013-05-23", "data": [ + { + "isBase": true, + "file": "base_hot_template.yml", + "type": "HEAT" + }, { "file": "hot_template.yml", "type": "HEAT" diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/oneNet/inputfiles/base_hot_template.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/oneNet/inputfiles/base_hot_template.yml new file mode 100644 index 0000000000..afe369c6f3 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/oneNet/inputfiles/base_hot_template.yml @@ -0,0 +1,23 @@ +heat_template_version: 2015-04-30 + +description: > + Module HOT template to create vmme 2 vlc + +parameters: + lb_st_interface_type_oam: + description: dummy + type: string + +resources: + template_VMInt_INT1_VLC: + type: OS::Heat::ResourceGroup + properties: + count: 3 + resource_def: + type: hot_template.yml + properties: + virtual_machine_interface_properties: + { + virtual_machine_interface_properties_service_interface_type: { get_param: lb_st_interface_type_oam }, + } + diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/oneNet/inputfiles/hot_template.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/oneNet/inputfiles/hot_template.yml index 7863cb5f9a..adba9e8c6d 100644 --- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/oneNet/inputfiles/hot_template.yml +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/oneNet/inputfiles/hot_template.yml @@ -1,132 +1,61 @@ -heat_template_version: 2013-05-23 - -description: cmaui server template for vMMSC - -parameters: - network_ipam_refs_data_ipam_subnets_addr_from_start_true: - description: dummy - type: string - network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2: - description: dummy - type: string - network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2: - description: dummy - type: string - lb_st_interface_type_oam: - description: dummy - type: string - template_PortTuple_LB1: - description: dummy - type: string - oam_sec_group_name: - description: dummy - type: string - jsa_net_name: - description: dummy - type: string - nems_traffic_name: - description: dummy - type: string - interface_param: - description: dummy - 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: jsa_net1 }] - port_tuple_refs: [{ get_param: template_PortTuple_LB1 }] - security_group_refs: [{ get_param: oam_sec_group_name}] - virtual_machine_interface_refs: [{ get_param: interface_param }] - - jsa_net1: - properties: - name: aaa - network_ipam_refs_data: - - - network_ipam_refs_data_ipam_subnets: - - - network_ipam_refs_data_ipam_subnets_addr_from_start: - get_param: network_ipam_refs_data_ipam_subnets_addr_from_start_true - network_ipam_refs_data_ipam_subnets_subnet: - network_ipam_refs_data_ipam_subnets_subnet_ip_prefix: - get_param: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2 - network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len: - get_param: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2 - type: "OS::ContrailV2::VirtualNetwork" - - template_VMInt_OAM_lb_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: [ { list_join: [':', { get_attr: [ jsa_net2, fq_name ] } ] }] - port_tuple_refs: [{ get_param: template_PortTuple_LB1 }] - security_group_refs: [{ get_param: oam_sec_group_name}] - - jsa_net2: - properties: - name: aaa - network_ipam_refs_data: - - - network_ipam_refs_data_ipam_subnets: - - - network_ipam_refs_data_ipam_subnets_addr_from_start: - get_param: network_ipam_refs_data_ipam_subnets_addr_from_start_true - network_ipam_refs_data_ipam_subnets_subnet: - network_ipam_refs_data_ipam_subnets_subnet_ip_prefix: - get_param: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2 - network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len: - get_param: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2 - type: "OS::ContrailV2::VirtualNetwork" - - template_VMInt_OAM_lb_3: - 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_attr: [ jsa_net3, fq_name ] } ] - port_tuple_refs: [{ get_param: template_PortTuple_LB1 }] - security_group_refs: [{ get_param: oam_sec_group_name}] - - jsa_net3: - properties: - name: aaa - network_ipam_refs_data: - - - network_ipam_refs_data_ipam_subnets: - - - network_ipam_refs_data_ipam_subnets_addr_from_start: - get_param: network_ipam_refs_data_ipam_subnets_addr_from_start_true - network_ipam_refs_data_ipam_subnets_subnet: - network_ipam_refs_data_ipam_subnets_subnet_ip_prefix: - get_param: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2 - network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len: - get_param: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2 - type: "OS::ContrailV2::VirtualNetwork" - - template_VMInt_OAM_lb_4: - 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_attr: [ jsa_net4, fq_name ] } ] # should not connect to contrail network - port_tuple_refs: [{ get_param: template_PortTuple_LB1 }] - security_group_refs: [{ get_param: oam_sec_group_name}] - - jsa_net4: - type: OS::Contrail::VirtualNetwork - properties: - name: {get_param: nems_traffic_name} - +heat_template_version: 2013-05-23 + +description: cmaui server template for vMMSC + +parameters: + network_ipam_refs_data_ipam_subnets_addr_from_start_true: + description: dummy + type: string + network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2: + description: dummy + type: string + network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2: + description: dummy + type: string + lb_st_interface_type_oam: + description: dummy + type: string + template_PortTuple_LB1: + description: dummy + type: string + oam_sec_group_name: + description: dummy + type: string + jsa_net_name: + description: dummy + type: string + nems_traffic_name: + description: dummy + type: string + interface_param: + description: dummy + 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: jsa_net1 }] + port_tuple_refs: [{ get_param: template_PortTuple_LB1 }] + security_group_refs: [{ get_param: oam_sec_group_name}] + virtual_machine_interface_refs: [{ get_param: interface_param }] + + jsa_net1: + properties: + name: aaa + network_ipam_refs_data: + - + network_ipam_refs_data_ipam_subnets: + - + network_ipam_refs_data_ipam_subnets_addr_from_start: + get_param: network_ipam_refs_data_ipam_subnets_addr_from_start_true + network_ipam_refs_data_ipam_subnets_subnet: + network_ipam_refs_data_ipam_subnets_subnet_ip_prefix: + get_param: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2 + network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len: + get_param: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2 + type: "OS::ContrailV2::VirtualNetwork" \ No newline at end of file -- cgit 1.2.3-korg