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 {%- import 'net_map.j2' as nm with context %}
9 {#- Filter-out NIC duplicates by constructing a dict (used NICs only) #}
10 {%- set nics = { nm.cmp001.nic_private: True } %}
11 {%- set vlans = { nm.vlan_private: nm.cmp001.nic_private } %}
17 {%- for nic in nics %}
21 {%- if nic == nm.cmp001.nic_admin %}
29 {%- for vlan in vlans %}
30 {%- if vlan | int > 0 %}
31 {{ vlans[vlan] }}.{{ vlan }}:
35 name: {{ vlans[vlan] }}.{{ vlan }}
44 address: ${_param:tenant_address}
45 netmask: 255.255.255.0
48 - {{ nm.cmp001.nic_private }}{% if nm.vlan_private | int > 0 %}.{{ nm.vlan_private }}{% endif %}