libvirt/docs/schemas
Philipp Hahn a757e60a07 domain.rng vs. formatdomain.html#elementsUSB
The Relax-NG schema for domains regarding <hostdev> doesn't match what's
implemented in src/conf/domain_conf.c#virDomainHostdevDefFormat(): The
implementation only requires @type, but the schema currently either
required none or all three attributes (@mode, @type, and @managed) to be
defined together, because they are declared in the same
<optional)-section. (@managed is currently even undocumented on
<http://libvirt.org/formatdomain.html#elementsUSB>).

Thus the following minimal <hostdev>-example fails to validate:
<domain type='test'>
        <name>N</name>
        <memory>4096</memory>
        <bootloader>/bin/false</bootloader>
        <os>
                <type arch='x86_64' machine='xenpv'>linux</type>
        </os>
        <devices>
                <hostdev type='pci'>
                        <source>
                                <address bus='0x06' slot='0x00' function='0x0'/>
                        </source>
                </hostdev>
        </devices>
</domain>

The schema is changed to match the current implementation:
1. @mode is optional (which defaults to 'subsystem')
2. @type is required
3. @managed is optional (which defaults to 'no')

The documentation is updated to mention @managed.

Signed-off-by: Philipp Hahn <hahn@univention.de>
2011-03-11 10:42:20 -07:00
..
capability.rng
domain.rng domain.rng vs. formatdomain.html#elementsUSB 2011-03-11 10:42:20 -07:00
domainsnapshot.rng
interface.rng
Makefile.am
network.rng Give each virtual network bridge its own fixed MAC address 2011-02-17 13:36:32 -05:00
nodedev.rng
nwfilter.rng nwfilter: enable rejection of packets 2011-02-18 20:13:40 -05:00
secret.rng
storageencryption.rng
storagepool.rng
storagevol.rng