xml: share 'unit' in RNG
The code supported unit='E' for "exabyte", but the RNG did not;
conversely, the RNG supported "z" and "y" but the code did not
(I'm jealous if you have that much storage, particularly since
it won't fit in 64-bit off_t). Also, the code supported
<allocation unit='...'>, but not the RNG.
In an effort to make 'unit' more worthwhile in future patches,
it's easier to share it between files.
In making this factorization, note that absFilePath is more
permissive than 'path', so storage pools and storage volumes
will now validate with a wider set of file names than before.
I don't think this should be a problem in practice.
* docs/schemas/storagepool.rng: Include basic types, rather than
repeating things here.
* docs/schemas/storagevol.rng: Likewise.
* docs/schemas/basictypes.rng: Add 'unsignedLong', 'unit', and fix
to match storage code.
2012-02-29 04:16:28 +00:00
|
|
|
<?xml version="1.0"?>
|
2009-08-05 09:56:56 +00:00
|
|
|
<!-- A Relax NG schema for the libvirt storage volume XML format -->
|
2009-01-27 15:29:53 +00:00
|
|
|
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
|
|
|
|
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
xml: share 'unit' in RNG
The code supported unit='E' for "exabyte", but the RNG did not;
conversely, the RNG supported "z" and "y" but the code did not
(I'm jealous if you have that much storage, particularly since
it won't fit in 64-bit off_t). Also, the code supported
<allocation unit='...'>, but not the RNG.
In an effort to make 'unit' more worthwhile in future patches,
it's easier to share it between files.
In making this factorization, note that absFilePath is more
permissive than 'path', so storage pools and storage volumes
will now validate with a wider set of file names than before.
I don't think this should be a problem in practice.
* docs/schemas/storagepool.rng: Include basic types, rather than
repeating things here.
* docs/schemas/storagevol.rng: Likewise.
* docs/schemas/basictypes.rng: Add 'unsignedLong', 'unit', and fix
to match storage code.
2012-02-29 04:16:28 +00:00
|
|
|
<include href='basictypes.rng'/>
|
2009-01-27 15:29:53 +00:00
|
|
|
<start>
|
|
|
|
<ref name='vol'/>
|
|
|
|
</start>
|
|
|
|
|
2009-07-20 22:28:11 +00:00
|
|
|
<include href='storageencryption.rng'/>
|
|
|
|
|
2009-01-27 15:29:53 +00:00
|
|
|
|
|
|
|
<define name='vol'>
|
|
|
|
<element name='volume'>
|
|
|
|
<element name='name'>
|
2013-01-23 11:04:34 +00:00
|
|
|
<ref name='volName'/>
|
2009-01-27 15:29:53 +00:00
|
|
|
</element>
|
|
|
|
<optional>
|
2010-03-01 19:09:26 +00:00
|
|
|
<element name='key'>
|
|
|
|
<text/>
|
|
|
|
</element>
|
2009-01-27 15:29:53 +00:00
|
|
|
</optional>
|
|
|
|
<ref name='source'/>
|
|
|
|
<ref name='sizing'/>
|
|
|
|
<ref name='target'/>
|
|
|
|
<optional>
|
2010-03-01 19:09:26 +00:00
|
|
|
<ref name='backingStore'/>
|
2009-01-27 15:29:53 +00:00
|
|
|
</optional>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name='sizing'>
|
|
|
|
<optional>
|
|
|
|
<element name='capacity'>
|
2012-02-23 00:48:38 +00:00
|
|
|
<ref name='scaledInteger'/>
|
2009-01-27 15:29:53 +00:00
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name='allocation'>
|
2012-02-23 00:48:38 +00:00
|
|
|
<ref name='scaledInteger'/>
|
2009-01-27 15:29:53 +00:00
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name='permissions'>
|
|
|
|
<optional>
|
|
|
|
<element name='permissions'>
|
2010-03-01 19:09:26 +00:00
|
|
|
<element name='mode'>
|
xml: share 'unit' in RNG
The code supported unit='E' for "exabyte", but the RNG did not;
conversely, the RNG supported "z" and "y" but the code did not
(I'm jealous if you have that much storage, particularly since
it won't fit in 64-bit off_t). Also, the code supported
<allocation unit='...'>, but not the RNG.
In an effort to make 'unit' more worthwhile in future patches,
it's easier to share it between files.
In making this factorization, note that absFilePath is more
permissive than 'path', so storage pools and storage volumes
will now validate with a wider set of file names than before.
I don't think this should be a problem in practice.
* docs/schemas/storagepool.rng: Include basic types, rather than
repeating things here.
* docs/schemas/storagevol.rng: Likewise.
* docs/schemas/basictypes.rng: Add 'unsignedLong', 'unit', and fix
to match storage code.
2012-02-29 04:16:28 +00:00
|
|
|
<ref name='unsignedInt'/>
|
2010-03-01 19:09:26 +00:00
|
|
|
</element>
|
|
|
|
<element name='owner'>
|
xml: share 'unit' in RNG
The code supported unit='E' for "exabyte", but the RNG did not;
conversely, the RNG supported "z" and "y" but the code did not
(I'm jealous if you have that much storage, particularly since
it won't fit in 64-bit off_t). Also, the code supported
<allocation unit='...'>, but not the RNG.
In an effort to make 'unit' more worthwhile in future patches,
it's easier to share it between files.
In making this factorization, note that absFilePath is more
permissive than 'path', so storage pools and storage volumes
will now validate with a wider set of file names than before.
I don't think this should be a problem in practice.
* docs/schemas/storagepool.rng: Include basic types, rather than
repeating things here.
* docs/schemas/storagevol.rng: Likewise.
* docs/schemas/basictypes.rng: Add 'unsignedLong', 'unit', and fix
to match storage code.
2012-02-29 04:16:28 +00:00
|
|
|
<ref name='unsignedInt'/>
|
2010-03-01 19:09:26 +00:00
|
|
|
</element>
|
|
|
|
<element name='group'>
|
xml: share 'unit' in RNG
The code supported unit='E' for "exabyte", but the RNG did not;
conversely, the RNG supported "z" and "y" but the code did not
(I'm jealous if you have that much storage, particularly since
it won't fit in 64-bit off_t). Also, the code supported
<allocation unit='...'>, but not the RNG.
In an effort to make 'unit' more worthwhile in future patches,
it's easier to share it between files.
In making this factorization, note that absFilePath is more
permissive than 'path', so storage pools and storage volumes
will now validate with a wider set of file names than before.
I don't think this should be a problem in practice.
* docs/schemas/storagepool.rng: Include basic types, rather than
repeating things here.
* docs/schemas/storagevol.rng: Likewise.
* docs/schemas/basictypes.rng: Add 'unsignedLong', 'unit', and fix
to match storage code.
2012-02-29 04:16:28 +00:00
|
|
|
<ref name='unsignedInt'/>
|
2010-03-01 19:09:26 +00:00
|
|
|
</element>
|
|
|
|
<optional>
|
|
|
|
<element name='label'>
|
|
|
|
<text/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2009-01-27 15:29:53 +00:00
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
</define>
|
|
|
|
|
2012-07-25 07:43:37 +00:00
|
|
|
<define name='timestamps'>
|
|
|
|
<optional>
|
|
|
|
<element name='timestamps'>
|
|
|
|
<interleave>
|
|
|
|
<optional>
|
|
|
|
<element name='atime'>
|
|
|
|
<ref name='timestamp'/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name='btime'>
|
|
|
|
<ref name='timestamp'/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name='ctime'>
|
|
|
|
<ref name='timestamp'/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name='mtime'>
|
|
|
|
<ref name='timestamp'/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
</interleave>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name='timestamp'>
|
|
|
|
<data type='string'>
|
|
|
|
<param name="pattern">[0-9]+(\.[0-9]{0,9})?</param>
|
|
|
|
</data>
|
|
|
|
</define>
|
|
|
|
|
2009-01-27 15:29:53 +00:00
|
|
|
<define name='target'>
|
|
|
|
<element name='target'>
|
|
|
|
<optional>
|
2010-03-01 19:09:26 +00:00
|
|
|
<element name='path'>
|
2012-07-18 19:06:58 +00:00
|
|
|
<data type='anyURI'/>
|
2010-03-01 19:09:26 +00:00
|
|
|
</element>
|
2009-01-27 15:29:53 +00:00
|
|
|
</optional>
|
|
|
|
<ref name='format'/>
|
|
|
|
<ref name='permissions'/>
|
2012-07-25 07:43:37 +00:00
|
|
|
<ref name='timestamps'/>
|
2009-07-20 22:28:11 +00:00
|
|
|
<optional>
|
|
|
|
<ref name='encryption'/>
|
|
|
|
</optional>
|
2009-01-27 15:29:53 +00:00
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name='backingStore'>
|
|
|
|
<element name='backingStore'>
|
|
|
|
<element name='path'>
|
xml: share 'unit' in RNG
The code supported unit='E' for "exabyte", but the RNG did not;
conversely, the RNG supported "z" and "y" but the code did not
(I'm jealous if you have that much storage, particularly since
it won't fit in 64-bit off_t). Also, the code supported
<allocation unit='...'>, but not the RNG.
In an effort to make 'unit' more worthwhile in future patches,
it's easier to share it between files.
In making this factorization, note that absFilePath is more
permissive than 'path', so storage pools and storage volumes
will now validate with a wider set of file names than before.
I don't think this should be a problem in practice.
* docs/schemas/storagepool.rng: Include basic types, rather than
repeating things here.
* docs/schemas/storagevol.rng: Likewise.
* docs/schemas/basictypes.rng: Add 'unsignedLong', 'unit', and fix
to match storage code.
2012-02-29 04:16:28 +00:00
|
|
|
<ref name='absFilePath'/>
|
2009-01-27 15:29:53 +00:00
|
|
|
</element>
|
|
|
|
<ref name='format'/>
|
|
|
|
<ref name='permissions'/>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
|
|
|
|
<define name='source'>
|
|
|
|
<element name='source'>
|
|
|
|
<zeroOrMore>
|
2010-03-01 19:09:26 +00:00
|
|
|
<ref name='sourcedev'/>
|
2009-01-27 15:29:53 +00:00
|
|
|
</zeroOrMore>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name='sourcedev'>
|
|
|
|
<element name='device'>
|
|
|
|
<attribute name='path'>
|
xml: share 'unit' in RNG
The code supported unit='E' for "exabyte", but the RNG did not;
conversely, the RNG supported "z" and "y" but the code did not
(I'm jealous if you have that much storage, particularly since
it won't fit in 64-bit off_t). Also, the code supported
<allocation unit='...'>, but not the RNG.
In an effort to make 'unit' more worthwhile in future patches,
it's easier to share it between files.
In making this factorization, note that absFilePath is more
permissive than 'path', so storage pools and storage volumes
will now validate with a wider set of file names than before.
I don't think this should be a problem in practice.
* docs/schemas/storagepool.rng: Include basic types, rather than
repeating things here.
* docs/schemas/storagevol.rng: Likewise.
* docs/schemas/basictypes.rng: Add 'unsignedLong', 'unit', and fix
to match storage code.
2012-02-29 04:16:28 +00:00
|
|
|
<ref name='absFilePath'/>
|
2009-01-27 15:29:53 +00:00
|
|
|
</attribute>
|
|
|
|
<choice>
|
2010-03-01 19:09:26 +00:00
|
|
|
<empty/>
|
|
|
|
<ref name='devextents'/>
|
2009-01-27 15:29:53 +00:00
|
|
|
</choice>
|
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name='devextents'>
|
|
|
|
<oneOrMore>
|
|
|
|
<element name='extent'>
|
2010-03-01 19:09:26 +00:00
|
|
|
<attribute name='start'>
|
xml: share 'unit' in RNG
The code supported unit='E' for "exabyte", but the RNG did not;
conversely, the RNG supported "z" and "y" but the code did not
(I'm jealous if you have that much storage, particularly since
it won't fit in 64-bit off_t). Also, the code supported
<allocation unit='...'>, but not the RNG.
In an effort to make 'unit' more worthwhile in future patches,
it's easier to share it between files.
In making this factorization, note that absFilePath is more
permissive than 'path', so storage pools and storage volumes
will now validate with a wider set of file names than before.
I don't think this should be a problem in practice.
* docs/schemas/storagepool.rng: Include basic types, rather than
repeating things here.
* docs/schemas/storagevol.rng: Likewise.
* docs/schemas/basictypes.rng: Add 'unsignedLong', 'unit', and fix
to match storage code.
2012-02-29 04:16:28 +00:00
|
|
|
<ref name='unsignedLong'/>
|
2010-03-01 19:09:26 +00:00
|
|
|
</attribute>
|
|
|
|
<attribute name='end'>
|
xml: share 'unit' in RNG
The code supported unit='E' for "exabyte", but the RNG did not;
conversely, the RNG supported "z" and "y" but the code did not
(I'm jealous if you have that much storage, particularly since
it won't fit in 64-bit off_t). Also, the code supported
<allocation unit='...'>, but not the RNG.
In an effort to make 'unit' more worthwhile in future patches,
it's easier to share it between files.
In making this factorization, note that absFilePath is more
permissive than 'path', so storage pools and storage volumes
will now validate with a wider set of file names than before.
I don't think this should be a problem in practice.
* docs/schemas/storagepool.rng: Include basic types, rather than
repeating things here.
* docs/schemas/storagevol.rng: Likewise.
* docs/schemas/basictypes.rng: Add 'unsignedLong', 'unit', and fix
to match storage code.
2012-02-29 04:16:28 +00:00
|
|
|
<ref name='unsignedLong'/>
|
2010-03-01 19:09:26 +00:00
|
|
|
</attribute>
|
2009-01-27 15:29:53 +00:00
|
|
|
</element>
|
|
|
|
</oneOrMore>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name='formatdev'>
|
|
|
|
<choice>
|
|
|
|
<value>none</value>
|
|
|
|
<value>auto</value>
|
|
|
|
<value>ext2</value>
|
|
|
|
<value>ext3</value>
|
|
|
|
<value>ext4</value>
|
|
|
|
<value>ufs</value>
|
|
|
|
<value>iso9660</value>
|
|
|
|
<value>udf</value>
|
|
|
|
<value>gfs</value>
|
|
|
|
<value>gfs2</value>
|
|
|
|
<value>vfat</value>
|
|
|
|
<value>hfs+</value>
|
|
|
|
<value>xfs</value>
|
|
|
|
</choice>
|
|
|
|
|
|
|
|
</define>
|
|
|
|
|
|
|
|
|
|
|
|
<define name='formatfile'>
|
|
|
|
<choice>
|
2012-07-18 19:06:58 +00:00
|
|
|
<value>unknown</value>
|
2009-01-27 15:29:53 +00:00
|
|
|
<value>raw</value>
|
|
|
|
<value>dir</value>
|
|
|
|
<value>bochs</value>
|
|
|
|
<value>cloop</value>
|
|
|
|
<value>cow</value>
|
|
|
|
<value>dmg</value>
|
|
|
|
<value>iso</value>
|
|
|
|
<value>qcow</value>
|
|
|
|
<value>qcow2</value>
|
2012-06-18 11:20:01 +00:00
|
|
|
<value>qed</value>
|
2009-01-27 15:29:53 +00:00
|
|
|
<value>vmdk</value>
|
|
|
|
<value>vpc</value>
|
|
|
|
</choice>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name='format'>
|
|
|
|
<optional>
|
|
|
|
<element name='format'>
|
2010-03-01 19:09:26 +00:00
|
|
|
<attribute name='type'>
|
|
|
|
<choice>
|
|
|
|
<ref name='formatfile'/>
|
|
|
|
<ref name='formatdev'/>
|
|
|
|
</choice>
|
|
|
|
</attribute>
|
2009-01-27 15:29:53 +00:00
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
</grammar>
|