summaryrefslogtreecommitdiffstats
path: root/xci/playbooks/roles/create-vm-nodes/templates/net.xml.j2
diff options
context:
space:
mode:
Diffstat (limited to 'xci/playbooks/roles/create-vm-nodes/templates/net.xml.j2')
-rw-r--r--xci/playbooks/roles/create-vm-nodes/templates/net.xml.j218
1 files changed, 18 insertions, 0 deletions
diff --git a/xci/playbooks/roles/create-vm-nodes/templates/net.xml.j2 b/xci/playbooks/roles/create-vm-nodes/templates/net.xml.j2
new file mode 100644
index 00000000..3c082170
--- /dev/null
+++ b/xci/playbooks/roles/create-vm-nodes/templates/net.xml.j2
@@ -0,0 +1,18 @@
+<network>
+ <name>{{ vm_network }}</name>
+ <forward mode='nat'>
+ <nat>
+ <port start='1024' end='65535'/>
+ </nat>
+ </forward>
+ <bridge name='{{ network_interface }}' stp='on' delay='0'/>
+ <ip address='{{ nodes[0].remote_management.address.split(':')[0] }}' netmask='{{ node_network_netmask }}'>
+ <dhcp>
+ {%- for interface in opnfv_vm.interfaces %}
+ {%- if 'native' in (interface.vlan | string) %}
+ <host mac="{{ interface.mac_address }}" ip="{{ interface.address }}"/>
+ {%- endif %}
+ {%- endfor %}
+ </dhcp>
+ </ip>
+</network>