diff options
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.j2 | 18 |
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> |