[odl/noha] Simplify net scheme on compute nodes
[fuel.git] / mcp / reclass / classes / cluster / mcp-common-noha / openstack_compute_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 ---
11 parameters:
12   _param:
13     # Should later be determined via PDF/IDF, AArch64 has ESP on /dev/sda1
14 {%- if conf.nodes[nm.cmp001.idx].node.type == 'virtual' %}
15     ~cinder_lvm_devices: ['/dev/vdb']
16 {%- elif conf.nodes[nm.cmp001.idx].node.arch == 'aarch64' or
17          conf.nodes[nm.cmp001.idx].disks.0.disk_capacity | storage_size_num | float > 2000000000000 %}
18     ~cinder_lvm_devices: ['/dev/sda2']
19 {%- else %}
20     ~cinder_lvm_devices: ['/dev/sda1']
21 {%- endif %}
22     primary_interface: {{ nm.cmp001.nic_mgmt }}
23     tenant_interface: {{ nm.cmp001.nic_private }}
24     external_interface: {{ nm.cmp001.nic_public }}
25   linux:
26     network:
27       bridge: openvswitch
28       interface:
29         pxe_admin_int:
30           enabled: true
31           name: {{ nm.cmp001.nic_admin }}
32           proto: static
33           type: eth
34           address: ${_param:pxe_admin_address}
35           netmask: ${_param:opnfv_net_admin_mask}
36           mtu: ${_param:interface_mtu}
37         primary_interface:
38           enabled: true
39           name: ${_param:primary_interface}
40           proto: manual
41           type: eth
42         tenant_interface:
43           enabled: true
44           name: ${_param:tenant_interface}
45           mtu: ${_param:interface_mtu}
46           proto: manual
47           type: eth
48         br-mgmt:
49           enabled: true
50           type: bridge
51           proto: static
52           address: ${_param:single_address}
53           netmask: ${_param:opnfv_net_mgmt_mask}
54           use_interfaces:
55             - ${_param:primary_interface}