In a backing chain, each file of the chain can have a different
authorization or encryption; therefore, this information should
be associated with the common storage source elements.
* docs/schemas/domaincommon.rng (diskspec): Drop source-related
portions...
(disksource): ...and include common types here instead.
(diskAuth, diskAuthSecret): Move...
* docs/schemas/storagecommon.rng (diskAuth, diskAuthSecret):
...here.
(storageSourceCommon): New define.
Signed-off-by: Eric Blake <eblake(a)redhat.com>
---
docs/schemas/domaincommon.rng | 33 ----------------------------
docs/schemas/storagecommon.rng | 50 +++++++++++++++++++++++++++++++++++++-----
2 files changed, 45 insertions(+), 38 deletions(-)
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index a3e5278..78fed88 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -1007,9 +1007,6 @@
<optional>
<ref name='diskMirror'/>
</optional>
- <optional>
- <ref name="diskAuth"/>
- </optional>
<ref name="target"/>
<optional>
<ref name="deviceBoot"/>
@@ -1035,9 +1032,6 @@
</element>
</optional>
<optional>
- <ref name="encryption"/>
- </optional>
- <optional>
<ref name="diskIoTune"/>
</optional>
<optional>
@@ -3960,33 +3954,6 @@
</optional>
</element>
</define>
- <define name="diskAuth">
- <element name="auth">
- <attribute name="username">
- <ref name="genericName"/>
- </attribute>
- <ref name="diskAuthSecret"/>
- </element>
- </define>
-
- <define name='diskAuthSecret'>
- <element name='secret'>
- <attribute name='type'>
- <choice>
- <value>ceph</value>
- <value>iscsi</value>
- </choice>
- </attribute>
- <choice>
- <attribute name='uuid'>
- <ref name="UUID"/>
- </attribute>
- <attribute name='usage'>
- <ref name='genericName'/>
- </attribute>
- </choice>
- </element>
- </define>
<define name='diskIoTune'>
<element name="iotune">
diff --git a/docs/schemas/storagecommon.rng b/docs/schemas/storagecommon.rng
index e1db740..4c0b719 100644
--- a/docs/schemas/storagecommon.rng
+++ b/docs/schemas/storagecommon.rng
@@ -6,6 +6,34 @@
<!-- This schema is not designed for standalone use; another file
must include both this file and basictypes.rng -->
+ <define name='diskAuthSecret'>
+ <element name='secret'>
+ <attribute name='type'>
+ <choice>
+ <value>ceph</value>
+ <value>iscsi</value>
+ </choice>
+ </attribute>
+ <choice>
+ <attribute name='uuid'>
+ <ref name="UUID"/>
+ </attribute>
+ <attribute name='usage'>
+ <ref name='genericName'/>
+ </attribute>
+ </choice>
+ </element>
+ </define>
+
+ <define name="diskAuth">
+ <element name="auth">
+ <attribute name="username">
+ <ref name="genericName"/>
+ </attribute>
+ <ref name="diskAuthSecret"/>
+ </element>
+ </define>
+
<define name='encryption'>
<element name='encryption'>
<attribute name='format'>
@@ -131,6 +159,18 @@
</element>
</define>
+ <define name='storageSourceCommon'>
+ <interleave>
+ <optional>
+ <ref name="encryption"/>
+ </optional>
+ <optional>
+ <ref name="diskAuth"/>
+ </optional>
+ <ref name='storageSourceExtra'/>
+ </interleave>
+ </define>
+
<define name="storageSourceFile">
<optional>
<attribute name="type">
@@ -153,7 +193,7 @@
</optional>
</element>
</optional>
- <ref name='storageSourceExtra'/>
+ <ref name='storageSourceCommon'/>
</interleave>
</define>
@@ -177,7 +217,7 @@
</optional>
</element>
</optional>
- <ref name='storageSourceExtra'/>
+ <ref name='storageSourceCommon'/>
</interleave>
</define>
@@ -197,7 +237,7 @@
<empty/>
</element>
</optional>
- <ref name='storageSourceExtra'/>
+ <ref name='storageSourceCommon'/>
</interleave>
</define>
@@ -261,7 +301,7 @@
</zeroOrMore>
<empty/>
</element>
- <ref name='storageSourceExtra'/>
+ <ref name='storageSourceCommon'/>
</interleave>
</define>
@@ -294,7 +334,7 @@
</optional>
</element>
</optional>
- <ref name='storageSourceExtra'/>
+ <ref name='storageSourceCommon'/>
</interleave>
</define>
--
1.9.0