提交 8ef12b96 编写于 作者: J Ján Tomko

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.
上级 ca8c36a9
......@@ -70,7 +70,7 @@
<value>logical</value>
</attribute>
<interleave>
<ref name='commonmetadata'/>
<ref name='commonMetadataNameOptional'/>
<ref name='sizing'/>
<ref name='sourcelogical'/>
<ref name='targetlogical'/>
......@@ -132,7 +132,7 @@
<value>rbd</value>
</attribute>
<interleave>
<ref name='commonmetadata'/>
<ref name='commonMetadataNameOptional'/>
<ref name='sizing'/>
<ref name='sourcerbd'/>
</interleave>
......@@ -143,7 +143,7 @@
<value>sheepdog</value>
</attribute>
<interleave>
<ref name='commonmetadata'/>
<ref name='commonMetadataNameOptional'/>
<ref name='sizing'/>
<ref name='sourcesheepdog'/>
</interleave>
......@@ -154,7 +154,7 @@
<value>gluster</value>
</attribute>
<interleave>
<ref name='commonmetadata'/>
<ref name='commonMetadataNameOptional'/>
<ref name='sizing'/>
<ref name='sourcegluster'/>
</interleave>
......@@ -165,7 +165,7 @@
<value>zfs</value>
</attribute>
<interleave>
<ref name='commonmetadata'/>
<ref name='commonMetadataNameOptional'/>
<ref name='sizing'/>
<ref name='sourcezfs'/>
<optional>
......@@ -179,7 +179,7 @@
<value>vstorage</value>
</attribute>
<interleave>
<ref name='commonmetadata'/>
<ref name='commonMetadataNameOptional'/>
<ref name='sizing'/>
<ref name='sourcevstorage'/>
<ref name='target'/>
......@@ -205,6 +205,21 @@
</interleave>
</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'>
<interleave>
<element name='name'>
......
<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>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册