diff options
author | 2018-02-22 14:32:06 +0530 | |
---|---|---|
committer | 2018-02-28 09:56:30 +0000 | |
commit | 51e051e86f9f5d10c9439e9e5e57d1e9ee8f8e06 (patch) | |
tree | 957583dc6b93667d7024c7258716d6c6b96776c2 /openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueNotAList | |
parent | bc169d4b132891052cc8c642e18e642afd04464f (diff) |
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 <ojas.dubey@amdocs.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueNotAList')
-rw-r--r-- | openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueNotAList/expectedoutputfiles/vmme_vlcServiceTemplate.yaml (renamed from openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueNotAList/expectedoutputfiles/MainServiceTemplate.yaml) | 248 | ||||
-rw-r--r-- | openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueNotAList/inputfiles/MANIFEST.json | 5 | ||||
-rw-r--r-- | openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueNotAList/inputfiles/base_vmme_vlc.yml | 51 |
3 files changed, 172 insertions, 132 deletions
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/vmme_vlcServiceTemplate.yaml index c17f56efc8..6ed1a548fc 100644 --- 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/vmme_vlcServiceTemplate.yaml @@ -1,132 +1,116 @@ -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 +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 @@ -4,6 +4,11 @@ "version": "0.1", "data": [ { + "isBase": true, + "file": "base_vmme_vlc.yml", + "type": "HEAT" + }, + { "isBase": false, "file": "vmme_vlc.yml", "type": "HEAT" 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}] + |