guest: Reorder XML output to match libvirt output

This commit is contained in:
Cole Robinson 2017-03-05 21:04:34 -05:00
parent 7a8f756a42
commit a2df53db21
4 changed files with 64 additions and 64 deletions

View File

@ -11,6 +11,9 @@
<numatune>
<memory nodeset="1,2,3,5-7,^6"/>
</numatune>
<resource>
<partition>/virtualmachines/production</partition>
</resource>
<os>
<type arch="x86_64">hvm</type>
<loader readonly="yes" type="pflash">/usr/share/OVMF/OVMF_CODE.fd</loader>
@ -27,9 +30,6 @@
<timer name="hpet" present="no"/>
</clock>
<on_crash>restart</on_crash>
<resource>
<partition>/virtualmachines/production</partition>
</resource>
<pm>
<suspend-to-mem enabled="no"/>
<suspend-to-disk enabled="no"/>

View File

@ -29,6 +29,34 @@
<numatune>
<memory mode="strict" nodeset="1-3,4"/>
</numatune>
<resource>
<partition>/virtualmachines/production</partition>
</resource>
<sysinfo type="smbios">
<bios>
<entry name="vendor">Acme LLC</entry>
<entry name="version">1.2.3</entry>
<entry name="date">01/01/1970</entry>
<entry name="release">10.22</entry>
</bios>
<system>
<entry name="manufacturer">Acme Inc.</entry>
<entry name="product">Computer</entry>
<entry name="version">3.2.1</entry>
<entry name="serial">123456789</entry>
<entry name="uuid">00000000-1111-2222-3333-444444444444</entry>
<entry name="sku">abc-123</entry>
<entry name="family">Server</entry>
</system>
<baseBoard>
<entry name="manufacturer">Acme Corp.</entry>
<entry name="product">Motherboard</entry>
<entry name="version">A01</entry>
<entry name="serial">1234-5678</entry>
<entry name="asset">Tag</entry>
<entry name="location">Chassis</entry>
</baseBoard>
</sysinfo>
<os>
<type arch="x86_64">hvm</type>
<loader>/foo/bar</loader>
@ -76,9 +104,6 @@
<on_poweroff>destroy</on_poweroff>
<on_reboot>destroy</on_reboot>
<on_crash>preserve</on_crash>
<resource>
<partition>/virtualmachines/production</partition>
</resource>
<pm>
<suspend-to-mem enabled="yes"/>
<suspend-to-disk enabled="no"/>
@ -123,31 +148,6 @@
<seclabel type="static" model="selinux" relabel="yes">
<label>system_u:object_r:svirt_image_t:s0:c100,c200</label>
</seclabel>
<sysinfo type="smbios">
<bios>
<entry name="vendor">Acme LLC</entry>
<entry name="version">1.2.3</entry>
<entry name="date">01/01/1970</entry>
<entry name="release">10.22</entry>
</bios>
<system>
<entry name="manufacturer">Acme Inc.</entry>
<entry name="product">Computer</entry>
<entry name="version">3.2.1</entry>
<entry name="serial">123456789</entry>
<entry name="uuid">00000000-1111-2222-3333-444444444444</entry>
<entry name="sku">abc-123</entry>
<entry name="family">Server</entry>
</system>
<baseBoard>
<entry name="manufacturer">Acme Corp.</entry>
<entry name="product">Motherboard</entry>
<entry name="version">A01</entry>
<entry name="serial">1234-5678</entry>
<entry name="asset">Tag</entry>
<entry name="location">Chassis</entry>
</baseBoard>
</sysinfo>
<on_lockfailure>ignore</on_lockfailure>
</domain>
<domain type="kvm">
@ -181,6 +181,34 @@
<numatune>
<memory mode="strict" nodeset="1-3,4"/>
</numatune>
<resource>
<partition>/virtualmachines/production</partition>
</resource>
<sysinfo type="smbios">
<bios>
<entry name="vendor">Acme LLC</entry>
<entry name="version">1.2.3</entry>
<entry name="date">01/01/1970</entry>
<entry name="release">10.22</entry>
</bios>
<system>
<entry name="manufacturer">Acme Inc.</entry>
<entry name="product">Computer</entry>
<entry name="version">3.2.1</entry>
<entry name="serial">123456789</entry>
<entry name="uuid">00000000-1111-2222-3333-444444444444</entry>
<entry name="sku">abc-123</entry>
<entry name="family">Server</entry>
</system>
<baseBoard>
<entry name="manufacturer">Acme Corp.</entry>
<entry name="product">Motherboard</entry>
<entry name="version">A01</entry>
<entry name="serial">1234-5678</entry>
<entry name="asset">Tag</entry>
<entry name="location">Chassis</entry>
</baseBoard>
</sysinfo>
<os>
<type arch="x86_64">hvm</type>
<loader>/foo/bar</loader>
@ -228,9 +256,6 @@
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>preserve</on_crash>
<resource>
<partition>/virtualmachines/production</partition>
</resource>
<pm>
<suspend-to-mem enabled="yes"/>
<suspend-to-disk enabled="no"/>
@ -275,30 +300,5 @@
<seclabel type="static" model="selinux" relabel="yes">
<label>system_u:object_r:svirt_image_t:s0:c100,c200</label>
</seclabel>
<sysinfo type="smbios">
<bios>
<entry name="vendor">Acme LLC</entry>
<entry name="version">1.2.3</entry>
<entry name="date">01/01/1970</entry>
<entry name="release">10.22</entry>
</bios>
<system>
<entry name="manufacturer">Acme Inc.</entry>
<entry name="product">Computer</entry>
<entry name="version">3.2.1</entry>
<entry name="serial">123456789</entry>
<entry name="uuid">00000000-1111-2222-3333-444444444444</entry>
<entry name="sku">abc-123</entry>
<entry name="family">Server</entry>
</system>
<baseBoard>
<entry name="manufacturer">Acme Corp.</entry>
<entry name="product">Motherboard</entry>
<entry name="version">A01</entry>
<entry name="serial">1234-5678</entry>
<entry name="asset">Tag</entry>
<entry name="location">Chassis</entry>
</baseBoard>
</sysinfo>
<on_lockfailure>ignore</on_lockfailure>
</domain>

View File

@ -103,12 +103,12 @@
<nosharepages/>
<locked/>
</memoryBacking>
<resource>
<partition>/virtualmachines/production</partition>
</resource>
<bootloader>pygrub</bootloader>
<idmap>
<uid start="0" target="1000" count="10"/>
<gid start="0" target="1000" count="10"/>
</idmap>
<resource>
<partition>/virtualmachines/production</partition>
</resource>
</domain>

View File

@ -105,9 +105,9 @@ class Guest(XMLBuilder):
_XML_PROP_ORDER = ["type", "name", "uuid", "title", "description",
"maxmemory", "memory", "blkiotune", "memtune", "memoryBacking",
"vcpus", "curvcpus", "vcpu_placement", "cpuset",
"numatune", "bootloader", "os", "idmap",
"numatune", "resource", "sysinfo", "bootloader", "os", "idmap",
"features", "cpu", "clock", "on_poweroff", "on_reboot", "on_crash",
"resource", "pm", "emulator", "_devices", "seclabels", "sysinfo"]
"pm", "emulator", "_devices", "seclabels"]
def __init__(self, *args, **kwargs):
XMLBuilder.__init__(self, *args, **kwargs)