]> git.ipfire.org Git - thirdparty/libvirt.git/commit
domain.rng vs. formatdomain.html#elementsUSB
authorPhilipp Hahn <hahn@univention.de>
Tue, 1 Mar 2011 10:23:20 +0000 (11:23 +0100)
committerEric Blake <eblake@redhat.com>
Fri, 11 Mar 2011 17:42:20 +0000 (10:42 -0700)
commita757e60a076e266e4d9fd9dca69ec43323b89d61
treed7a9cf70f229b0b917624ce227026076798fce1b
parentde6b8a0800cbd90aeb6af233cc591ae9d5a6974f
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>
docs/formatdomain.html.in
docs/schemas/domain.rng