Integration testing preparation for Ironic

Add ability to create/register qemu vms for Ironic testing purposes

Implements bp:deprecate-baremetal-driver

Change-Id: If452438fcc0ff562531b33a36cd189b235654b48
diff --git a/tools/ironic/templates/brbm.xml b/tools/ironic/templates/brbm.xml
new file mode 100644
index 0000000..0769d3f
--- /dev/null
+++ b/tools/ironic/templates/brbm.xml
@@ -0,0 +1,6 @@
+<network>
+  <name>brbm</name>
+  <forward mode='bridge'/>
+  <bridge name='brbm'/>
+  <virtualport type='openvswitch'/>
+</network>
diff --git a/tools/ironic/templates/tftpd-xinetd.template b/tools/ironic/templates/tftpd-xinetd.template
new file mode 100644
index 0000000..7b9b0f8
--- /dev/null
+++ b/tools/ironic/templates/tftpd-xinetd.template
@@ -0,0 +1,11 @@
+service tftp
+{
+  protocol        = udp
+  port            = 69
+  socket_type     = dgram
+  wait            = yes
+  user            = root
+  server          = /usr/sbin/in.tftpd
+  server_args     = -v -v -v -v -v --map-file %TFTPBOOT_DIR%/map-file %TFTPBOOT_DIR%
+  disable         = no
+}
diff --git a/tools/ironic/templates/vm.xml b/tools/ironic/templates/vm.xml
new file mode 100644
index 0000000..b18dec0
--- /dev/null
+++ b/tools/ironic/templates/vm.xml
@@ -0,0 +1,43 @@
+<domain type='%(engine)s'>
+  <name>%(name)s</name>
+  <memory unit='KiB'>%(memory)s</memory>
+  <vcpu>%(cpus)s</vcpu>
+  <os>
+    <type arch='%(arch)s' machine='pc-1.0'>hvm</type>
+    <boot dev='%(bootdev)s'/>
+    <bootmenu enable='no'/>
+  </os>
+  <features>
+    <acpi/>
+    <apic/>
+    <pae/>
+  </features>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>restart</on_crash>
+  <devices>
+    <emulator>%(emulator)s</emulator>
+    <disk type='file' device='disk'>
+      <driver name='qemu' type='qcow2' cache='writeback'/>
+      <source file='%(imagefile)s'/>
+      <target dev='vda' bus='virtio'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
+    </disk>
+    <controller type='ide' index='0'>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
+    </controller>
+    %(network)s
+    %(bm_network)s
+    <input type='mouse' bus='ps2'/>
+    <graphics type='vnc' port='-1' autoport='yes'/>
+    <video>
+      <model type='cirrus' vram='9216' heads='1'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
+    </video>
+    <memballoon model='virtio'>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
+    </memballoon>
+  </devices>
+</domain>
+