1 ##############################################################################
2 # Copyright (c) 2018 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 {#- NOTE: br-{mgmt,ctl} are cross-referenced, careful when changing names #}
9 {%- import 'net_map.j2' as nm with context %}
10 {#- Filter-out NIC duplicates by constructing a dict (used NICs only) #}
11 {%- set nics = { nm.cmp001.nic_admin: True, nm.cmp001.nic_mgmt: True } %}
12 {%- set vlans = { nm.vlan_admin: nm.cmp001.nic_admin, nm.vlan_mgmt: nm.cmp001.nic_mgmt } %}
14 {%- if not conf.nodes[nm.cmp001.idx].node.type == 'virtual' %}
16 - system.nova.compute.nfv.cpu_pinning
20 # Should later be determined via PDF/IDF, AArch64 has ESP on /dev/sda1
21 {%- if conf.nodes[nm.cmp001.idx].node.type == 'virtual' %}
22 ~cinder_lvm_devices: ['/dev/vdb']
23 {%- elif conf.nodes[nm.cmp001.idx].node.arch == 'aarch64' or
24 conf.nodes[nm.cmp001.idx].disks.0.disk_capacity | storage_size_num | float > 2000000000000 %}
25 ~cinder_lvm_devices: ['/dev/sda2']
27 ~cinder_lvm_devices: ['/dev/sda1']
33 {%- for nic in nics %}
34 {%- if nic == nm.cmp001.nic_admin %}
46 {%- if nic == nm.cmp001.nic_public %}
47 netmask: ${_param:opnfv_net_public_mask}
49 netmask: 255.255.255.0
51 mtu: ${_param:interface_mtu}
56 {%- for vlan in vlans %}
57 {%- if vlan | int > 0 %}
58 {{ vlans[vlan] }}.{{ vlan }}:
62 name: {{ vlans[vlan] }}.{{ vlan }}
72 address: ${_param:single_address}
73 netmask: 255.255.255.0
75 - {{ nm.cmp001.nic_mgmt }}{% if nm.vlan_mgmt | int > 0 %}.{{ nm.vlan_mgmt }}{% endif %}
79 mtu: ${_param:interface_mtu}
81 address: ${_param:external_address}
82 netmask: ${_param:opnfv_net_public_mask}
84 - {{ nm.cmp001.nic_public }}{% if nm.vlan_public | int > 0 %}.{{ nm.vlan_public }}{% endif %}
89 gateway: ${_param:opnfv_net_public_gw}
90 ovs_port_{{ nm.cmp001.nic_public }}:
92 name: {{ nm.cmp001.nic_public }}{% if nm.vlan_public | int > 0 %}.{{ nm.vlan_public }}{% endif %}
94 ovs_port_type: OVSPort
96 ovs_bridge: br-floating