Moving diskSourceNetwork and diskSourceFile's Source definition
under 'define' element, so that it will be easier to reuse it
at multiple places.
Signed-off-by: Prerna Saxena <prerna.saxena(a)nutanix.com>
Signed-off-by: Florian Schmidt <flosch(a)nutanix.com>
Signed-off-by: Rohit Kumar <rohit.kumar3(a)nutanix.com>
---
src/conf/schemas/domaincommon.rng | 60 +++++++++++++++++--------------
1 file changed, 34 insertions(+), 26 deletions(-)
diff --git a/src/conf/schemas/domaincommon.rng b/src/conf/schemas/domaincommon.rng
index c0c14fe558..58eb9670d4 100644
--- a/src/conf/schemas/domaincommon.rng
+++ b/src/conf/schemas/domaincommon.rng
@@ -1724,6 +1724,31 @@
</choice>
</define>
+ <define name="diskSourceFileElement">
+ <element name="source">
+ <interleave>
+ <optional>
+ <attribute name="file">
+ <choice>
+ <ref name="absFilePath"/>
+ <ref name="vmwarePath"/>
+ </choice>
+ </attribute>
+ </optional>
+ <ref name="diskSourceCommon"/>
+ <optional>
+ <ref name="storageStartupPolicy"/>
+ </optional>
+ <optional>
+ <ref name="encryption"/>
+ </optional>
+ <zeroOrMore>
+ <ref name="devSeclabel"/>
+ </zeroOrMore>
+ </interleave>
+ </element>
+ </define>
+
<define name="diskSourceFile">
<optional>
<attribute name="type">
@@ -1731,28 +1756,7 @@
</attribute>
</optional>
<optional>
- <element name="source">
- <interleave>
- <optional>
- <attribute name="file">
- <choice>
- <ref name="absFilePath"/>
- <ref name="vmwarePath"/>
- </choice>
- </attribute>
- </optional>
- <ref name="diskSourceCommon"/>
- <optional>
- <ref name="storageStartupPolicy"/>
- </optional>
- <optional>
- <ref name="encryption"/>
- </optional>
- <zeroOrMore>
- <ref name="devSeclabel"/>
- </zeroOrMore>
- </interleave>
- </element>
+ <ref name="diskSourceFileElement"/>
</optional>
</define>
@@ -2147,10 +2151,7 @@
</element>
</define>
- <define name="diskSourceNetwork">
- <attribute name="type">
- <value>network</value>
- </attribute>
+ <define name="diskSourceNetworkElement">
<choice>
<ref name="diskSourceNetworkProtocolNBD"/>
<ref name="diskSourceNetworkProtocolGluster"/>
@@ -2165,6 +2166,13 @@
</choice>
</define>
+ <define name="diskSourceNetwork">
+ <attribute name="type">
+ <value>network</value>
+ </attribute>
+ <ref name="diskSourceNetworkElement"/>
+ </define>
+
<define name="diskSourceVolume">
<attribute name="type">
<value>volume</value>
--
2.25.1