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 vlan_private_start = (nm.vlan_private | string).rsplit('-')[0] %}
12 {%- set vlans = { vlan_private_start: nm.cmp001.nic_private } %}
18 {%- for nic in nics %}
22 {%- if nic == nm.cmp001.nic_admin %}
30 {%- for vlan in vlans %}
31 {%- if vlan | int > 0 %}
32 {{ vlans[vlan] }}.{{ vlan }}:
36 name: {{ vlans[vlan] }}.{{ vlan }}
45 address: ${_param:tenant_address}
46 netmask: 255.255.255.0
49 - {{ nm.cmp001.nic_private }}{% if vlan_private_start | int > 0 %}.{{ vlan_private_start }}{% endif %}