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">
|
|
|
|
<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'>
|
2010-03-01 19:09:26 +00:00
|
|
|
<ref name='name'/>
|
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'>
|
2009-05-29 12:27:45 +00:00
|
|
|
<optional>
|
2010-03-01 19:09:26 +00:00
|
|
|
<attribute name='unit'>
|
|
|
|
<ref name='unit'/>
|
|
|
|
</attribute>
|
2009-05-29 12:27:45 +00:00
|
|
|
</optional>
|
2010-03-01 19:09:26 +00:00
|
|
|
<ref name='uint'/>
|
2009-01-27 15:29:53 +00:00
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
|
|
|
<element name='allocation'>
|
2010-03-01 19:09:26 +00:00
|
|
|
<ref name='uint'/>
|
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'>
|
|
|
|
<ref name='uint'/>
|
|
|
|
</element>
|
|
|
|
<element name='owner'>
|
|
|
|
<ref name='uint'/>
|
|
|
|
</element>
|
|
|
|
<element name='group'>
|
|
|
|
<ref name='uint'/>
|
|
|
|
</element>
|
|
|
|
<optional>
|
|
|
|
<element name='label'>
|
|
|
|
<text/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2009-01-27 15:29:53 +00:00
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name='target'>
|
|
|
|
<element name='target'>
|
|
|
|
<optional>
|
2010-03-01 19:09:26 +00:00
|
|
|
<element name='path'>
|
|
|
|
<ref name='path'/>
|
|
|
|
</element>
|
2009-01-27 15:29:53 +00:00
|
|
|
</optional>
|
|
|
|
<ref name='format'/>
|
|
|
|
<ref name='permissions'/>
|
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'>
|
2010-03-01 19:09:26 +00:00
|
|
|
<ref name='path'/>
|
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'>
|
2010-03-01 19:09:26 +00:00
|
|
|
<ref name='path'/>
|
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'>
|
|
|
|
<ref name='uint'/>
|
|
|
|
</attribute>
|
|
|
|
<attribute name='end'>
|
|
|
|
<ref name='uint'/>
|
|
|
|
</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>
|
|
|
|
<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>
|
|
|
|
<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>
|
|
|
|
|
|
|
|
<define name='name'>
|
|
|
|
<data type='string'>
|
|
|
|
<param name="pattern">[a-zA-Z0-9_\+\-\.]+</param>
|
|
|
|
</data>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name='uint'>
|
|
|
|
<data type='string'>
|
|
|
|
<param name="pattern">[0-9]+</param>
|
|
|
|
</data>
|
|
|
|
</define>
|
|
|
|
|
|
|
|
<define name='path'>
|
|
|
|
<data type='string'>
|
|
|
|
<param name="pattern">/[a-zA-Z0-9_\+\-\./%]+</param>
|
|
|
|
</data>
|
|
|
|
</define>
|
|
|
|
|
2009-05-29 12:27:45 +00:00
|
|
|
<define name='unit'>
|
|
|
|
<data type='string'>
|
|
|
|
<param name="pattern">[kKmMgGtTpPyYzZ]</param>
|
|
|
|
</data>
|
|
|
|
</define>
|
|
|
|
|
2009-09-14 20:09:07 +00:00
|
|
|
<define name="UUID">
|
|
|
|
<choice>
|
|
|
|
<data type="string">
|
|
|
|
<param name="pattern">[a-fA-F0-9]{32}</param>
|
|
|
|
</data>
|
|
|
|
<data type="string">
|
|
|
|
<param name="pattern">[a-fA-F0-9]{8}\-([a-fA-F0-9]{4}\-){3}[a-fA-F0-9]{12}</param>
|
|
|
|
</data>
|
|
|
|
</choice>
|
|
|
|
</define>
|
2009-01-27 15:29:53 +00:00
|
|
|
|
|
|
|
</grammar>
|