diff options
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/getAttrNestedAtt')
4 files changed, 1255 insertions, 0 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/getAttrNestedAtt/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/getAttrNestedAtt/expectedoutputfiles/MainServiceTemplate.yaml new file mode 100644 index 0000000000..12d8824d57 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/getAttrNestedAtt/expectedoutputfiles/MainServiceTemplate.yaml @@ -0,0 +1,641 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: Main +imports: +- openecomp_heat_index: + file: openecomp-heat/_index.yml +node_types: + org.openecomp.resource.vfc.nodes.heat.cgi_fw: + derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server +topology_template: + inputs: + vf_module_id: + hidden: false + immutable: false + type: string + description: Unique ID for this VF Module instance + default: dummy_vf_module_id + nimbus_hsl_interface_type: + hidden: false + immutable: false + type: string + description: service_interface_type for ServiceInstance + default: other + cgi_fw_pt_vlan_VM2_name_fqdn: + hidden: false + immutable: false + type: json + description: fqdn of the ServiceInstance in PortTuple Resource + default: [ + ] + cgi_fw_vmi_ecmp_src_ip: + hidden: false + immutable: false + type: boolean + description: source_ip for the VirtualMachineInterface + default: true + cgi_fw_names: + label: Firewall VM Name + hidden: false + immutable: false + type: list + description: Comma Delimited List of Names for ServiceInstance VMs + default: + - zsde1fcgi02fgi001 + - zsde1fcgi02fgi002 + entry_schema: + type: string + cgi_fw_vmi_ecmp_dst_ip: + hidden: false + immutable: false + type: boolean + description: destination_ip for the VirtualMachineInterface + default: true + sgi_direct_interface_type: + hidden: false + immutable: false + type: string + description: service_interface_type for ServiceInstance + default: right + vnf_name: + hidden: false + immutable: false + type: string + description: Unique name for this VF instance + default: zrdm3firstnetfcgi02 + cgi_fw_flavor_name: + hidden: false + immutable: false + type: string + description: flavor for the ServiceInstance VM + default: m1.xlarge + vf_module_name: + hidden: false + immutable: false + type: string + description: Unique name for this VF Module instance + default: zsde1fcgi02 + cgi_fw_st_type: + hidden: false + immutable: false + type: string + description: service_type for the ServiceTemplate + default: firewall + sgi_protected_net_dummy_fqdn: + hidden: false + immutable: false + type: string + description: fq_name for the VirtualNetwork + default: default-domain:ALU-L3:firstnet_dummy_net_1 + cgi_fw_vmi_ecmp_src_port: + hidden: false + immutable: false + type: boolean + description: source_port for the VirtualMachineInterface + default: false + sgi_protected_net_dummy1: + hidden: false + immutable: false + type: string + description: name for the VirtualNetwork + vnf_id: + hidden: false + immutable: false + type: string + description: Unique ID for this VF instance + default: dummy_vnf_id + sgi_direct_net_fqdn: + hidden: false + immutable: false + type: string + description: fq_name for the VirtualNetwork + default: default-domain:ALU-L3:fgi_direct + sgi_protected_interface_type: + hidden: false + immutable: false + type: string + description: service_interface_type for ServiceInstance + default: left + cgi_fw_vmi_ecmp_dst_port: + hidden: false + immutable: false + type: boolean + description: destination_port for the VirtualMachineInterface + default: false + sgi_direct_family_v6: + hidden: false + immutable: false + type: string + description: IP Family Address for InstanceIp + default: v6 + availability_zone_0: + hidden: false + immutable: false + type: string + description: availability_zone for the ServiceInstance + default: nova + availability_zone_1: + hidden: false + immutable: false + type: string + description: availability_zone for the ServiceInstance + default: nova + nimbus_hsl_net_fqdn: + hidden: false + immutable: false + type: string + description: fq_name for the VirtualNetwork + default: default-domain:ALU-L3:alu-firstnet-net + sgi_protected_net_dummy: + hidden: false + immutable: false + type: string + description: name for the VirtualNetwork + default: firstnet_dummy_net_1 + cgi_fw_pt_vlan_VM1_name_fqdn: + hidden: false + immutable: false + type: json + description: fqdn of the ServiceInstance in PortTuple Resource + default: [ + ] + cgi_fw_vmi_ecmp_configured: + hidden: false + immutable: false + type: boolean + description: hashing_configured for the VirtualMachineInterface + default: true + cgi_fw_vmi_ecmp_ip_protocol: + hidden: false + immutable: false + type: boolean + description: ip_protocol for the VirtualMachineInterface + default: false + oam_protected_net_fqdn: + hidden: false + immutable: false + type: string + description: fq_name for the VirtualNetwork + default: default-domain:ALU-L3:alu_l3_mt_net + oam_protected_interface_type: + hidden: false + immutable: false + type: string + description: service_interface_type for ServiceInstance + default: management + cgi_fw_st_mode: + hidden: false + immutable: false + type: string + description: service_mode for the ServiceTemplate + default: in-network-nat + sgi_direct_ipv6_subnet_id: + hidden: false + immutable: false + type: string + description: Subnet UUID for InstanceIp + default: 4560666e-f306-4d7b-b0ec-a2d4330e9600 + contrail_vmi_subinterface: + hidden: false + immutable: false + type: string + port_name: + hidden: false + immutable: false + type: string + cgi_fw_image_name: + hidden: false + immutable: false + type: string + description: image_name for the ServiceInstance VM + default: F5_LB-FW_F5_12_1_HF1_Startup + cgi_fw_oam_protected_ips: + hidden: false + immutable: false + type: list + description: the ips of the management network for CGI FW + default: + - 192.168.50.40 + - 192.168.50.41 + entry_schema: + type: string + sgi_direct_subnet_id: + hidden: false + immutable: false + type: string + description: Subnet UUID for InstanceIp + default: 63858a9d-696b-4731-b3b3-7c8dfd777b9e + domain: + hidden: false + immutable: false + type: string + description: domain for the ServiceTemplate + default: default-domain + cgi_fw_st_version: + hidden: false + immutable: false + type: float + description: version for the ServiceTemplate + default: 2 + constraints: + - in_range: + - 0 + - 99 + cgi_fw_st_virtualization_type: + hidden: false + immutable: false + type: string + description: service_virtualization_type for the ServiceTemplate + default: virtual-machine + subinterface_name_prefix: + hidden: false + immutable: false + type: string + node_templates: + CGI_FW_OAM_PROTECTED_RVMI_2: + type: org.openecomp.resource.cp.nodes.heat.contrailV2.VirtualMachineInterface + properties: + name: + str_replace: + template: VM_NAME_vmi_1 + params: + VM_NAME: + get_input: + - cgi_fw_names + - 1 + security_group_refs: + - CGI_FW_RSG_SI_1 + virtual_network_refs: + - get_input: oam_protected_net_fqdn + virtual_machine_interface_properties: + service_interface_type: + get_input: oam_protected_interface_type + requirements: + - binding: + capability: tosca.capabilities.network.Bindable + node: CGI_FW_SERVER_2 + relationship: tosca.relationships.network.BindsTo + CGI_FW_SGI_DIRECT_RVMI_1: + type: org.openecomp.resource.cp.nodes.heat.contrailV2.VirtualMachineInterface + properties: + name: + str_replace: + template: VM_NAME_vmi_3 + params: + VM_NAME: + get_input: + - cgi_fw_names + - 0 + security_group_refs: + - CGI_FW_RSG_SI_1 + virtual_network_refs: + - get_input: sgi_direct_net_fqdn + virtual_machine_interface_properties: + service_interface_type: + get_input: sgi_direct_interface_type + port_tuple_refs: + get_input: cgi_fw_pt_vlan_VM1_name_fqdn + requirements: + - binding: + capability: tosca.capabilities.network.Bindable + node: CGI_FW_SERVER_1 + relationship: tosca.relationships.network.BindsTo + CGI_FW_OAM_PROTECTED_RVMI_1: + type: org.openecomp.resource.cp.nodes.heat.contrailV2.VirtualMachineInterface + properties: + name: + str_replace: + template: VM_NAME_vmi_1 + params: + VM_NAME: + get_input: + - cgi_fw_names + - 0 + security_group_refs: + - CGI_FW_RSG_SI_1 + virtual_network_refs: + - get_input: oam_protected_net_fqdn + virtual_machine_interface_properties: + service_interface_type: + get_input: oam_protected_interface_type + requirements: + - binding: + capability: tosca.capabilities.network.Bindable + node: CGI_FW_SERVER_1 + relationship: tosca.relationships.network.BindsTo + CGI_FW_SGI_DIRECT_RVMI_2: + type: org.openecomp.resource.cp.nodes.heat.contrailV2.VirtualMachineInterface + properties: + name: + str_replace: + template: VM_NAME_vmi_3 + params: + VM_NAME: + get_input: + - cgi_fw_names + - 1 + security_group_refs: + - CGI_FW_RSG_SI_1 + virtual_network_refs: + - get_input: sgi_direct_net_fqdn + virtual_machine_interface_properties: + service_interface_type: + get_input: sgi_direct_interface_type + port_tuple_refs: + get_input: cgi_fw_pt_vlan_VM2_name_fqdn + requirements: + - binding: + capability: tosca.capabilities.network.Bindable + node: CGI_FW_SERVER_2 + relationship: tosca.relationships.network.BindsTo + CGI_FW_NIMBUS_HSL_RVMI_2: + type: org.openecomp.resource.cp.nodes.heat.contrailV2.VirtualMachineInterface + properties: + name: + str_replace: + template: VM_NAME_vmi_4 + params: + VM_NAME: + get_input: + - cgi_fw_names + - 1 + security_group_refs: + - CGI_FW_RSG_SI_1 + virtual_network_refs: + - get_input: nimbus_hsl_net_fqdn + virtual_machine_interface_properties: + service_interface_type: + get_input: nimbus_hsl_interface_type + requirements: + - binding: + capability: tosca.capabilities.network.Bindable + node: CGI_FW_SERVER_2 + relationship: tosca.relationships.network.BindsTo + CGI_FW_NIMBUS_HSL_RVMI_1: + type: org.openecomp.resource.cp.nodes.heat.contrailV2.VirtualMachineInterface + properties: + name: + str_replace: + template: VM_NAME_vmi_4 + params: + VM_NAME: + get_input: + - cgi_fw_names + - 0 + security_group_refs: + - CGI_FW_RSG_SI_1 + virtual_network_refs: + - get_input: nimbus_hsl_net_fqdn + virtual_machine_interface_properties: + service_interface_type: + get_input: nimbus_hsl_interface_type + requirements: + - binding: + capability: tosca.capabilities.network.Bindable + node: CGI_FW_SERVER_1 + relationship: tosca.relationships.network.BindsTo + CGI_FW_SERVER_1: + type: org.openecomp.resource.vfc.nodes.heat.cgi_fw + properties: + flavor: + get_input: cgi_fw_flavor_name + availability_zone: + get_input: availability_zone_0 + image: + get_input: cgi_fw_image_name + metadata: + vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + vf_module_name: + get_input: vf_module_name + contrail_service_instance_ind: true + name: + get_input: + - cgi_fw_names + - 0 + scheduler_hints: + group: CGI_FW_RAG_group + CGI_FW_RSG_SI_1: + type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules + properties: + name: + str_replace: + template: VNF_NAME_sg_cgi_fw + params: + VNF_NAME: + get_input: vnf_name + description: Security Group of CGI FW ServiceInstance + rules: + - protocol: tcp + ethertype: IPv4 + remote_ip_prefix: 0.0.0.0/0 + port_range_max: 65535 + direction: egress + port_range_min: 0 + - protocol: udp + ethertype: IPv4 + remote_ip_prefix: 0.0.0.0/0 + port_range_max: 65535 + direction: egress + port_range_min: 0 + - protocol: '132' + ethertype: IPv4 + remote_ip_prefix: 0.0.0.0/0 + port_range_max: 65535 + direction: egress + port_range_min: 0 + - protocol: icmp + ethertype: IPv4 + remote_ip_prefix: 0.0.0.0/0 + direction: egress + - protocol: tcp + ethertype: IPv6 + remote_ip_prefix: ::/0 + port_range_max: 65535 + direction: egress + port_range_min: 0 + - protocol: udp + ethertype: IPv6 + remote_ip_prefix: ::/0 + port_range_max: 65535 + direction: egress + port_range_min: 0 + - protocol: '132' + ethertype: IPv6 + remote_ip_prefix: ::/0 + port_range_max: 65535 + direction: egress + port_range_min: 0 + - protocol: '58' + ethertype: IPv6 + remote_ip_prefix: ::/0 + direction: egress + - protocol: tcp + ethertype: IPv4 + remote_ip_prefix: 0.0.0.0/0 + port_range_max: 65535 + direction: ingress + port_range_min: 0 + - protocol: udp + ethertype: IPv4 + remote_ip_prefix: 0.0.0.0/0 + port_range_max: 65535 + direction: ingress + port_range_min: 0 + - protocol: '132' + ethertype: IPv4 + remote_ip_prefix: 0.0.0.0/0 + port_range_max: 65535 + direction: ingress + port_range_min: 0 + - protocol: icmp + ethertype: IPv4 + remote_ip_prefix: 0.0.0.0/0 + direction: ingress + - protocol: tcp + ethertype: IPv6 + remote_ip_prefix: ::/0 + port_range_max: 65535 + direction: ingress + port_range_min: 0 + - protocol: udp + ethertype: IPv6 + remote_ip_prefix: ::/0 + port_range_max: 65535 + direction: ingress + port_range_min: 0 + - protocol: '132' + ethertype: IPv6 + remote_ip_prefix: ::/0 + port_range_max: 65535 + direction: ingress + port_range_min: 0 + - protocol: '58' + ethertype: IPv6 + remote_ip_prefix: ::/0 + direction: ingress + CGI_FW_SGI_PROTECTED_RVMI_DUMMY_2: + type: org.openecomp.resource.cp.nodes.heat.contrailV2.VirtualMachineInterface + properties: + name: + str_replace: + template: VM_NAME_vmi_dummy + params: + VM_NAME: + get_input: + - cgi_fw_names + - 1 + security_group_refs: + - CGI_FW_RSG_SI_1 + virtual_network_refs: + - get_input: sgi_protected_net_dummy_fqdn + requirements: + - binding: + capability: tosca.capabilities.network.Bindable + node: CGI_FW_SERVER_2 + relationship: tosca.relationships.network.BindsTo + CGI_FW_SGI_PROTECTED_RVMI_DUMMY_1: + type: org.openecomp.resource.cp.nodes.heat.contrailV2.VirtualMachineInterface + properties: + name: + str_replace: + template: VM_NAME_vmi_dummy + params: + VM_NAME: + get_input: + - cgi_fw_names + - 0 + security_group_refs: + - CGI_FW_RSG_SI_1 + virtual_network_refs: + - get_input: sgi_protected_net_dummy_fqdn + requirements: + - binding: + capability: tosca.capabilities.network.Bindable + node: CGI_FW_SERVER_1 + relationship: tosca.relationships.network.BindsTo + CGI_FW_SERVER_2: + type: org.openecomp.resource.vfc.nodes.heat.cgi_fw + properties: + flavor: + get_input: cgi_fw_flavor_name + availability_zone: + get_attribute: + - contrail_vmi_subinterface + - virtual_machine_interface_allowed_address_pairs + - allowed_address_pair + image: + get_input: cgi_fw_image_name + metadata: + vf_module_id: + get_input: vf_module_id + vnf_id: + get_input: vnf_id + vnf_name: + get_input: vnf_name + vf_module_name: + get_input: vf_module_name + contrail_service_instance_ind: true + name: + get_input: + - cgi_fw_names + - 1 + scheduler_hints: + group: CGI_FW_RAG_group + contrail_vmi_subinterface: + type: org.openecomp.resource.cp.nodes.heat.contrailV2.VirtualMachineInterface + properties: + name: + str_replace: + template: VM_NAME_PORT_3 + params: + VM_NAME: + get_input: vipr_atm_name_0 + virtual_network_refs: + - get_input: oam_protected_net_fqdn + virtual_machine_interface_properties: + service_interface_type: left + port_tuple_refs: + - get_input: port_name + groups: + CGI_FW_RAG_group: + type: tosca.groups.Root + members: + - CGI_FW_SERVER_1 + - CGI_FW_SERVER_2 + base_firstnet_fgi_frwl_group: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/base_firstnet_fgi_frwl.yml + description: | + HOT template to create SecurityGroup//ServerGroup//ServiceTemplate: + members: + - CGI_FW_OAM_PROTECTED_RVMI_2 + - CGI_FW_SGI_DIRECT_RVMI_1 + - CGI_FW_OAM_PROTECTED_RVMI_1 + - CGI_FW_SGI_DIRECT_RVMI_2 + - CGI_FW_NIMBUS_HSL_RVMI_2 + - CGI_FW_NIMBUS_HSL_RVMI_1 + - CGI_FW_SERVER_1 + - CGI_FW_RSG_SI_1 + - CGI_FW_SGI_PROTECTED_RVMI_DUMMY_2 + - CGI_FW_SGI_PROTECTED_RVMI_DUMMY_1 + - CGI_FW_SERVER_2 + - contrail_vmi_subinterface + policies: + CGI_FW_RAG_policy: + type: org.openecomp.policies.placement.Antilocate + properties: + name: + str_replace: + template: VNF_NAME_srg_cgi_fw + params: + VNF_NAME: + get_input: vnf_name + container_type: host + targets: + - CGI_FW_RAG_group
\ 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/getAttrNestedAtt/inputfiles/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/getAttrNestedAtt/inputfiles/MANIFEST.json new file mode 100644 index 0000000000..a4168d91ca --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/getAttrNestedAtt/inputfiles/MANIFEST.json @@ -0,0 +1,17 @@ +{ + "name": "", + "description": "", + "data": [ + { + "file": "base_firstnet_fgi_frwl.yml", + "type": "HEAT", + "isBase": "true", + "data": [ + { + "file": "base_firstnet_fgi_frwl.env", + "type": "HEAT_ENV" + } + ] + } + ] +}
\ 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/getAttrNestedAtt/inputfiles/base_firstnet_fgi_frwl.env b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/getAttrNestedAtt/inputfiles/base_firstnet_fgi_frwl.env new file mode 100644 index 0000000000..0001d8a92b --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/getAttrNestedAtt/inputfiles/base_firstnet_fgi_frwl.env @@ -0,0 +1,71 @@ +#FIRSTNET - FW -CGI // Contrail 3.0 Version 2 Template +#AUTHORS: Rajesh Anne (ja702x) + +##################### +parameters: +##################### + +#### fq_name means different things in different contexts/resources/attributes +# fq_name: 'default-domain:Nimbus:????' + +## GLOBAL//Basic Parameters + vnf_name: 'zrdm3firstnetfcgi02' + domain: 'default-domain' + +#### PROTECTED_NET_1 + sgi_protected_interface_type: 'left' +#### DIRECT_NET_1 + sgi_direct_interface_type: 'right' + +## ST//ServiceTemplate Parameters + cgi_fw_st_version: 2 +# service_template_properties_service_mode: 'transparent' / 'in-network' / 'in-network-nat' + cgi_fw_st_mode: 'in-network-nat' + cgi_fw_st_type: 'firewall' + cgi_fw_st_virtualization_type: 'virtual-machine' + +## GLOBAL//Basic Parameters + vf_module_name: 'zsde1fcgi02' + vf_module_id: 'dummy_vf_module_id' + vnf_id: 'dummy_vnf_id' + +## Global//Network Parameters + oam_protected_net_fqdn: 'default-domain:ALU-L3:alu_l3_mt_net' + sgi_protected_net_dummy: 'firstnet_dummy_net_1' + sgi_protected_net_dummy_fqdn: 'default-domain:ALU-L3:firstnet_dummy_net_1' + sgi_direct_net_fqdn: 'default-domain:ALU-L3:fgi_direct' + nimbus_hsl_net_fqdn: 'default-domain:ALU-L3:alu-firstnet-net' +#### MGMT_NET_1 + oam_protected_interface_type: 'management' + +#### HSL_NET_1 + nimbus_hsl_interface_type: 'other' + +## PT//PortTuple Parameters + cgi_fw_pt_vlan_VM1_name_fqdn: [ ] + cgi_fw_pt_vlan_VM2_name_fqdn: [ ] +##cgi_fw_pt_vlan10_VM1_name_fqdn: [ 'default-domain:Nimbus:zsde1fcgi01_si_cgi_fw_vlan10:default-port-tuple-303c36d9-7111-4b76-9e8e-f6394d81e567' , 'default-domain:Nimbus:zsde1fcgi01_si_cgi_fw_vlan_11:default-port-tuple' , 'default-domain:Nimbus:zsde1fcgi01_si_cgi_fw_vlan_12:default-port-tuple-b53a9a1f-b929-4769-8957-7138278855c5' ] +##cgi_fw_pt_vlan10_VM2_name_fqdn: [ 'default-domain:Nimbus:zsde1fcgi01_si_cgi_fw_vlan10:default-port-tuple' , 'default-domain:Nimbus:zsde1fcgi01_si_cgi_fw_vlan_11:default-port-tuple-da45ffdb-d09c-46e9-a7e4-535d00c6303f' , 'default-domain:Nimbus:zsde1fcgi01_si_cgi_fw_vlan_12:default-port-tuple' ] +## VMI//VirtualMachineInterface ECMP Parameters + cgi_fw_vmi_ecmp_configured: True + cgi_fw_vmi_ecmp_src_ip: True + cgi_fw_vmi_ecmp_dst_ip: True + cgi_fw_vmi_ecmp_ip_protocol: False + cgi_fw_vmi_ecmp_src_port: False + cgi_fw_vmi_ecmp_dst_port: False + +## II/InstanceIp Parameters + cgi_fw_oam_protected_ips: '192.168.50.40,192.168.50.41' +#### II//InstanceIp OS::Neutron::Subnet UUID for right network -- sgi_direct_net + sgi_direct_subnet_id: '63858a9d-696b-4731-b3b3-7c8dfd777b9e' +#### II//InstanceIp OS::Neutron::Subnet UUID for right network v6 --sgi_direct_net v6 + sgi_direct_ipv6_subnet_id: '4560666e-f306-4d7b-b0ec-a2d4330e9600' +#### II/InstanceIp Property instance_ip_family for VM Interface 3 IPv6 (RIGHT/DIRECT) + sgi_direct_family_v6: 'v6' + +## VM//NovaServer Parameters + cgi_fw_image_name: 'F5_LB-FW_F5_12_1_HF1_Startup' + cgi_fw_flavor_name: 'm1.xlarge' + availability_zone_0: 'nova' + availability_zone_1: 'nova' + cgi_fw_names: 'zsde1fcgi02fgi001,zsde1fcgi02fgi002'
\ 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/getAttrNestedAtt/inputfiles/base_firstnet_fgi_frwl.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/getAttrNestedAtt/inputfiles/base_firstnet_fgi_frwl.yml new file mode 100644 index 0000000000..01e6db751a --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/getAttrNestedAtt/inputfiles/base_firstnet_fgi_frwl.yml @@ -0,0 +1,526 @@ +heat_template_version: 2015-04-30 +#FIRSTNET - FW -FGI// Contrail 3.0 Version 2 Template +#AUTHORS: Rajesh Anne (ja702x) +description: > + HOT template to create SecurityGroup//ServerGroup//ServiceTemplate: + +##################### +parameters: +##################### + +## GLOBAL//Basic Parameters +## OPENECOMP VNF//VM Parameters + vnf_name: + type: string + description: Unique name for this VF instance +# For manual spinups, value must be in the ENV file. Must be removed from ENV before uploading to ASDC + + domain: + type: string + description: domain for the ServiceTemplate +# For manual spinups, value must be in the ENV file. Must be removed from ENV before uploading to ASDC + vnf_id: + type: string + description: Unique ID for this VF instance +# For manual spinups, value must be in the ENV file. Must be removed from ENV before uploading to ASDC + vf_module_id: + type: string + description: Unique ID for this VF Module instance +# For manual spinups, value must be in the ENV file. Must be removed from ENV before uploading to ASDC + vf_module_name: + type: string + description: Unique name for this VF Module instance +# For manual spinups, value must be in the ENV file. Must be removed from ENV before uploading to ASDC +## GLOBAL//Network Parameters + sgi_protected_interface_type: + type: string + description: service_interface_type for ServiceInstance + sgi_direct_interface_type: + type: string + description: service_interface_type for ServiceInstance + oam_protected_net_fqdn: + type: string + description: fq_name for the VirtualNetwork + sgi_protected_net_dummy: + type: string + description: name for the VirtualNetwork + sgi_protected_net_dummy1: + type: string + description: name for the VirtualNetwork + sgi_protected_net_dummy_fqdn: + type: string + description: fq_name for the VirtualNetwork + sgi_direct_net_fqdn: + type: string + description: fq_name for the VirtualNetwork + nimbus_hsl_net_fqdn: + type: string + description: fq_name for the VirtualNetwork + oam_protected_interface_type: + type: string + description: service_interface_type for ServiceInstance + + nimbus_hsl_interface_type: + type: string + description: service_interface_type for ServiceInstance +## PT//PortTuple Parameters + cgi_fw_pt_vlan_VM1_name_fqdn: + type: json + description: fqdn of the ServiceInstance in PortTuple Resource + cgi_fw_pt_vlan_VM2_name_fqdn: + type: json + description: fqdn of the ServiceInstance in PortTuple Resource +## ST//ServiceTemplate Parameters + cgi_fw_st_version: + type: number + description: version for the ServiceTemplate + constraints: + - range: { min: 0, max: 99 } + description: Must be a number between 0 and 99 + cgi_fw_st_mode: + type: string + description: service_mode for the ServiceTemplate + cgi_fw_st_type: + type: string + description: service_type for the ServiceTemplate + cgi_fw_st_virtualization_type: + type: string + description: service_virtualization_type for the ServiceTemplate +## VMI//VirtualMachineInterface ECMP Parameters + cgi_fw_vmi_ecmp_configured: + type: boolean + description: hashing_configured for the VirtualMachineInterface + cgi_fw_vmi_ecmp_src_ip: + type: boolean + description: source_ip for the VirtualMachineInterface + cgi_fw_vmi_ecmp_dst_ip: + type: boolean + description: destination_ip for the VirtualMachineInterface + cgi_fw_vmi_ecmp_ip_protocol: + type: boolean + description: ip_protocol for the VirtualMachineInterface + cgi_fw_vmi_ecmp_src_port: + type: boolean + description: source_port for the VirtualMachineInterface + cgi_fw_vmi_ecmp_dst_port: + type: boolean + description: destination_port for the VirtualMachineInterface +## II//InstanceIp + sgi_direct_family_v6: + type: string + description: IP Family Address for InstanceIp + sgi_direct_subnet_id: + type: string + description: Subnet UUID for InstanceIp + sgi_direct_ipv6_subnet_id: + type: string + description: Subnet UUID for InstanceIp +## VM//NovaServer Parameters + cgi_fw_image_name: + type: string + description: image_name for the ServiceInstance VM + cgi_fw_flavor_name: + type: string + description: flavor for the ServiceInstance VM + availability_zone_0: + type: string + description: availability_zone for the ServiceInstance + availability_zone_1: + type: string + description: availability_zone for the ServiceInstance + cgi_fw_names: + type: comma_delimited_list + label: Firewall VM Name + description: Comma Delimited List of Names for ServiceInstance VMs + cgi_fw_oam_protected_ips: + type: comma_delimited_list + description: the ips of the management network for CGI FW + contrail_vmi_subinterface: + type: string + port_name: + type: string + subinterface_name_prefix: + type: string +##################### +resources: +##################### + +## RSG//Resource:SecurityGroup + CGI_FW_RSG_SI_1: + type: OS::Neutron::SecurityGroup + properties: + description: Security Group of CGI FW ServiceInstance + name: + str_replace: + template: VNF_NAME_sg_cgi_fw + params: + VNF_NAME: { get_param: vnf_name } + rules: + - {"direction": "egress", "remote_ip_prefix": "0.0.0.0/0", "protocol": "tcp", "ethertype": "IPv4", "port_range_max": 65535, "port_range_min": 0} + - {"direction": "egress", "remote_ip_prefix": "0.0.0.0/0", "protocol": "udp", "ethertype": "IPv4", "port_range_max": 65535, "port_range_min": 0} + - {"direction": "egress", "remote_ip_prefix": "0.0.0.0/0", "protocol": "132", "ethertype": "IPv4", "port_range_max": 65535, "port_range_min": 0} + - {"direction": "egress", "remote_ip_prefix": "0.0.0.0/0", "protocol": "icmp", "ethertype": "IPv4"} + - {"direction": "egress", "remote_ip_prefix": "::/0", "protocol": "tcp", "ethertype": "IPv6", "port_range_max": 65535, "port_range_min": 0} + - {"direction": "egress", "remote_ip_prefix": "::/0", "protocol": "udp", "ethertype": "IPv6", "port_range_max": 65535, "port_range_min": 0} + - {"direction": "egress", "remote_ip_prefix": "::/0", "protocol": "132", "ethertype": "IPv6", "port_range_max": 65535, "port_range_min": 0} + - {"direction": "egress", "remote_ip_prefix": "::/0", "protocol": "58", "ethertype": "IPv6"} + - {"direction": "ingress", "remote_ip_prefix": "0.0.0.0/0", "protocol": "tcp", "ethertype": "IPv4", "port_range_max": 65535, "port_range_min": 0} + - {"direction": "ingress", "remote_ip_prefix": "0.0.0.0/0", "protocol": "udp", "ethertype": "IPv4", "port_range_max": 65535, "port_range_min": 0} + - {"direction": "ingress", "remote_ip_prefix": "0.0.0.0/0", "protocol": "132", "ethertype": "IPv4", "port_range_max": 65535, "port_range_min": 0} + - {"direction": "ingress", "remote_ip_prefix": "0.0.0.0/0", "protocol": "icmp", "ethertype": "IPv4"} + - {"direction": "ingress", "remote_ip_prefix": "::/0", "protocol": "tcp", "ethertype": "IPv6", "port_range_max": 65535, "port_range_min": 0} + - {"direction": "ingress", "remote_ip_prefix": "::/0", "protocol": "udp", "ethertype": "IPv6", "port_range_max": 65535, "port_range_min": 0} + - {"direction": "ingress", "remote_ip_prefix": "::/0", "protocol": "132", "ethertype": "IPv6", "port_range_max": 65535, "port_range_min": 0} + - {"direction": "ingress", "remote_ip_prefix": "::/0", "protocol": "58", "ethertype": "IPv6"} + +## RAG//Resource:Anti-Affinity Group + CGI_FW_RAG: + type: OS::Nova::ServerGroup + properties: + name: + str_replace: + template: VNF_NAME_srg_cgi_fw + params: + VNF_NAME: { get_param: vnf_name } + policies: + - anti-affinity + +## RST//Resource:ServiceTemplate + CGI_FW_RST_1: + type: OS::ContrailV2::ServiceTemplate + properties: + domain: { get_param: domain } + name: + str_replace: + template: VNF_NAME_st_cgi_fw + params: + VNF_NAME: { get_param: vnf_name } + service_template_properties: + service_template_properties_version: { get_param: cgi_fw_st_version } + service_template_properties_service_mode: { get_param: cgi_fw_st_mode } + service_template_properties_service_type: { get_param: cgi_fw_st_type } + service_template_properties_service_virtualization_type: { get_param: cgi_fw_st_virtualization_type } + service_template_properties_interface_type: + - service_template_properties_interface_type_service_interface_type: { get_param: sgi_protected_interface_type } + - service_template_properties_interface_type_service_interface_type: { get_param: sgi_direct_interface_type } + +## RVMI//Resource:VirtualMachineInterface +#### CGI_FW VirtualMachineInterface for 1st Interface // MGMT // oam_protected_NET_1 + CGI_FW_OAM_PROTECTED_RVMI_1: + type: OS::ContrailV2::VirtualMachineInterface + properties: + name: + str_replace: + template: VM_NAME_vmi_1 + params: + VM_NAME: { get_param: [ cgi_fw_names,0 ] } + virtual_machine_interface_properties: + virtual_machine_interface_properties_service_interface_type: { get_param: oam_protected_interface_type } + virtual_network_refs: + - get_param: oam_protected_net_fqdn + security_group_refs: + - get_resource: CGI_FW_RSG_SI_1 + CGI_FW_OAM_PROTECTED_RVMI_2: + type: OS::ContrailV2::VirtualMachineInterface + properties: + name: + str_replace: + template: VM_NAME_vmi_1 + params: + VM_NAME: { get_param: [ cgi_fw_names,1 ] } + virtual_machine_interface_properties: + virtual_machine_interface_properties_service_interface_type: { get_param: oam_protected_interface_type } + virtual_network_refs: + - get_param: oam_protected_net_fqdn + security_group_refs: + - get_resource: CGI_FW_RSG_SI_1 + +#### CGI_FW VirtualMachineInterface for 2nd Interface // LEFT // PROTECTED_NET_1 (ServiceChain) + CGI_FW_SGI_PROTECTED_RVMI_DUMMY_1: + type: OS::ContrailV2::VirtualMachineInterface + properties: + name: + str_replace: + template: VM_NAME_vmi_dummy + params: + VM_NAME: { get_param: [ cgi_fw_names,0 ] } + virtual_network_refs: + - get_param: sgi_protected_net_dummy_fqdn + security_group_refs: + - get_resource: CGI_FW_RSG_SI_1 + + CGI_FW_SGI_PROTECTED_RVMI_DUMMY_2: + type: OS::ContrailV2::VirtualMachineInterface + properties: + name: + str_replace: + template: VM_NAME_vmi_dummy + params: + VM_NAME: { get_param: [ cgi_fw_names,1 ] } + virtual_network_refs: + - get_param: sgi_protected_net_dummy_fqdn + security_group_refs: + - get_resource: CGI_FW_RSG_SI_1 + +#### CGI_FW VirtualMachineInterface for 3rd Interface // RIGHT // DIRECT_NET_1 (ServiceChain) + CGI_FW_SGI_DIRECT_RVMI_1: + type: OS::ContrailV2::VirtualMachineInterface + properties: + name: + str_replace: + template: VM_NAME_vmi_3 + params: + VM_NAME: { get_param: [ cgi_fw_names,0 ] } + ecmp_hashing_include_fields: + ecmp_hashing_include_fields_hashing_configured: + get_param: cgi_fw_vmi_ecmp_configured + ecmp_hashing_include_fields_source_ip: + get_param: cgi_fw_vmi_ecmp_src_ip + ecmp_hashing_include_fields_destination_ip: + get_param: cgi_fw_vmi_ecmp_dst_ip + ecmp_hashing_include_fields_ip_protocol: + get_param: cgi_fw_vmi_ecmp_ip_protocol + ecmp_hashing_include_fields_source_port: + get_param: cgi_fw_vmi_ecmp_src_port + ecmp_hashing_include_fields_destination_port: + get_param: cgi_fw_vmi_ecmp_dst_port + virtual_machine_interface_properties: + virtual_machine_interface_properties_service_interface_type: { get_param: sgi_direct_interface_type } + port_tuple_refs: { get_param: cgi_fw_pt_vlan_VM1_name_fqdn } + virtual_network_refs: + - get_param: sgi_direct_net_fqdn + security_group_refs: + - get_resource: CGI_FW_RSG_SI_1 + CGI_FW_SGI_DIRECT_RVMI_2: + type: OS::ContrailV2::VirtualMachineInterface + properties: + name: + str_replace: + template: VM_NAME_vmi_3 + params: + VM_NAME: { get_param: [ cgi_fw_names,1 ] } + ecmp_hashing_include_fields: + ecmp_hashing_include_fields_hashing_configured: + get_param: cgi_fw_vmi_ecmp_configured + ecmp_hashing_include_fields_source_ip: + get_param: cgi_fw_vmi_ecmp_src_ip + ecmp_hashing_include_fields_destination_ip: + get_param: cgi_fw_vmi_ecmp_dst_ip + ecmp_hashing_include_fields_ip_protocol: + get_param: cgi_fw_vmi_ecmp_ip_protocol + ecmp_hashing_include_fields_source_port: + get_param: cgi_fw_vmi_ecmp_src_port + ecmp_hashing_include_fields_destination_port: + get_param: cgi_fw_vmi_ecmp_dst_port + virtual_machine_interface_properties: + virtual_machine_interface_properties_service_interface_type: { get_param: sgi_direct_interface_type } + port_tuple_refs: { get_param: cgi_fw_pt_vlan_VM2_name_fqdn } + virtual_network_refs: + - get_param: sgi_direct_net_fqdn + security_group_refs: + - get_resource: CGI_FW_RSG_SI_1 + +#### CGI_FW VirtualMachineInterface for 4th Interface // OTHER // HSL_NET_1 + CGI_FW_NIMBUS_HSL_RVMI_1: + type: OS::ContrailV2::VirtualMachineInterface + properties: + name: + str_replace: + template: VM_NAME_vmi_4 + params: + VM_NAME: { get_param: [ cgi_fw_names,0 ] } + virtual_machine_interface_properties: + virtual_machine_interface_properties_service_interface_type: { get_param: nimbus_hsl_interface_type } + virtual_network_refs: + - get_param: nimbus_hsl_net_fqdn + security_group_refs: + - get_resource: CGI_FW_RSG_SI_1 + CGI_FW_NIMBUS_HSL_RVMI_2: + type: OS::ContrailV2::VirtualMachineInterface + properties: + name: + str_replace: + template: VM_NAME_vmi_4 + params: + VM_NAME: { get_param: [ cgi_fw_names,1 ] } + virtual_machine_interface_properties: + virtual_machine_interface_properties_service_interface_type: { get_param: nimbus_hsl_interface_type } + virtual_network_refs: + - get_param: nimbus_hsl_net_fqdn + security_group_refs: + - get_resource: CGI_FW_RSG_SI_1 + +## RII//Resource:InstanceIp +#### CGI_FW InstanceIp for 1st Interface // MGMT // oam_protected_NET_1 + CGI_FW_OAM_PROTECTED_RII_1: + type: OS::ContrailV2::InstanceIp + depends_on: + - CGI_FW_OAM_PROTECTED_RVMI_1 + properties: + virtual_machine_interface_refs: + - get_resource: CGI_FW_OAM_PROTECTED_RVMI_1 + virtual_network_refs: + - get_param: oam_protected_net_fqdn + instance_ip_address: { get_param: [cgi_fw_oam_protected_ips,0 ] } + CGI_FW_OAM_PROTECTED_RII_2: + type: OS::ContrailV2::InstanceIp + depends_on: + - CGI_FW_OAM_PROTECTED_RVMI_2 + properties: + virtual_machine_interface_refs: + - get_resource: CGI_FW_OAM_PROTECTED_RVMI_2 + virtual_network_refs: + - get_param: oam_protected_net_fqdn + instance_ip_address: { get_param: [cgi_fw_oam_protected_ips,1 ] } + +#### CGI_FW InstanceIp for 2nd Interface // DUMMY // PROTECTED_NET_1 + CGI_FW_SGI_PROTECTED_RII_DUMMY_1: + type: OS::ContrailV2::InstanceIp + depends_on: + - CGI_FW_SGI_PROTECTED_RVMI_DUMMY_1 + properties: + virtual_machine_interface_refs: + - get_resource: CGI_FW_SGI_PROTECTED_RVMI_DUMMY_1 + virtual_network_refs: + - get_param: sgi_protected_net_dummy_fqdn + CGI_FW_SGI_PROTECTED_RII_DUMMY_2: + type: OS::ContrailV2::InstanceIp + depends_on: + - CGI_FW_SGI_PROTECTED_RVMI_DUMMY_2 + properties: + virtual_machine_interface_refs: + - get_resource: CGI_FW_SGI_PROTECTED_RVMI_DUMMY_2 + virtual_network_refs: + - get_param: sgi_protected_net_dummy_fqdn + +#### CGI_FW InstanceIp for 3rd Interface // RIGHT // DIRECT_NET_1 + CGI_FW_SGI_DIRECT_RII_1: + type: OS::ContrailV2::InstanceIp + depends_on: + - CGI_FW_SGI_DIRECT_RVMI_1 + properties: + virtual_machine_interface_refs: + - get_resource: CGI_FW_SGI_DIRECT_RVMI_1 + virtual_network_refs: + - get_param: sgi_direct_net_fqdn + subnet_uuid: { get_param: sgi_direct_subnet_id } + CGI_FW_SGI_DIRECT_RII_2: + type: OS::ContrailV2::InstanceIp + depends_on: + - CGI_FW_SGI_DIRECT_RVMI_2 + properties: + virtual_machine_interface_refs: + - get_resource: CGI_FW_SGI_DIRECT_RVMI_2 + virtual_network_refs: + - get_param: sgi_direct_net_fqdn + subnet_uuid: { get_param: sgi_direct_subnet_id } + +#### CGI_FW InstanceIp for 3rd Interface v6 // RIGHT // DIRECT_NET_1 + CGI_FW_SGI_DIRECT_V6_RII_1: + type: OS::ContrailV2::InstanceIp + depends_on: + - CGI_FW_SGI_DIRECT_RVMI_2 + properties: + virtual_machine_interface_refs: + - get_resource: CGI_FW_SGI_DIRECT_RVMI_1 + virtual_network_refs: + - get_param: sgi_direct_net_fqdn + subnet_uuid: { get_param: sgi_direct_ipv6_subnet_id } + instance_ip_family: { get_param: sgi_direct_family_v6 } + CGI_FW_SGI_DIRECT_V6_RII_2: + type: OS::ContrailV2::InstanceIp + depends_on: + - CGI_FW_SGI_DIRECT_RVMI_2 + properties: + virtual_machine_interface_refs: + - get_resource: CGI_FW_SGI_DIRECT_RVMI_2 + virtual_network_refs: + - get_param: sgi_direct_net_fqdn + subnet_uuid: { get_param: sgi_direct_ipv6_subnet_id } + instance_ip_family: { get_param: sgi_direct_family_v6 } + +#### CGI_FW InstanceIp for 4th Interface // OTHER // HSL_NET_1 + CGI_FW_NIMBUS_HSL_RII_1: + type: OS::ContrailV2::InstanceIp + depends_on: + - CGI_FW_NIMBUS_HSL_RVMI_1 + properties: + virtual_machine_interface_refs: + - get_resource: CGI_FW_NIMBUS_HSL_RVMI_1 + virtual_network_refs: + - get_param: nimbus_hsl_net_fqdn + CGI_FW_NIMBUS_HSL_RII_2: + type: OS::ContrailV2::InstanceIp + depends_on: + - CGI_FW_NIMBUS_HSL_RVMI_2 + properties: + virtual_machine_interface_refs: + - get_resource: CGI_FW_NIMBUS_HSL_RVMI_2 + virtual_network_refs: + - get_param: nimbus_hsl_net_fqdn + +## RNS//Resource:NovaServer +#### CGI_FW ServiceInstance OS::Nova::Server VM 1 + CGI_FW_SERVER_1: + type: OS::Nova::Server + depends_on: + - CGI_FW_OAM_PROTECTED_RII_1 + - CGI_FW_SGI_PROTECTED_RII_DUMMY_1 + - CGI_FW_SGI_DIRECT_RII_1 + - CGI_FW_SGI_DIRECT_V6_RII_1 + - CGI_FW_NIMBUS_HSL_RII_1 + properties: + name: { get_param: [ cgi_fw_names,0 ] } + image: { get_param: cgi_fw_image_name } + flavor: { get_param: cgi_fw_flavor_name } + availability_zone: { get_param: availability_zone_0 } + scheduler_hints: { group: {get_resource: CGI_FW_RAG } } + networks: + - port: { get_resource: CGI_FW_OAM_PROTECTED_RVMI_1 } + - port: { get_resource: CGI_FW_SGI_PROTECTED_RVMI_DUMMY_1 } + - port: { get_resource: CGI_FW_SGI_DIRECT_RVMI_1 } + - port: { get_resource: CGI_FW_NIMBUS_HSL_RVMI_1 } + metadata: + vf_module_name: { get_param: vf_module_name } + vnf_name: { get_param: vnf_name } + vnf_id: { get_param: vnf_id } + vf_module_id: { get_param: vf_module_id } + CGI_FW_SERVER_2: + type: OS::Nova::Server + depends_on: + - CGI_FW_OAM_PROTECTED_RII_2 + - CGI_FW_SGI_PROTECTED_RII_DUMMY_2 + - CGI_FW_SGI_DIRECT_RII_2 + - CGI_FW_SGI_DIRECT_V6_RII_2 + - CGI_FW_NIMBUS_HSL_RII_2 + properties: + name: { get_param: [ cgi_fw_names,1 ] } + image: { get_param: cgi_fw_image_name } + flavor: { get_param: cgi_fw_flavor_name } + availability_zone: { get_attr: [contrail_vmi_subinterface, virtual_machine_interface_allowed_address_pairs, virtual_machine_interface_allowed_address_pairs_allowed_address_pair ] } + scheduler_hints: { group: {get_resource: CGI_FW_RAG } } + networks: + - port: { get_resource: CGI_FW_OAM_PROTECTED_RVMI_2 } + - port: { get_resource: CGI_FW_SGI_PROTECTED_RVMI_DUMMY_2 } + - port: { get_resource: CGI_FW_SGI_DIRECT_RVMI_2 } + - port: { get_resource: CGI_FW_NIMBUS_HSL_RVMI_2 } + metadata: + vf_module_name: { get_param: vf_module_name } + vnf_name: { get_param: vnf_name } + vnf_id: { get_param: vnf_id } + vf_module_id: { get_param: vf_module_id } + + contrail_vmi_subinterface: + type: OS::ContrailV2::VirtualMachineInterface + properties: + name: + str_replace: + template: VM_NAME_PORT_3 + params: + VM_NAME: { get_param: vipr_atm_name_0 } + virtual_machine_interface_properties: + { + virtual_machine_interface_properties_service_interface_type: 'left' + } + port_tuple_refs: [{ get_param: port_name }] + virtual_network_refs: [{ get_param: oam_protected_net_fqdn }]
\ No newline at end of file |