f82780cf715bb4dfcf07870291ed7ff5a8b76039
[fuel.git] / mcp / scripts / virsh_net / net_pxebr.xml.j2
1 <!--
2  Copyright (c) 2018 Mirantis Inc., Enea AB and others.
3
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
8 -->
9 {%- if conf.idf.net_config.admin is defined %}
10   {%- set pxebr_network = conf.idf.net_config.admin.network %}
11   {%- set pxebr_prefix = conf.idf.net_config.admin.mask %}
12 {%- else %}
13   {%- set pxebr_network = '192.168.11.0' %}
14   {%- set pxebr_prefix = '24' %}
15 {%- endif %}
16 <network>
17   <name>pxebr</name>
18   <forward mode="nat"/>
19   <bridge name="pxebr"/>
20   <ip address="{{ pxebr_network | ipaddr_index(1) }}" netmask="{{ pxebr_prefix | netmask }}">
21     <!-- NOTE: .254 is harcoded for now (for /24 prefix), should be computed instead. -->
22     <dhcp>
23       <range start="{{ pxebr_network | ipaddr_index(4) }}" end="{{ pxebr_network | ipaddr_index(254) }}"/>
24     </dhcp>
25   </ip>
26 </network>