Today, 'loader' and 'nvram' elements are supposed to be backed by a local
disk.
Given that NVRAM data could be network-backed for high availability, this patch
defines XML spec for serving loader & nvram disks via the network.
Signed-off-by: Prerna Saxena <saxenap.ltc(a)gmail.com>
---
docs/schemas/domaincommon.rng | 108 +++++++++++++++++++++++++++++++++++-------
1 file changed, 90 insertions(+), 18 deletions(-)
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index 71ac3d0..64f4319 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -276,7 +276,42 @@
</choice>
</attribute>
</optional>
- <ref name="absFilePath"/>
+ <optional>
+ <attribute name="backing">
+ <choice>
+ <value>file</value>
+ <value>network</value>
+ </choice>
+ </attribute>
+ </optional>
+ <optional>
+ <choice>
+ <group>
+ <ref name="absFilePath"/>
+ </group>
+ <group>
+ <ref name="diskSourceFileElement"/>
+ </group>
+ <group>
+ <ref name="diskSourceNetworkProtocolNBD"/>
+ </group>
+ <group>
+ <ref name="diskSourceNetworkProtocolGluster"/>
+ </group>
+ <group>
+ <ref name="diskSourceNetworkProtocolRBD"/>
+ </group>
+ <group>
+ <ref name="diskSourceNetworkProtocolISCSI"/>
+ </group>
+ <group>
+ <ref name="diskSourceNetworkProtocolHTTP"/>
+ </group>
+ <group>
+ <ref name="diskSourceNetworkProtocolSimple"/>
+ </group>
+ </choice>
+ </optional>
</element>
</optional>
<optional>
@@ -287,7 +322,40 @@
</attribute>
</optional>
<optional>
- <ref name="absFilePath"/>
+ <attribute name="backing">
+ <choice>
+ <value>file</value>
+ <value>network</value>
+ </choice>
+ </attribute>
+ </optional>
+ <optional>
+ <choice>
+ <group>
+ <ref name="absFilePath"/>
+ </group>
+ <group>
+ <ref name="diskSourceFileElement"/>
+ </group>
+ <group>
+ <ref name="diskSourceNetworkProtocolNBD"/>
+ </group>
+ <group>
+ <ref name="diskSourceNetworkProtocolGluster"/>
+ </group>
+ <group>
+ <ref name="diskSourceNetworkProtocolRBD"/>
+ </group>
+ <group>
+ <ref name="diskSourceNetworkProtocolISCSI"/>
+ </group>
+ <group>
+ <ref name="diskSourceNetworkProtocolHTTP"/>
+ </group>
+ <group>
+ <ref name="diskSourceNetworkProtocolSimple"/>
+ </group>
+ </choice>
</optional>
</element>
</optional>
@@ -1499,25 +1567,29 @@
</attribute>
</optional>
<optional>
- <element name="source">
- <optional>
- <attribute name="file">
- <ref name="absFilePath"/>
- </attribute>
- </optional>
- <optional>
- <ref name="storageStartupPolicy"/>
- </optional>
- <optional>
- <ref name="encryption"/>
- </optional>
- <zeroOrMore>
- <ref name='devSeclabel'/>
- </zeroOrMore>
- </element>
+ <ref name='diskSourceFileElement'/>
</optional>
</define>
+ <define name="diskSourceFileElement">
+ <element name="source">
+ <optional>
+ <attribute name="file">
+ <ref name="absFilePath"/>
+ </attribute>
+ </optional>
+ <optional>
+ <ref name="storageStartupPolicy"/>
+ </optional>
+ <optional>
+ <ref name="encryption"/>
+ </optional>
+ <zeroOrMore>
+ <ref name='devSeclabel'/>
+ </zeroOrMore>
+ </element>
+ </define>
+
<define name="diskSourceBlock">
<attribute name="type">
<value>block</value>
--
1.8.1.2