libvirt/docs/schemas/storagepoolcaps.rng
John Ferlan 5dded8c806 docs: Add schema for storage pool capabilities
Define a schema for the storage pool capabilities along with
a test to show the general format.

Signed-off-by: John Ferlan <jferlan@redhat.com>
ACKed-by: Michal Privoznik <mprivozn@redhat.com>
2019-03-06 11:12:48 -05:00

89 lines
1.9 KiB
XML

<?xml version="1.0"?>
<!-- A Relax NG schema for the libvirt storage pool capabilities XML format -->
<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
<include href='basictypes.rng'/>
<start>
<ref name='storagepoolCapabilities'/>
</start>
<define name='storagepoolCapabilities'>
<element name='storagepoolCapabilities'>
<zeroOrMore>
<ref name='poolCapsType'/>
</zeroOrMore>
</element>
</define>
<define name='poolCapsType'>
<element name='pool'>
<ref name='poolCapsTypes'/>
<ref name='poolCapsSupported'/>
<optional>
<ref name='poolCapsPoolOptions'/>
</optional>
<optional>
<ref name='poolCapsVolOptions'/>
</optional>
</element>
</define>
<define name='poolCapsTypes'>
<attribute name='type'>
<text/>
</attribute>
</define>
<define name='poolCapsSupported'>
<attribute name='supported'>
<ref name="virYesNo"/>
</attribute>
</define>
<define name='poolCapsPoolOptions'>
<element name='poolOptions'>
<optional>
<ref name='poolDefaultFormat'/>
</optional>
<optional>
<ref name='poolCapsEnum'/>
</optional>
</element>
</define>
<define name='poolCapsVolOptions'>
<element name='volOptions'>
<ref name='poolDefaultFormat'/>
<ref name='poolCapsEnum'/>
</element>
</define>
<define name='poolDefaultFormat'>
<element name='defaultFormat'>
<attribute name='type'>
<text/>
</attribute>
</element>
</define>
<define name='poolCapsEnum'>
<zeroOrMore>
<element name='enum'>
<attribute name='name'>
<text/>
</attribute>
<ref name='value'/>
</element>
</zeroOrMore>
</define>
<define name='value'>
<zeroOrMore>
<element name='value'>
<text/>
</element>
</zeroOrMore>
</define>
</grammar>