Merge "add ericsson vpod PDF"
[pharos.git] / config / installers / fuel / net_macros.j2
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) -%}
9 {%- for nic in nics %}
10         {{ nic }}:
11           enabled: true
12           type: eth
13           proto: manual
14           mtu: ${_param:interface_mtu}
15           name: {{ nic }}
16           noifupdown: true
17 {%- endfor %}
18 {%- endmacro -%}
19
20 {%- macro linux_network_interfaces_vlan(vlans) -%}
21 {%- for vlan in vlans %}
22     {%- if vlan | int > 0 %}
23         {{ vlans[vlan] }}.{{ vlan }}:
24           enabled: true
25           proto: manual
26           type: vlan
27           name: {{ vlans[vlan] }}.{{ vlan }}
28           use_interfaces:
29             - {{ vlans[vlan] }}
30     {%- endif %}
31 {%- endfor %}
32 {%- endmacro -%}
33
34 {%- macro interface_str(nic, vlan = 0) -%}
35     {{ nic }}{% if vlan | int > 0 %}.{{ vlan }}{% endif %}
36 {%- endmacro -%}