2 Copyright (c) 2018 Mirantis Inc., Enea AB and others.
4 All rights reserved. This program and the accompanying materials
5 are made available under the terms of the Apache License, Version 2.0
6 which accompanies this distribution, and is available at
7 http://www.apache.org/licenses/LICENSE-2.0
9 {%- set cluster = {'has_virtual_nodes': False} %}
10 {%- for node in conf.nodes %}
11 {%- if not cluster.has_virtual_nodes and node.node.type == 'virtual' %}
12 {%- set _ = cluster.update({'has_virtual_nodes': True}) %}
15 {%- if conf.idf.net_config.public is defined %}
16 {%- set public_network = conf.idf.net_config.public.network %}
17 {%- set public_prefix = conf.idf.net_config.public.mask %}
19 {%- set public_network = '10.16.0.0' %}
20 {%- set public_prefix = '24' %}
24 <bridge name="public"/>
25 {%- if cluster.has_virtual_nodes %}
26 {#- Ideally, jumpserver would have a real Linux bridge we will hook to.
27 In case it doesn't, we use this virsh network as a *mock* public.
28 The *mock* public should NOT overlap with the real public in any way. #}
30 <ip address="{{ public_network | ipaddr_index(1) }}" netmask="{{ public_prefix | netmask }}"/>