Update xml schemas according to libvirt source

capability.rng: Guest features can be in any order.
nodedev.rng: Added <driver> element, <capability> phys_function and
virt_functions for PCI devices.
storagepool.rng: Owner or group ID can be -1.

schema tests: New capabilities and nodedev files; changed owner and
group to -1 in pool-dir.xml.
storage_conf: Print uid_t and gid_t as signed to storage pool XML.
This commit is contained in:
Ján Tomko 2012-08-02 13:23:16 +02:00 committed by Eric Blake
parent 1f6f723ce1
commit 37a10129c2
8 changed files with 231 additions and 47 deletions

View File

@ -296,43 +296,45 @@
<define name='features'>
<element name='features'>
<optional>
<element name='pae'>
<empty/>
</element>
</optional>
<optional>
<element name='nonpae'>
<empty/>
</element>
</optional>
<optional>
<element name='ia64_be'>
<empty/>
</element>
</optional>
<optional>
<element name='acpi'>
<ref name='featuretoggle'/>
<empty/>
</element>
</optional>
<optional>
<element name='apic'>
<ref name='featuretoggle'/>
<empty/>
</element>
</optional>
<optional>
<element name='cpuselection'>
<empty/>
</element>
</optional>
<optional>
<element name='deviceboot'>
<empty/>
</element>
</optional>
<interleave>
<optional>
<element name='pae'>
<empty/>
</element>
</optional>
<optional>
<element name='nonpae'>
<empty/>
</element>
</optional>
<optional>
<element name='ia64_be'>
<empty/>
</element>
</optional>
<optional>
<element name='acpi'>
<ref name='featuretoggle'/>
<empty/>
</element>
</optional>
<optional>
<element name='apic'>
<ref name='featuretoggle'/>
<empty/>
</element>
</optional>
<optional>
<element name='cpuselection'>
<empty/>
</element>
</optional>
<optional>
<element name='deviceboot'>
<empty/>
</element>
</optional>
</interleave>
</element>
</define>

View File

@ -15,6 +15,12 @@
<element name="parent"><text/></element>
</optional>
<optional>
<element name="driver">
<element name="name"><text/></element>
</element>
</optional>
<zeroOrMore>
<ref name="capability"/>
</zeroOrMore>
@ -115,6 +121,28 @@
</choice>
</element>
<optional>
<element name='capability'>
<attribute name='type'>
<value>phys_function</value>
</attribute>
<optional>
<ref name='address'/>
</optional>
</element>
</optional>
<optional>
<element name='capability'>
<attribute name='type'>
<value>virt_functions</value>
</attribute>
<optional>
<ref name='address'/>
</optional>
</element>
</optional>
</define>
<define name='capusbdev'>
@ -369,6 +397,15 @@
</element>
</define>
<define name='address'>
<element name='address'>
<attribute name='domain'><ref name='hexuint'/></attribute>
<attribute name='bus'><ref name='hexuint'/></attribute>
<attribute name='slot'><ref name='hexuint'/></attribute>
<attribute name='function'><ref name='hexuint'/></attribute>
</element>
</define>
<define name='hexuint'>
<data type='string'>
<param name="pattern">(0x)?[0-9a-f]+</param>

View File

@ -178,10 +178,16 @@
<ref name='unsignedInt'/>
</element>
<element name='owner'>
<ref name='unsignedInt'/>
<choice>
<ref name='unsignedInt'/>
<value>-1</value>
</choice>
</element>
<element name='group'>
<ref name='unsignedInt'/>
<choice>
<ref name='unsignedInt'/>
<value>-1</value>
</choice>
</element>
<optional>
<element name='label'>

View File

@ -1036,10 +1036,10 @@ virStoragePoolDefFormat(virStoragePoolDefPtr def) {
virBufferAddLit(&buf," <permissions>\n");
virBufferAsprintf(&buf," <mode>0%o</mode>\n",
def->target.perms.mode);
virBufferAsprintf(&buf," <owner>%u</owner>\n",
(unsigned int) def->target.perms.uid);
virBufferAsprintf(&buf," <group>%u</group>\n",
(unsigned int) def->target.perms.gid);
virBufferAsprintf(&buf," <owner>%d</owner>\n",
(int) def->target.perms.uid);
virBufferAsprintf(&buf," <group>%d</group>\n",
(int) def->target.perms.gid);
if (def->target.perms.label)
virBufferAsprintf(&buf," <label>%s</label>\n",

View File

@ -0,0 +1,122 @@
<capabilities>
<host>
<cpu>
<arch>x86_64</arch>
<model>SandyBridge</model>
<vendor>Intel</vendor>
<topology sockets='1' cores='2' threads='2'/>
<feature name='osxsave'/>
<feature name='pdcm'/>
<feature name='xtpr'/>
<feature name='tm2'/>
<feature name='est'/>
<feature name='smx'/>
<feature name='vmx'/>
<feature name='ds_cpl'/>
<feature name='monitor'/>
<feature name='dtes64'/>
<feature name='pbe'/>
<feature name='tm'/>
<feature name='ht'/>
<feature name='ss'/>
<feature name='acpi'/>
<feature name='ds'/>
<feature name='vme'/>
</cpu>
<power_management>
<suspend_mem/>
</power_management>
<migration_features>
<live/>
<uri_transports>
<uri_transport>tcp</uri_transport>
</uri_transports>
</migration_features>
</host>
<guest>
<os_type>hvm</os_type>
<arch name='i686'>
<wordsize>32</wordsize>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
<machine>pc-1.2</machine>
<machine canonical='pc-1.2'>pc</machine>
<machine>pc-1.1</machine>
<machine>pc-1.0</machine>
<machine>pc-0.15</machine>
<machine>pc-0.14</machine>
<machine>pc-0.13</machine>
<machine>pc-0.12</machine>
<machine>pc-0.11</machine>
<machine>pc-0.10</machine>
<machine>isapc</machine>
<domain type='qemu'>
</domain>
<domain type='kvm'>
<emulator>/usr/libexec/qemu-kvm</emulator>
<machine>pc-1.2</machine>
<machine canonical='pc-1.2'>pc</machine>
<machine>pc-1.1</machine>
<machine>pc-1.0</machine>
<machine>pc-0.15</machine>
<machine>pc-0.14</machine>
<machine>pc-0.13</machine>
<machine>pc-0.12</machine>
<machine>pc-0.11</machine>
<machine>pc-0.10</machine>
<machine>isapc</machine>
</domain>
</arch>
<features>
<cpuselection/>
<deviceboot/>
<pae/>
<nonpae/>
<acpi default='on' toggle='yes'/>
<apic default='on' toggle='no'/>
</features>
</guest>
<guest>
<os_type>hvm</os_type>
<arch name='x86_64'>
<wordsize>64</wordsize>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
<machine>pc-1.2</machine>
<machine canonical='pc-1.2'>pc</machine>
<machine>pc-1.1</machine>
<machine>pc-1.0</machine>
<machine>pc-0.15</machine>
<machine>pc-0.14</machine>
<machine>pc-0.13</machine>
<machine>pc-0.12</machine>
<machine>pc-0.11</machine>
<machine>pc-0.10</machine>
<machine>isapc</machine>
<domain type='qemu'>
</domain>
<domain type='kvm'>
<emulator>/usr/libexec/qemu-kvm</emulator>
<machine>pc-1.2</machine>
<machine canonical='pc-1.2'>pc</machine>
<machine>pc-1.1</machine>
<machine>pc-1.0</machine>
<machine>pc-0.15</machine>
<machine>pc-0.14</machine>
<machine>pc-0.13</machine>
<machine>pc-0.12</machine>
<machine>pc-0.11</machine>
<machine>pc-0.10</machine>
<machine>isapc</machine>
</domain>
</arch>
<features>
<cpuselection/>
<deviceboot/>
<acpi default='on' toggle='yes'/>
<apic default='on' toggle='no'/>
</features>
</guest>
</capabilities>

View File

@ -0,0 +1,17 @@
<device>
<name>pci_0000_00_19_0</name>
<parent>computer</parent>
<driver>
<name>e1000e</name>
</driver>
<capability type='pci'>
<domain>0</domain>
<bus>0</bus>
<slot>25</slot>
<function>0</function>
<product id='0x1502'>82579LM Gigabit Network Connection</product>
<vendor id='0x8086'>Intel Corporation</vendor>
<capability type='virt_functions'>
</capability>
</capability>
</device>

View File

@ -10,8 +10,8 @@
<path>///var/////lib/libvirt/images//</path>
<permissions>
<mode>0700</mode>
<owner>0</owner>
<group>0</group>
<owner>-1</owner>
<group>-1</group>
<label>some_label_t</label>
</permissions>
</target>

View File

@ -10,8 +10,8 @@
<path>/var/lib/libvirt/images</path>
<permissions>
<mode>0700</mode>
<owner>0</owner>
<group>0</group>
<owner>-1</owner>
<group>-1</group>
<label>some_label_t</label>
</permissions>
</target>