mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-26 07:36:19 +00:00
d2632d60aa
Volume and pool formatting functions took different approaches to unspecified uids/gids. When unknown, it is always parsed as -1, but one of the functions formatted it as unsigned int (wrong) and one as int (better). Due to that, our two of our XML files from tests cannot be parsed on 32-bit machines. RNG schema needs to be modified as well, but because both storagepool.rng and storagevol.rng need same schema for permission element, save some space by moving it to storagecommon.rng. Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
126 lines
3.2 KiB
XML
126 lines
3.2 KiB
XML
<?xml version="1.0"?>
|
|
<!-- A Relax NG schema for common libvirt XML storage elements -->
|
|
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
|
|
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
|
|
|
<!-- This schema is not designed for standalone use; another file
|
|
must include both this file and basictypes.rng -->
|
|
|
|
<define name='encryption'>
|
|
<element name='encryption'>
|
|
<attribute name='format'>
|
|
<choice>
|
|
<value>default</value>
|
|
<value>qcow</value>
|
|
</choice>
|
|
</attribute>
|
|
<zeroOrMore>
|
|
<ref name='secret'/>
|
|
</zeroOrMore>
|
|
</element>
|
|
</define>
|
|
|
|
<define name='secret'>
|
|
<element name='secret'>
|
|
<attribute name='type'>
|
|
<choice>
|
|
<value>passphrase</value>
|
|
</choice>
|
|
</attribute>
|
|
<attribute name='uuid'>
|
|
<ref name="UUID"/>
|
|
</attribute>
|
|
</element>
|
|
</define>
|
|
|
|
<define name='compat'>
|
|
<element name='compat'>
|
|
<data type='string'>
|
|
<param name='pattern'>[0-9]+\.[0-9]+</param>
|
|
</data>
|
|
</element>
|
|
</define>
|
|
<define name='fileFormatFeatures'>
|
|
<element name='features'>
|
|
<interleave>
|
|
<optional>
|
|
<element name='lazy_refcounts'>
|
|
<empty/>
|
|
</element>
|
|
</optional>
|
|
</interleave>
|
|
</element>
|
|
</define>
|
|
|
|
<!-- split the list of known storage formats into two, those where
|
|
we know how to follow backing chains, and all others -->
|
|
<define name='storageFormatBacking'>
|
|
<choice>
|
|
<value>cow</value>
|
|
<value>qcow</value>
|
|
<value>qcow2</value>
|
|
<value>qed</value>
|
|
<value>vmdk</value>
|
|
</choice>
|
|
</define>
|
|
<define name='storageFormat'>
|
|
<choice>
|
|
<value>raw</value>
|
|
<value>dir</value>
|
|
<value>bochs</value>
|
|
<value>cloop</value>
|
|
<value>dmg</value>
|
|
<value>iso</value>
|
|
<value>vpc</value>
|
|
<value>vdi</value>
|
|
<value>fat</value>
|
|
<value>vhd</value>
|
|
<ref name='storageFormatBacking'/>
|
|
</choice>
|
|
</define>
|
|
|
|
<define name='storageStartupPolicy'>
|
|
<!-- Use a combine='choice' override in client files that want to
|
|
add additional attributes to a <source> sub-element
|
|
associated with a storage source -->
|
|
<notAllowed/>
|
|
</define>
|
|
|
|
<define name='storageSourceExtra'>
|
|
<!-- Use a combine='choice' override in client files that want to
|
|
add additional elements as siblings of a <source> sub-element
|
|
associated with a storage source -->
|
|
<notAllowed/>
|
|
</define>
|
|
|
|
<define name='permissions'>
|
|
<optional>
|
|
<element name='permissions'>
|
|
<interleave>
|
|
<element name='mode'>
|
|
<ref name='octalMode'/>
|
|
</element>
|
|
<element name='owner'>
|
|
<choice>
|
|
<ref name='unsignedInt'/>
|
|
<value>-1</value>
|
|
</choice>
|
|
</element>
|
|
<element name='group'>
|
|
<choice>
|
|
<ref name='unsignedInt'/>
|
|
<value>-1</value>
|
|
</choice>
|
|
</element>
|
|
<optional>
|
|
<element name='label'>
|
|
<text/>
|
|
</element>
|
|
</optional>
|
|
</interleave>
|
|
</element>
|
|
</optional>
|
|
</define>
|
|
|
|
</grammar>
|