1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-22 17:34:18 +03:00

schema: do not require name for certain pool types

Pool types that have the VIR_STORAGE_POOL_SOURCE_NAME flag set
allow omitting the <name> element and instead fill out the pool name
from the <source><name> element.

Relax the schema to make <name> optional for these pools.
Expressing that at least one of these is required is out of scope
of the schema.
This commit is contained in:
Ján Tomko 2017-03-28 15:07:50 +02:00
parent ca8c36a9e3
commit 8ef12b96fa
2 changed files with 39 additions and 6 deletions

View File

@ -70,7 +70,7 @@
<value>logical</value> <value>logical</value>
</attribute> </attribute>
<interleave> <interleave>
<ref name='commonmetadata'/> <ref name='commonMetadataNameOptional'/>
<ref name='sizing'/> <ref name='sizing'/>
<ref name='sourcelogical'/> <ref name='sourcelogical'/>
<ref name='targetlogical'/> <ref name='targetlogical'/>
@ -132,7 +132,7 @@
<value>rbd</value> <value>rbd</value>
</attribute> </attribute>
<interleave> <interleave>
<ref name='commonmetadata'/> <ref name='commonMetadataNameOptional'/>
<ref name='sizing'/> <ref name='sizing'/>
<ref name='sourcerbd'/> <ref name='sourcerbd'/>
</interleave> </interleave>
@ -143,7 +143,7 @@
<value>sheepdog</value> <value>sheepdog</value>
</attribute> </attribute>
<interleave> <interleave>
<ref name='commonmetadata'/> <ref name='commonMetadataNameOptional'/>
<ref name='sizing'/> <ref name='sizing'/>
<ref name='sourcesheepdog'/> <ref name='sourcesheepdog'/>
</interleave> </interleave>
@ -154,7 +154,7 @@
<value>gluster</value> <value>gluster</value>
</attribute> </attribute>
<interleave> <interleave>
<ref name='commonmetadata'/> <ref name='commonMetadataNameOptional'/>
<ref name='sizing'/> <ref name='sizing'/>
<ref name='sourcegluster'/> <ref name='sourcegluster'/>
</interleave> </interleave>
@ -165,7 +165,7 @@
<value>zfs</value> <value>zfs</value>
</attribute> </attribute>
<interleave> <interleave>
<ref name='commonmetadata'/> <ref name='commonMetadataNameOptional'/>
<ref name='sizing'/> <ref name='sizing'/>
<ref name='sourcezfs'/> <ref name='sourcezfs'/>
<optional> <optional>
@ -179,7 +179,7 @@
<value>vstorage</value> <value>vstorage</value>
</attribute> </attribute>
<interleave> <interleave>
<ref name='commonmetadata'/> <ref name='commonMetadataNameOptional'/>
<ref name='sizing'/> <ref name='sizing'/>
<ref name='sourcevstorage'/> <ref name='sourcevstorage'/>
<ref name='target'/> <ref name='target'/>
@ -205,6 +205,21 @@
</interleave> </interleave>
</define> </define>
<define name='commonMetadataNameOptional'>
<interleave>
<optional>
<element name='name'>
<ref name='genericName'/>
</element>
</optional>
<optional>
<element name='uuid'>
<ref name='UUID'/>
</element>
</optional>
</interleave>
</define>
<define name='commonmetadata'> <define name='commonmetadata'>
<interleave> <interleave>
<element name='name'> <element name='name'>

View File

@ -0,0 +1,18 @@
<pool type='logical'>
<uuid>1c13165a-d0f4-3aee-b447-30fb38789091</uuid>
<capacity>99891544064</capacity>
<allocation>99220455424</allocation>
<available>671088640</available>
<source>
<name>zily</name>
<format type='lvm2'/>
</source>
<target>
<path>/dev/zily</path>
<permissions>
<mode>0700</mode>
<owner>0</owner>
<group>0</group>
</permissions>
</target>
</pool>