1 ##############################################################################
2 # Copyright (c) 2019 Mirantis Inc., Enea AB and others.
3 # All rights reserved. This program and the accompanying materials
4 # are made available under the terms of the Apache License, Version 2.0
5 # which accompanies this distribution, and is available at
6 # http://www.apache.org/licenses/LICENSE-2.0
7 ##############################################################################
8 {%- import 'net_map.j2' as nm with context %}
9 {%- import 'net_macros.j2' as ma with context %}
10 {#- Filter-out NIC duplicates by constructing a dict (used NICs only) #}
11 {%- if '-vcp-' in conf.MCP_DEPLOY_SCENARIO %}
15 {%- set nics = { nm.ctl01.nic_mgmt: True, nm.ctl01.nic_public: True } %}
16 {%- set vlans = { nm.vlan_mgmt: nm.ctl01.nic_mgmt, nm.vlan_public: nm.ctl01.nic_public } %}
20 - cluster.mcp-iec-noha
21 - cluster.all-mcp-arch-common.opnfv.maas_proxy
22 - cluster.all-mcp-arch-common.opnfv.lab_proxy_pdf
25 {%- if '-vcp-' in conf.MCP_DEPLOY_SCENARIO %}
26 pxe_admin_interface: ${_param:opnfv_vcp_vm_primary_interface}
27 external_nic: ${_param:opnfv_vcp_vm_secondary_interface}
28 single_nic: ${_param:opnfv_vcp_vm_tertiary_interface}
30 pxe_admin_interface: {{ nm.ctl01.nic_admin }}
31 external_nic: {{ ma.interface_str(nm.ctl01.nic_public, nm.vlan_public) }}
32 single_nic: {{ ma.interface_str(nm.ctl01.nic_mgmt, nm.vlan_mgmt) }}
39 name: ${_param:pxe_admin_interface}
42 address: ${_param:pxe_admin_address}
43 netmask: ${_param:opnfv_net_admin_mask}
44 mtu: ${_param:interface_mtu}
47 {#- prevent duplicates for tagged mgmt on the same physical interface as PXE/admin #}
48 {%- if nm.ctl01.nic_admin in nics %}
49 {%- do nics.pop(nm.ctl01.nic_admin) %}
52 {{ ma.linux_network_interfaces_nic(nics) }}
54 {{ ma.linux_network_interfaces_vlan(vlans) }}
56 {%- if '-vcp-' in conf.MCP_DEPLOY_SCENARIO %}
61 name: ${_param:single_nic}
62 mtu: ${_param:interface_mtu}
67 name: ${_param:external_nic}
68 mtu: ${_param:interface_mtu}
74 address: ${_param:single_address}
75 netmask: ${_param:opnfv_net_mgmt_mask}
78 - ${_param:single_nic}
79 mtu: ${_param:interface_mtu}
84 address: ${_param:external_address}
85 netmask: ${_param:opnfv_net_public_mask}
88 - ${_param:external_nic}
89 mtu: ${_param:interface_mtu}
90 gateway: ${_param:opnfv_net_public_gw}
91 name_servers: {{ nm.dns_public }}