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>
|
|
|
|
|
2014-04-12 01:33:45 +00:00
|
|
|
<include href='storagecommon.rng'/>
|
2009-07-20 22:28:11 +00:00
|
|
|
|
2009-01-27 15:29:53 +00:00
|
|
|
|
|
|
|
<define name='vol'>
|
|
|
|
<element name='volume'>
|
2013-11-19 20:14:54 +00:00
|
|
|
<optional>
|
|
|
|
<attribute name='type'>
|
|
|
|
<choice>
|
|
|
|
<value>file</value>
|
|
|
|
<value>block</value>
|
|
|
|
<value>dir</value>
|
|
|
|
<value>network</value>
|
2013-11-18 23:43:06 +00:00
|
|
|
<value>netdir</value>
|
2013-11-19 20:14:54 +00:00
|
|
|
</choice>
|
|
|
|
</attribute>
|
|
|
|
</optional>
|
2013-11-22 19:40:15 +00:00
|
|
|
<interleave>
|
|
|
|
<element name='name'>
|
|
|
|
<ref name='volName'/>
|
2010-03-01 19:09:26 +00:00
|
|
|
</element>
|
2013-11-22 19:40:15 +00:00
|
|
|
<optional>
|
|
|
|
<element name='key'>
|
|
|
|
<text/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<ref name='source'/>
|
|
|
|
</optional>
|
|
|
|
<ref name='sizing'/>
|
|
|
|
<ref name='target'/>
|
|
|
|
<optional>
|
|
|
|
<ref name='backingStore'/>
|
|
|
|
</optional>
|
|
|
|
</interleave>
|
2009-01-27 15:29:53 +00:00
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name='sizing'>
|
2013-11-22 19:40:15 +00:00
|
|
|
<interleave>
|
|
|
|
<optional>
|
|
|
|
<element name='capacity'>
|
|
|
|
<ref name='scaledInteger'/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name='allocation'>
|
|
|
|
<ref name='scaledInteger'/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2018-05-18 21:25:01 +00:00
|
|
|
<optional>
|
|
|
|
<element name='physical'>
|
|
|
|
<ref name='scaledInteger'/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2013-11-22 19:40:15 +00:00
|
|
|
</interleave>
|
2009-01-27 15:29:53 +00:00
|
|
|
</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'>
|
2013-11-22 19:40:15 +00:00
|
|
|
<interleave>
|
|
|
|
<optional>
|
|
|
|
<element name='path'>
|
|
|
|
<choice>
|
|
|
|
<data type='anyURI'/>
|
|
|
|
<ref name='absFilePath'/>
|
|
|
|
</choice>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<ref name='format'/>
|
|
|
|
<ref name='permissions'/>
|
|
|
|
<ref name='timestamps'/>
|
|
|
|
<optional>
|
|
|
|
<ref name='encryption'/>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<ref name='compat'/>
|
|
|
|
</optional>
|
2014-07-15 08:49:46 +00:00
|
|
|
<optional>
|
|
|
|
<element name='nocow'>
|
|
|
|
<empty/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2013-11-22 19:40:15 +00:00
|
|
|
<optional>
|
|
|
|
<ref name='fileFormatFeatures'/>
|
|
|
|
</optional>
|
|
|
|
</interleave>
|
2009-01-27 15:29:53 +00:00
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name='backingStore'>
|
|
|
|
<element name='backingStore'>
|
2013-11-22 19:40:15 +00:00
|
|
|
<interleave>
|
|
|
|
<element name='path'>
|
|
|
|
<ref name='absFilePath'/>
|
|
|
|
</element>
|
|
|
|
<ref name='format'/>
|
|
|
|
<ref name='permissions'/>
|
2018-09-11 02:57:13 +00:00
|
|
|
<ref name='timestamps'/>
|
2013-11-22 19:40:15 +00:00
|
|
|
</interleave>
|
2009-01-27 15:29:53 +00:00
|
|
|
</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>
|
2013-02-26 12:41:21 +00:00
|
|
|
<value>ocfs2</value>
|
2019-11-15 11:45:19 +00:00
|
|
|
<value>vmfs</value>
|
2009-01-27 15:29:53 +00:00
|
|
|
</choice>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name='formatfile'>
|
|
|
|
<choice>
|
2012-07-18 19:06:58 +00:00
|
|
|
<value>unknown</value>
|
2014-04-14 22:54:13 +00:00
|
|
|
<ref name='storageFormat'/>
|
2009-01-27 15:29:53 +00:00
|
|
|
</choice>
|
|
|
|
</define>
|
|
|
|
|
2013-03-20 11:53:32 +00:00
|
|
|
<define name='formatdisk'>
|
|
|
|
<choice>
|
|
|
|
<value>none</value>
|
|
|
|
<value>linux</value>
|
|
|
|
<value>fat16</value>
|
|
|
|
<value>fat32</value>
|
|
|
|
<value>linux-swap</value>
|
|
|
|
<value>linux-lvm</value>
|
|
|
|
<value>linux-raid</value>
|
|
|
|
<value>extended</value>
|
|
|
|
</choice>
|
|
|
|
</define>
|
|
|
|
|
2009-01-27 15:29:53 +00:00
|
|
|
<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'/>
|
2013-03-20 11:53:32 +00:00
|
|
|
<ref name='formatdisk'/>
|
2010-03-01 19:09:26 +00:00
|
|
|
</choice>
|
|
|
|
</attribute>
|
2009-01-27 15:29:53 +00:00
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
</grammar>
|