summaryrefslogtreecommitdiffstats
path: root/xci/playbooks/roles/create-vm-nodes/templates/net.xml.j2
diff options
context:
space:
mode:
authorManuel Buil <mbuil@suse.com>2018-06-25 10:57:02 +0100
committerMarkos Chandras <mchandras@suse.de>2018-06-26 16:29:05 +0100
commit92fc2a3c43305532b885ef70201f363204b69a3b (patch)
tree721d8fdbfb21ed641c005f725bbd3eda5453ce24 /xci/playbooks/roles/create-vm-nodes/templates/net.xml.j2
parentf6b2b8c16982b47570cadca36bce9c8906630776 (diff)
xci: roles: create-vm-nodes: Add role for creating XCI VM nodes
Add a new role based on the bifrost one to create nodes for the bifrost virtual deployments. This role will install and configure libvirt on the host, download a prebuilt OPNFV VM image and deploy the OPNFV VM using that image. Moreover, it will create the rest of the nodes for the virtual deployment which will be configured by bifrost later on. Change-Id: I9fbd084261351d3b53ae373060f43df046191c5e Co-Authored-by: Markos Chandras <mchandras@suse.de> Signed-off-by: Manuel Buil <mbuil@suse.com>
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>