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 | 256 --------------------- .../hot_templateServiceTemplate.yaml | 153 ++++++++++++ 2 files changed, 153 insertions(+), 256 deletions(-) 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 (limited to 'openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/oneNet/expectedoutputfiles') 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 -- cgit 1.2.3-korg