diff options
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VlanToNetConnection/sharedAddOn')
6 files changed, 911 insertions, 342 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VlanToNetConnection/sharedAddOn/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VlanToNetConnection/sharedAddOn/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml new file mode 100644 index 0000000000..1be71bb7c5 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VlanToNetConnection/sharedAddOn/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml @@ -0,0 +1,203 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: GlobalSubstitutionTypes +imports: +- openecomp_heat_index: + file: openecomp-heat/_index.yml +node_types: + org.openecomp.resource.abstract.nodes.heat.subinterface.vlan: + derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute + properties: + cmaui_names: + type: list + description: CMAUI1, CMAUI2 server names + required: true + status: SUPPORTED + entry_schema: + type: string + p1: + type: string + description: UID of OAM network + required: true + status: SUPPORTED + p2: + type: string + description: UID of OAM network + required: true + status: SUPPORTED + p3: + type: string + description: UID of OAM network + required: true + status: SUPPORTED + p4: + type: string + description: UID of OAM network + required: true + status: SUPPORTED + template_PortTuple_LB1: + type: string + required: true + status: SUPPORTED + p5: + type: string + description: UID of OAM network + required: true + status: SUPPORTED + oam_sec_group_name: + type: string + required: true + status: SUPPORTED + lb_st_interface_type_oam: + type: string + required: true + status: SUPPORTED + virtual_ip_address: + type: string + required: true + status: SUPPORTED + security_group_name: + type: list + description: CMAUI1, CMAUI2 server names + required: true + status: SUPPORTED + entry_schema: + type: string + shared_network_id: + type: string + description: Flavor for CMAUI server + required: true + status: SUPPORTED + vlan_ids: + type: string + required: true + status: SUPPORTED + shared_network_id1: + type: string + description: Flavor for CMAUI server + required: true + status: SUPPORTED + cmaui_image: + type: string + description: Image for CMAUI server + required: true + status: SUPPORTED + virtual_ipv6_address: + type: string + required: true + status: SUPPORTED + cmaui_flavor: + type: string + description: Flavor for CMAUI server + required: true + status: SUPPORTED + shared_network_id2: + type: list + description: Flavor for CMAUI server + required: true + status: SUPPORTED + entry_schema: + type: string + lb_st_vlan_type_oam: + type: string + description: dummy + required: true + status: SUPPORTED + mac_address: + type: string + required: true + status: SUPPORTED + availability_zone_0: + type: string + description: availabilityzone name + required: true + status: SUPPORTED + subinterface_name_prefix: + type: string + required: true + status: SUPPORTED + subinterface_instance_index: + type: float + required: true + status: SUPPORTED + cmaui_oam_ips: + type: string + required: true + status: SUPPORTED + requirements: + - dependency_template_Vlan_3: + capability: tosca.capabilities.Node + node: tosca.nodes.Root + relationship: tosca.relationships.DependsOn + occurrences: + - 0 + - UNBOUNDED + - subinterface_link_template_Vlan_3: + capability: tosca.capabilities.network.Linkable + relationship: tosca.relationships.network.LinksTo + occurrences: + - 1 + - 1 + - binding_template_Vlan_3: + capability: tosca.capabilities.network.Bindable + node: org.openecomp.resource.cp.nodes.network.Port + relationship: tosca.relationships.network.BindsTo + occurrences: + - 1 + - 1 + - dependency_template_Vlan_2: + capability: tosca.capabilities.Node + node: tosca.nodes.Root + relationship: tosca.relationships.DependsOn + occurrences: + - 0 + - UNBOUNDED + - subinterface_link_template_Vlan_2: + capability: tosca.capabilities.network.Linkable + relationship: tosca.relationships.network.LinksTo + occurrences: + - 1 + - 1 + - binding_template_Vlan_2: + capability: tosca.capabilities.network.Bindable + node: org.openecomp.resource.cp.nodes.network.Port + relationship: tosca.relationships.network.BindsTo + occurrences: + - 1 + - 1 + - dependency_template_Vlan_1: + capability: tosca.capabilities.Node + node: tosca.nodes.Root + relationship: tosca.relationships.DependsOn + occurrences: + - 0 + - UNBOUNDED + - subinterface_link_template_Vlan_1: + capability: tosca.capabilities.network.Linkable + relationship: tosca.relationships.network.LinksTo + occurrences: + - 1 + - 1 + - binding_template_Vlan_1: + capability: tosca.capabilities.network.Bindable + node: org.openecomp.resource.cp.nodes.network.Port + relationship: tosca.relationships.network.BindsTo + occurrences: + - 1 + - 1 + capabilities: + feature_template_Vlan_2: + type: tosca.capabilities.Node + occurrences: + - 1 + - UNBOUNDED + feature_template_Vlan_3: + type: tosca.capabilities.Node + occurrences: + - 1 + - UNBOUNDED + feature_template_Vlan_1: + type: tosca.capabilities.Node + occurrences: + - 1 + - UNBOUNDED
\ 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/VlanToNetConnection/sharedAddOn/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VlanToNetConnection/sharedAddOn/expectedoutputfiles/MainServiceTemplate.yaml index ab9cc09215..d22c84d7fe 100644 --- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VlanToNetConnection/sharedAddOn/expectedoutputfiles/MainServiceTemplate.yaml +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VlanToNetConnection/sharedAddOn/expectedoutputfiles/MainServiceTemplate.yaml @@ -2,46 +2,23 @@ tosca_definitions_version: tosca_simple_yaml_1_0_0 metadata: template_name: Main imports: -- CommonGlobalTypes: - file: CommonGlobalTypesServiceTemplate.yaml -- NovaServerGlobalTypes: - file: NovaServerGlobalTypesServiceTemplate.yaml -- NeutronPortGlobalTypes: - file: NeutronPortGlobalTypesServiceTemplate.yaml -- NeutronSecurityRulesGlobalTypes: - file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml -- NeutronNetGlobalTypes: - file: NeutronNetGlobalTypesServiceTemplate.yaml -- CinderVolumeGlobalTypes: - file: CinderVolumeGlobalTypesServiceTemplate.yaml -- ContrailVirtualNetworkGlobalType: - file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml -- ContrailNetworkRuleGlobalType: - file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml -- AbstractSubstituteGlobalTypes: - file: AbstractSubstituteGlobalTypesServiceTemplate.yaml -- ContrailV2VirtualMachineInterfaceGlobalType: - file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml -- ContrailComputeGlobalTypes: - file: ContrailComputeGlobalTypesServiceTemplate.yaml -- ContrailPortGlobalTypes: - file: ContrailPortGlobalTypesServiceTemplate.yaml -- ContrailAbstractSubstituteGlobalTypes: - file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml -- ContrailV2VirtualNetworkGlobalType: - file: ContrailV2VirtualNetworkGlobalTypeServiceTemplate.yaml -- ContrailV2NetworkRuleGlobalType: - file: ContrailV2NetworkRuleGlobalTypeServiceTemplate.yaml -- ContrailV2VLANSubInterfaceGlobalType: - file: ContrailV2VLANSubInterfaceGlobalTypeServiceTemplate.yaml -node_types: - org.openecomp.resource.vfc.nodes.heat.cmaui: - derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server +- openecomp_heat_index: + file: openecomp-heat/_index.yml +- GlobalSubstitutionTypes: + file: GlobalSubstitutionTypesServiceTemplate.yaml topology_template: inputs: cmaui_names: hidden: false immutable: false + annotations: + source: + type: org.openecomp.annotations.Source + properties: + vf_module_label: + - addOn + source_type: HEAT + param_name: cmaui_names type: list description: CMAUI1, CMAUI2 server names entry_schema: @@ -49,27 +26,75 @@ topology_template: p1: hidden: false immutable: false + annotations: + source: + type: org.openecomp.annotations.Source + properties: + vf_module_label: + - addOn + source_type: HEAT + param_name: p1 type: string description: UID of OAM network template_PortTuple_LB1: hidden: false immutable: false + annotations: + source: + type: org.openecomp.annotations.Source + properties: + vf_module_label: + - addOn + source_type: HEAT + param_name: template_PortTuple_LB1 type: string oam_sec_group_name: hidden: false immutable: false + annotations: + source: + type: org.openecomp.annotations.Source + properties: + vf_module_label: + - addOn + source_type: HEAT + param_name: oam_sec_group_name type: string lb_st_interface_type_oam: hidden: false immutable: false + annotations: + source: + type: org.openecomp.annotations.Source + properties: + vf_module_label: + - addOn + source_type: HEAT + param_name: lb_st_interface_type_oam type: string virtual_ip_address: hidden: false immutable: false + annotations: + source: + type: org.openecomp.annotations.Source + properties: + vf_module_label: + - addOn + source_type: HEAT + param_name: virtual_ip_address type: string security_group_name: hidden: false immutable: false + annotations: + source: + type: org.openecomp.annotations.Source + properties: + vf_module_label: + - addOn + source_type: HEAT + param_name: security_group_name type: list description: CMAUI1, CMAUI2 server names entry_schema: @@ -77,39 +102,103 @@ topology_template: shared_network_id: hidden: false immutable: false + annotations: + source: + type: org.openecomp.annotations.Source + properties: + vf_module_label: + - addOn + source_type: HEAT + param_name: shared_network_id type: string description: Flavor for CMAUI server jsa_net_name: hidden: false immutable: false + annotations: + source: + type: org.openecomp.annotations.Source + properties: + vf_module_label: + - main + source_type: HEAT + param_name: jsa_net_name type: string description: network name of jsa log network vlan_ids: hidden: false immutable: false + annotations: + source: + type: org.openecomp.annotations.Source + properties: + vf_module_label: + - addOn + source_type: HEAT + param_name: vlan_ids type: string shared_network_id1: hidden: false immutable: false + annotations: + source: + type: org.openecomp.annotations.Source + properties: + vf_module_label: + - addOn + source_type: HEAT + param_name: shared_network_id1 type: string description: Flavor for CMAUI server cmaui_image: hidden: false immutable: false + annotations: + source: + type: org.openecomp.annotations.Source + properties: + vf_module_label: + - addOn + source_type: HEAT + param_name: cmaui_image type: string description: Image for CMAUI server virtual_ipv6_address: hidden: false immutable: false + annotations: + source: + type: org.openecomp.annotations.Source + properties: + vf_module_label: + - addOn + source_type: HEAT + param_name: virtual_ipv6_address type: string cmaui_flavor: hidden: false immutable: false + annotations: + source: + type: org.openecomp.annotations.Source + properties: + vf_module_label: + - addOn + source_type: HEAT + param_name: cmaui_flavor type: string description: Flavor for CMAUI server shared_network_id2: hidden: false immutable: false + annotations: + source: + type: org.openecomp.annotations.Source + properties: + vf_module_label: + - addOn + source_type: HEAT + param_name: shared_network_id2 type: list description: Flavor for CMAUI server entry_schema: @@ -117,29 +206,77 @@ topology_template: lb_st_vlan_type_oam: hidden: false immutable: false + annotations: + source: + type: org.openecomp.annotations.Source + properties: + vf_module_label: + - addOn + source_type: HEAT + param_name: lb_st_vlan_type_oam type: string description: dummy mac_address: hidden: false immutable: false + annotations: + source: + type: org.openecomp.annotations.Source + properties: + vf_module_label: + - addOn + source_type: HEAT + param_name: mac_address type: string availability_zone_0: label: availabilityzone name hidden: false immutable: false + annotations: + source: + type: org.openecomp.annotations.Source + properties: + vf_module_label: + - addOn + source_type: HEAT + param_name: availability_zone_0 type: string description: availabilityzone name subinterface_name_prefix: hidden: false immutable: false + annotations: + source: + type: org.openecomp.annotations.Source + properties: + vf_module_label: + - addOn + source_type: HEAT + param_name: subinterface_name_prefix type: string subinterface_instance_index: hidden: false immutable: false + annotations: + source: + type: org.openecomp.annotations.Source + properties: + vf_module_label: + - addOn + source_type: HEAT + param_name: subinterface_instance_index type: float cmaui_oam_ips: hidden: false immutable: false + annotations: + source: + type: org.openecomp.annotations.Source + properties: + vf_module_label: + - addOn + source_type: HEAT + param_name: cmaui_oam_ips type: string node_templates: template_VMInt_OAM_lb_1: @@ -150,7 +287,7 @@ topology_template: virtual_network_refs: - get_input: shared_network_id virtual_machine_interface_properties: - virtual_machine_interface_properties_service_interface_type: + service_interface_type: get_input: lb_st_interface_type_oam port_tuple_refs: - get_input: template_PortTuple_LB1 @@ -159,10 +296,6 @@ topology_template: capability: tosca.capabilities.network.Linkable node: test_net relationship: tosca.relationships.network.LinksTo - - binding: - capability: tosca.capabilities.network.Bindable - node: server_cmaui - relationship: tosca.relationships.network.BindsTo template_VMInt_OAM_lb_2: type: org.openecomp.resource.cp.nodes.heat.contrailV2.VirtualMachineInterface properties: @@ -172,7 +305,7 @@ topology_template: - get_input: shared_network_id - get_input: shared_network_id1 virtual_machine_interface_properties: - virtual_machine_interface_properties_service_interface_type: + service_interface_type: get_input: lb_st_interface_type_oam port_tuple_refs: - get_input: template_PortTuple_LB1 @@ -181,10 +314,6 @@ topology_template: capability: tosca.capabilities.network.Linkable node: test_net relationship: tosca.relationships.network.LinksTo - - binding: - capability: tosca.capabilities.network.Bindable - node: server_cmaui - relationship: tosca.relationships.network.BindsTo template_VMInt_OAM_lb_3: type: org.openecomp.resource.cp.nodes.heat.contrailV2.VirtualMachineInterface properties: @@ -195,7 +324,7 @@ topology_template: - shared_network_id2 - 0 virtual_machine_interface_properties: - virtual_machine_interface_properties_service_interface_type: + service_interface_type: get_input: lb_st_interface_type_oam port_tuple_refs: - get_input: template_PortTuple_LB1 @@ -205,169 +334,39 @@ topology_template: shared: true network_name: get_input: jsa_net_name - server_cmaui: - type: org.openecomp.resource.vfc.nodes.heat.cmaui - properties: - flavor: - get_input: cmaui_flavor - availability_zone: - get_input: availability_zone_0 - image: - get_input: cmaui_image - contrail_service_instance_ind: true - name: - get_input: - - cmaui_names - - 0 - test_net: - type: org.openecomp.resource.vl.nodes.heat.network.neutron.Net - properties: - shared: true - network_name: - get_input: jsa_net_name - template_Vlan_3: - type: org.openecomp.resource.cp.nodes.heat.network.contrailV2.VLANSubInterface + test_nested1: + type: org.openecomp.resource.abstract.nodes.heat.subinterface.vlan + directives: + - substitutable properties: - virtual_machine_interface_refs: - - template_VMInt_OAM_lb_1 - name: - str_replace: - template: $NAME$VLAN - params: - $NAME: - get_input: subinterface_name_prefix - $VLAN: - get_input: - - vlan_ids - - get_input: subinterface_instance_index - virtual_network_refs: - - get_input: - - shared_network_id2 - - 0 - virtual_machine_interface_properties: - sub_interface_vlan_tag: - get_input: lb_st_vlan_type_oam - virtual_machine_interface_allowed_address_pairs: - allowed_address_pair: - - address_mode: active-standby - ip: - ip_prefix: - get_input: virtual_ip_address - ip_prefix_len: 32 - mac: - get_input: mac_address - - address_mode: active-standby - ip: - ip_prefix: - get_input: virtual_ipv6_address - ip_prefix_len: 128 - mac: - get_input: mac_address - virtual_machine_interface_mac_addresses: - mac_address: - - get_input: mac_address + service_template_filter: + substitute_service_template: vlanServiceTemplate.yaml + shared_network_id1: + get_input: shared_network_id1 + p2: + get_input: shared_network_id2 + p3: template_VMInt_OAM_lb_1 + p4: template_VMInt_OAM_lb_2 + p5: template_VMInt_OAM_lb_3 requirements: - - binding: + - binding_template_Vlan_3: capability: tosca.capabilities.network.Bindable - node: template_VMInt_OAM_lb_1 + node: template_VMInt_OAM_lb_3 relationship: tosca.relationships.network.BindsTo - template_Vlan_2: - type: org.openecomp.resource.cp.nodes.heat.network.contrailV2.VLANSubInterface - properties: - virtual_machine_interface_refs: - - template_VMInt_OAM_lb_1 - name: - str_replace: - template: $NAME$VLAN - params: - $NAME: - get_input: subinterface_name_prefix - $VLAN: - get_input: - - vlan_ids - - get_input: subinterface_instance_index - virtual_network_refs: - - get_input: shared_network_id - - get_input: shared_network_id1 - virtual_machine_interface_properties: - sub_interface_vlan_tag: - get_input: lb_st_vlan_type_oam - virtual_machine_interface_allowed_address_pairs: - allowed_address_pair: - - address_mode: active-standby - ip: - ip_prefix: - get_input: virtual_ip_address - ip_prefix_len: 32 - mac: - get_input: mac_address - - address_mode: active-standby - ip: - ip_prefix: - get_input: virtual_ipv6_address - ip_prefix_len: 128 - mac: - get_input: mac_address - virtual_machine_interface_mac_addresses: - mac_address: - - get_input: mac_address - requirements: - - link: - capability: tosca.capabilities.network.Linkable - node: test_net - relationship: tosca.relationships.network.LinksTo - - binding: + - binding_template_Vlan_2: capability: tosca.capabilities.network.Bindable - node: template_VMInt_OAM_lb_1 + node: template_VMInt_OAM_lb_2 relationship: tosca.relationships.network.BindsTo - template_Vlan_1: - type: org.openecomp.resource.cp.nodes.heat.network.contrailV2.VLANSubInterface - properties: - virtual_machine_interface_refs: - - template_VMInt_OAM_lb_1 - name: - str_replace: - template: $NAME$VLAN - params: - $NAME: - get_input: subinterface_name_prefix - $VLAN: - get_input: - - vlan_ids - - get_input: subinterface_instance_index - virtual_network_refs: - - get_input: shared_network_id - virtual_machine_interface_properties: - sub_interface_vlan_tag: - get_input: lb_st_vlan_type_oam - virtual_machine_interface_allowed_address_pairs: - allowed_address_pair: - - address_mode: active-standby - ip: - ip_prefix: - get_input: virtual_ip_address - ip_prefix_len: 32 - mac: - get_input: mac_address - - address_mode: active-standby - ip: - ip_prefix: - get_input: virtual_ipv6_address - ip_prefix_len: 128 - mac: - get_input: mac_address - virtual_machine_interface_mac_addresses: - mac_address: - - get_input: mac_address - requirements: - - link: - capability: tosca.capabilities.network.Linkable - node: test_net - relationship: tosca.relationships.network.LinksTo - - binding: + - binding_template_Vlan_1: capability: tosca.capabilities.network.Bindable node: template_VMInt_OAM_lb_1 relationship: tosca.relationships.network.BindsTo + test_net: + type: org.openecomp.resource.vl.nodes.heat.network.neutron.Net + properties: + shared: true + network_name: + get_input: jsa_net_name groups: main_group: type: org.openecomp.groups.heat.HeatStack @@ -387,7 +386,4 @@ topology_template: - template_VMInt_OAM_lb_1 - template_VMInt_OAM_lb_2 - template_VMInt_OAM_lb_3 - - server_cmaui - - template_Vlan_3 - - template_Vlan_2 - - template_Vlan_1
\ No newline at end of file + - test_nested1 diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VlanToNetConnection/sharedAddOn/expectedoutputfiles/vlanServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VlanToNetConnection/sharedAddOn/expectedoutputfiles/vlanServiceTemplate.yaml new file mode 100644 index 0000000000..b0301d5efd --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VlanToNetConnection/sharedAddOn/expectedoutputfiles/vlanServiceTemplate.yaml @@ -0,0 +1,298 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: vlan +imports: +- openecomp_heat_index: + file: openecomp-heat/_index.yml +- GlobalSubstitutionTypes: + file: GlobalSubstitutionTypesServiceTemplate.yaml +topology_template: + inputs: + cmaui_names: + hidden: false + immutable: false + type: list + description: CMAUI1, CMAUI2 server names + entry_schema: + type: string + p1: + hidden: false + immutable: false + type: string + description: UID of OAM network + p2: + hidden: false + immutable: false + type: string + description: UID of OAM network + p3: + hidden: false + immutable: false + type: string + description: UID of OAM network + p4: + hidden: false + immutable: false + type: string + description: UID of OAM network + template_PortTuple_LB1: + hidden: false + immutable: false + type: string + p5: + hidden: false + immutable: false + type: string + description: UID of OAM network + oam_sec_group_name: + hidden: false + immutable: false + type: string + lb_st_interface_type_oam: + hidden: false + immutable: false + type: string + virtual_ip_address: + hidden: false + immutable: false + type: string + security_group_name: + hidden: false + immutable: false + type: list + description: CMAUI1, CMAUI2 server names + entry_schema: + type: string + shared_network_id: + hidden: false + immutable: false + type: string + description: Flavor for CMAUI server + vlan_ids: + hidden: false + immutable: false + type: string + shared_network_id1: + hidden: false + immutable: false + type: string + description: Flavor for CMAUI server + cmaui_image: + hidden: false + immutable: false + type: string + description: Image for CMAUI server + virtual_ipv6_address: + hidden: false + immutable: false + type: string + cmaui_flavor: + hidden: false + immutable: false + type: string + description: Flavor for CMAUI server + shared_network_id2: + hidden: false + immutable: false + type: list + description: Flavor for CMAUI server + entry_schema: + type: string + lb_st_vlan_type_oam: + hidden: false + immutable: false + type: string + description: dummy + mac_address: + hidden: false + immutable: false + type: string + availability_zone_0: + label: availabilityzone name + hidden: false + immutable: false + type: string + description: availabilityzone name + subinterface_name_prefix: + hidden: false + immutable: false + type: string + subinterface_instance_index: + hidden: false + immutable: false + type: float + cmaui_oam_ips: + hidden: false + immutable: false + type: string + node_templates: + template_Vlan_3: + type: org.openecomp.resource.cp.nodes.heat.network.v2.contrailV2.VLANSubInterface + properties: + virtual_machine_interface_refs: + - get_input: p5 + name: + str_replace: + template: $NAME$VLAN + params: + $NAME: + get_input: subinterface_name_prefix + $VLAN: + get_input: + - vlan_ids + - get_input: subinterface_instance_index + virtual_network_refs: + - get_input: + - shared_network_id2 + - 0 + virtual_machine_interface_properties: + sub_interface_vlan_tag: + get_input: lb_st_vlan_type_oam + virtual_machine_interface_allowed_address_pairs: + allowed_address_pair: + - address_mode: active-standby + ip: + ip_prefix: + get_input: virtual_ip_address + ip_prefix_len: 32 + mac: + get_input: mac_address + - address_mode: active-standby + ip: + ip_prefix: + get_input: virtual_ipv6_address + ip_prefix_len: 128 + mac: + get_input: mac_address + virtual_machine_interface_mac_addresses: + mac_address: + - get_input: mac_address + template_Vlan_2: + type: org.openecomp.resource.cp.nodes.heat.network.v2.contrailV2.VLANSubInterface + properties: + virtual_machine_interface_refs: + - get_input: p4 + name: + str_replace: + template: $NAME$VLAN + params: + $NAME: + get_input: subinterface_name_prefix + $VLAN: + get_input: + - vlan_ids + - get_input: subinterface_instance_index + virtual_network_refs: + - get_input: shared_network_id + - get_input: shared_network_id1 + virtual_machine_interface_properties: + sub_interface_vlan_tag: + get_input: lb_st_vlan_type_oam + virtual_machine_interface_allowed_address_pairs: + allowed_address_pair: + - address_mode: active-standby + ip: + ip_prefix: + get_input: virtual_ip_address + ip_prefix_len: 32 + mac: + get_input: mac_address + - address_mode: active-standby + ip: + ip_prefix: + get_input: virtual_ipv6_address + ip_prefix_len: 128 + mac: + get_input: mac_address + virtual_machine_interface_mac_addresses: + mac_address: + - get_input: mac_address + template_Vlan_1: + type: org.openecomp.resource.cp.nodes.heat.network.v2.contrailV2.VLANSubInterface + properties: + virtual_machine_interface_refs: + - get_input: p3 + name: + str_replace: + template: $NAME$VLAN + params: + $NAME: + get_input: subinterface_name_prefix + $VLAN: + get_input: + - vlan_ids + - get_input: subinterface_instance_index + virtual_network_refs: + - get_input: shared_network_id + virtual_machine_interface_properties: + sub_interface_vlan_tag: + get_input: lb_st_vlan_type_oam + virtual_machine_interface_allowed_address_pairs: + allowed_address_pair: + - address_mode: active-standby + ip: + ip_prefix: + get_input: virtual_ip_address + ip_prefix_len: 32 + mac: + get_input: mac_address + - address_mode: active-standby + ip: + ip_prefix: + get_input: virtual_ipv6_address + ip_prefix_len: 128 + mac: + get_input: mac_address + virtual_machine_interface_mac_addresses: + mac_address: + - get_input: mac_address + groups: + vlan_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/vlan.yml + description: cmaui server template for vMMSC + members: + - template_Vlan_3 + - template_Vlan_2 + - template_Vlan_1 + substitution_mappings: + node_type: org.openecomp.resource.abstract.nodes.heat.subinterface.vlan + capabilities: + feature_template_Vlan_2: + - template_Vlan_2 + - feature + feature_template_Vlan_3: + - template_Vlan_3 + - feature + feature_template_Vlan_1: + - template_Vlan_1 + - feature + requirements: + subinterface_link_template_Vlan_3: + - template_Vlan_3 + - subinterface_link + subinterface_link_template_Vlan_2: + - template_Vlan_2 + - subinterface_link + dependency_template_Vlan_2: + - template_Vlan_2 + - dependency + dependency_template_Vlan_1: + - template_Vlan_1 + - dependency + subinterface_link_template_Vlan_1: + - template_Vlan_1 + - subinterface_link + binding_template_Vlan_2: + - template_Vlan_2 + - binding + binding_template_Vlan_1: + - template_Vlan_1 + - binding + binding_template_Vlan_3: + - template_Vlan_3 + - binding + dependency_template_Vlan_3: + - template_Vlan_3 + - 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/VlanToNetConnection/sharedAddOn/inputfiles/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VlanToNetConnection/sharedAddOn/inputfiles/MANIFEST.json index 1f762d0ccc..3346702d2a 100644 --- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VlanToNetConnection/sharedAddOn/inputfiles/MANIFEST.json +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VlanToNetConnection/sharedAddOn/inputfiles/MANIFEST.json @@ -12,6 +12,11 @@ "file": "addOn.yml", "type": "HEAT", "isBase": "false" + }, + { + "file": "vlan.yml", + "type": "HEAT", + "isBase": "false" } ] } diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VlanToNetConnection/sharedAddOn/inputfiles/addOn.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VlanToNetConnection/sharedAddOn/inputfiles/addOn.yml index 41c8f74ff3..b49b2ca96f 100644 --- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VlanToNetConnection/sharedAddOn/inputfiles/addOn.yml +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VlanToNetConnection/sharedAddOn/inputfiles/addOn.yml @@ -67,49 +67,6 @@ resources: port_tuple_refs: [{ get_param: template_PortTuple_LB1 }] security_group_refs: [{ get_param: oam_sec_group_name}] - template_Vlan_1: - type: OS::ContrailV2::VirtualMachineInterface - properties: - name: - str_replace: - template: $NAME$VLAN - params: - $NAME: { get_param: subinterface_name_prefix } - $VLAN: { get_param: [ vlan_ids, { get_param: subinterface_instance_index } ] } - virtual_machine_interface_properties: - { - virtual_machine_interface_properties_sub_interface_vlan_tag: { get_param: lb_st_vlan_type_oam } - } - virtual_machine_interface_mac_addresses: - { - virtual_machine_interface_mac_addresses_mac_address: [{ get_param: mac_address }], - } - virtual_machine_interface_allowed_address_pairs: - { - virtual_machine_interface_allowed_address_pairs_allowed_address_pair: [ - { - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: active-standby, - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_mac: { get_param: mac_address }, - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip: - { - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: virtual_ip_address }, - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: 32 - } - }, - { - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: active-standby, - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_mac: { get_param: mac_address }, - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip: - { - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: virtual_ipv6_address }, - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: 128 - } - } - ] - } - virtual_network_refs: [{ get_param: shared_network_id }] - virtual_machine_interface_refs: [{ get_resource: template_VMInt_OAM_lb_1 }] - template_VMInt_OAM_lb_2: type: OS::ContrailV2::VirtualMachineInterface properties: @@ -121,49 +78,6 @@ resources: port_tuple_refs: [{ get_param: template_PortTuple_LB1 }] security_group_refs: [{ get_param: oam_sec_group_name}] - template_Vlan_2: - type: OS::ContrailV2::VirtualMachineInterface - properties: - name: - str_replace: - template: $NAME$VLAN - params: - $NAME: { get_param: subinterface_name_prefix } - $VLAN: { get_param: [ vlan_ids, { get_param: subinterface_instance_index } ] } - virtual_machine_interface_properties: - { - virtual_machine_interface_properties_sub_interface_vlan_tag: { get_param: lb_st_vlan_type_oam } - } - virtual_machine_interface_mac_addresses: - { - virtual_machine_interface_mac_addresses_mac_address: [{ get_param: mac_address }], - } - virtual_machine_interface_allowed_address_pairs: - { - virtual_machine_interface_allowed_address_pairs_allowed_address_pair: [ - { - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: active-standby, - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_mac: { get_param: mac_address }, - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip: - { - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: virtual_ip_address }, - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: 32 - } - }, - { - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: active-standby, - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_mac: { get_param: mac_address }, - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip: - { - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: virtual_ipv6_address }, - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: 128 - } - } - ] - } - virtual_network_refs: [{ get_param: shared_network_id }, { get_param: shared_network_id1 }] - virtual_machine_interface_refs: [{ get_resource: template_VMInt_OAM_lb_1 }] - template_VMInt_OAM_lb_3: type: OS::ContrailV2::VirtualMachineInterface properties: @@ -175,56 +89,11 @@ resources: port_tuple_refs: [{ get_param: template_PortTuple_LB1 }] security_group_refs: [{ get_param: oam_sec_group_name}] - template_Vlan_3: - type: OS::ContrailV2::VirtualMachineInterface - properties: - name: - str_replace: - template: $NAME$VLAN - params: - $NAME: { get_param: subinterface_name_prefix } - $VLAN: { get_param: [ vlan_ids, { get_param: subinterface_instance_index } ] } - virtual_machine_interface_properties: - { - virtual_machine_interface_properties_sub_interface_vlan_tag: { get_param: lb_st_vlan_type_oam } - } - virtual_machine_interface_mac_addresses: - { - virtual_machine_interface_mac_addresses_mac_address: [{ get_param: mac_address }], - } - virtual_machine_interface_allowed_address_pairs: - { - virtual_machine_interface_allowed_address_pairs_allowed_address_pair: [ - { - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: active-standby, - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_mac: { get_param: mac_address }, - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip: - { - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: virtual_ip_address }, - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: 32 - } - }, - { - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: active-standby, - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_mac: { get_param: mac_address }, - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip: - { - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: virtual_ipv6_address }, - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: 128 - } - } - ] - } - virtual_network_refs: [{ get_param: [ shared_network_id2, 0] }] - virtual_machine_interface_refs: [{ get_resource: template_VMInt_OAM_lb_1 }] - - server_cmaui: - type: OS::Nova::Server + test_nested1: + type: vlan.yml properties: - name: { get_param: [cmaui_names, 0]} - image: { get_param: cmaui_image } - availability_zone: { get_param: availability_zone_0 } - flavor: { get_param: cmaui_flavor } - networks: - - port: { get_resource: template_VMInt_OAM_lb_1 } - - port: { get_resource: template_VMInt_OAM_lb_2 }
\ No newline at end of file + shared_network_id1: { get_param: shared_network_id1} + p2: { get_param: shared_network_id2} + p3: { get_resource: template_VMInt_OAM_lb_1} + p4: { get_resource: template_VMInt_OAM_lb_2} + p5: { get_resource: template_VMInt_OAM_lb_3}
\ 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/VlanToNetConnection/sharedAddOn/inputfiles/vlan.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VlanToNetConnection/sharedAddOn/inputfiles/vlan.yml new file mode 100644 index 0000000000..dbc5887313 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VlanToNetConnection/sharedAddOn/inputfiles/vlan.yml @@ -0,0 +1,198 @@ +heat_template_version: 2013-05-23 + +description: cmaui server template for vMMSC + +parameters: + p1: + type: string + description: UID of OAM network + p2: + type: string + description: UID of OAM network + p3: + type: string + description: UID of OAM network + p4: + type: string + description: UID of OAM network + p5: + type: string + description: UID of OAM network + cmaui_names: + type: comma_delimited_list + description: CMAUI1, CMAUI2 server names + security_group_name: + type: comma_delimited_list + description: CMAUI1, CMAUI2 server names + cmaui_image: + type: string + description: Image for CMAUI server + availability_zone_0: + type: string + label: availabilityzone name + description: availabilityzone name + cmaui_flavor: + type: string + description: Flavor for CMAUI server + shared_network_id: + type: string + description: Flavor for CMAUI server + shared_network_id1: + type: string + description: Flavor for CMAUI server + shared_network_id2: + type: comma_delimited_list + description: Flavor for CMAUI server + cmaui_oam_ips: + type: string + oam_sec_group_name: + type: string + lb_st_interface_type_oam: + type: string + template_PortTuple_LB1: + type: string + lb_st_vlan_type_oam: + description: dummy + type: string + mac_address: + type: string + virtual_ip_address: + type: string + virtual_ipv6_address: + type: string + vlan_ids: + type: string + subinterface_name_prefix: + type: string + subinterface_instance_index: + type: number + +resources: + template_Vlan_1: + type: OS::ContrailV2::VirtualMachineInterface + properties: + name: + str_replace: + template: $NAME$VLAN + params: + $NAME: { get_param: subinterface_name_prefix } + $VLAN: { get_param: [ vlan_ids, { get_param: subinterface_instance_index } ] } + virtual_machine_interface_properties: + { + virtual_machine_interface_properties_sub_interface_vlan_tag: { get_param: lb_st_vlan_type_oam } + } + virtual_machine_interface_mac_addresses: + { + virtual_machine_interface_mac_addresses_mac_address: [{ get_param: mac_address }], + } + virtual_machine_interface_allowed_address_pairs: + { + virtual_machine_interface_allowed_address_pairs_allowed_address_pair: [ + { + virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: active-standby, + virtual_machine_interface_allowed_address_pairs_allowed_address_pair_mac: { get_param: mac_address }, + virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip: + { + virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: virtual_ip_address }, + virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: 32 + } + }, + { + virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: active-standby, + virtual_machine_interface_allowed_address_pairs_allowed_address_pair_mac: { get_param: mac_address }, + virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip: + { + virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: virtual_ipv6_address }, + virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: 128 + } + } + ] + } + virtual_network_refs: [{ get_param: shared_network_id }] + virtual_machine_interface_refs: [{ get_param: p3}] + + template_Vlan_2: + type: OS::ContrailV2::VirtualMachineInterface + properties: + name: + str_replace: + template: $NAME$VLAN + params: + $NAME: { get_param: subinterface_name_prefix } + $VLAN: { get_param: [ vlan_ids, { get_param: subinterface_instance_index } ] } + virtual_machine_interface_properties: + { + virtual_machine_interface_properties_sub_interface_vlan_tag: { get_param: lb_st_vlan_type_oam } + } + virtual_machine_interface_mac_addresses: + { + virtual_machine_interface_mac_addresses_mac_address: [{ get_param: mac_address }], + } + virtual_machine_interface_allowed_address_pairs: + { + virtual_machine_interface_allowed_address_pairs_allowed_address_pair: [ + { + virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: active-standby, + virtual_machine_interface_allowed_address_pairs_allowed_address_pair_mac: { get_param: mac_address }, + virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip: + { + virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: virtual_ip_address }, + virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: 32 + } + }, + { + virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: active-standby, + virtual_machine_interface_allowed_address_pairs_allowed_address_pair_mac: { get_param: mac_address }, + virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip: + { + virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: virtual_ipv6_address }, + virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: 128 + } + } + ] + } + virtual_network_refs: [{ get_param: shared_network_id }, { get_param: shared_network_id1 }] + virtual_machine_interface_refs: [{ get_param: p4}] + + template_Vlan_3: + type: OS::ContrailV2::VirtualMachineInterface + properties: + name: + str_replace: + template: $NAME$VLAN + params: + $NAME: { get_param: subinterface_name_prefix } + $VLAN: { get_param: [ vlan_ids, { get_param: subinterface_instance_index } ] } + virtual_machine_interface_properties: + { + virtual_machine_interface_properties_sub_interface_vlan_tag: { get_param: lb_st_vlan_type_oam } + } + virtual_machine_interface_mac_addresses: + { + virtual_machine_interface_mac_addresses_mac_address: [{ get_param: mac_address }], + } + virtual_machine_interface_allowed_address_pairs: + { + virtual_machine_interface_allowed_address_pairs_allowed_address_pair: [ + { + virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: active-standby, + virtual_machine_interface_allowed_address_pairs_allowed_address_pair_mac: { get_param: mac_address }, + virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip: + { + virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: virtual_ip_address }, + virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: 32 + } + }, + { + virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: active-standby, + virtual_machine_interface_allowed_address_pairs_allowed_address_pair_mac: { get_param: mac_address }, + virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip: + { + virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: virtual_ipv6_address }, + virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: 128 + } + } + ] + } + virtual_network_refs: [{ get_param: [ shared_network_id2, 0] }] + virtual_machine_interface_refs: [{ get_param: p5}]
\ No newline at end of file |