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 {%- macro linux_network_interfaces_nic(nics) -%}
14 mtu: ${_param:interface_mtu}
20 {%- macro linux_network_interfaces_vlan(vlans) -%}
21 {%- for vlan in vlans %}
22 {%- if vlan | int > 0 %}
23 {{ vlans[vlan] }}.{{ vlan }}:
26 mtu: ${_param:interface_mtu}
28 name: {{ vlans[vlan] }}.{{ vlan }}
35 {%- macro interface_str(nic, vlan = 0) -%}
36 {{ nic }}{% if vlan | int > 0 %}.{{ vlan }}{% endif %}