Merge "[maas] Adopt maas.machines.storage"
[fuel.git] / mcp / reclass / classes / cluster / mcp-pike-common-ha / infra / kvm_pdf.yml.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 {#- 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.ctl01.nic_admin: True, nm.ctl01.nic_mgmt: True, nm.ctl01.nic_public: True } %}
12 {%- set vlans = { nm.vlan_admin: nm.ctl01.nic_admin, nm.vlan_mgmt: nm.ctl01.nic_mgmt, nm.vlan_public: nm.ctl01.nic_public } %}
13 ---
14 parameters:
15   linux:
16     network:
17       interface:
18 {%- for nic in nics %}
19         {{ nic }}:
20           enabled: true
21           type: eth
22           proto: manual
23           address: 0.0.0.0
24           netmask: 255.255.255.0
25           name: {{ nic }}
26           noifupdown: true
27 {%- endfor %}
28
29 {%- for vlan in vlans %}
30     {%- if vlan | int > 0 %}
31         {{ vlans[vlan] }}.{{ vlan }}:
32           enabled: true
33           proto: manual
34           type: vlan
35           name: {{ vlans[vlan] }}.{{ vlan }}
36           use_interfaces:
37             - {{ vlans[vlan] }}
38           noifupdown: true
39     {%- endif %}
40 {%- endfor %}
41
42         br-mgmt:
43           enabled: true
44           proto: dhcp
45           type: bridge
46           use_interfaces:
47             - {{ nm.ctl01.nic_admin }}{% if nm.vlan_admin | int > 0 %}.{{ nm.vlan_admin }}{% endif %}
48           noifupdown: true
49         br-ctl:
50           enabled: true
51           type: bridge
52           proto: static
53           address: ${_param:single_address}
54           netmask: 255.255.255.0
55           use_interfaces:
56             - {{ nm.ctl01.nic_mgmt }}{% if nm.vlan_mgmt | int > 0 %}.{{ nm.vlan_mgmt }}{% endif %}
57           noifupdown: true
58         br-ex:
59           enabled: true
60           proto: manual
61           address: 0.0.0.0
62           netmask: ${_param:opnfv_net_public_mask}
63           type: bridge
64           use_interfaces:
65             - {{ nm.ctl01.nic_public }}{% if nm.vlan_public | int > 0 %}.{{ nm.vlan_public }}{% endif %}
66           noifupdown: true