render / rpms / libvirt

Forked from rpms/libvirt 10 months ago
Clone
a41c76
From d7aeea8dfb78168ae305252bf581d46766496e24 Mon Sep 17 00:00:00 2001
a41c76
Message-Id: <d7aeea8dfb78168ae305252bf581d46766496e24@dist-git>
a41c76
From: Han Han <hhan@redhat.com>
a41c76
Date: Mon, 30 Mar 2020 17:21:44 +0200
a41c76
Subject: [PATCH] schemas: rng: Use interleave in the disk source element
a41c76
a41c76
Signed-off-by: Han Han <hhan@redhat.com>
a41c76
Reviewed-by: Erik Skultety <eskultet@redhat.com>
a41c76
(cherry picked from commit 8b41b21aee4fb3b0f5fed1ecc73c5a7fd6879a93)
a41c76
https://bugzilla.redhat.com/show_bug.cgi?id=1804750
a41c76
Message-Id: <79373ae94fb73576d1433b22545327a4afca2d99.1585581552.git.pkrempa@redhat.com>
a41c76
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
a41c76
---
a41c76
 docs/schemas/domaincommon.rng | 398 ++++++++++++++++++----------------
a41c76
 1 file changed, 211 insertions(+), 187 deletions(-)
a41c76
a41c76
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
a41c76
index ac6f180382..e17f7ff8c0 100644
a41c76
--- a/docs/schemas/domaincommon.rng
a41c76
+++ b/docs/schemas/domaincommon.rng
a41c76
@@ -1642,21 +1642,23 @@
a41c76
     </optional>
a41c76
     <optional>
a41c76
       <element name="source">
a41c76
-        <optional>
a41c76
-          <attribute name="file">
a41c76
-            <ref name="absFilePath"/>
a41c76
-          </attribute>
a41c76
-        </optional>
a41c76
-        <ref name="diskSourceCommon"/>
a41c76
-        <optional>
a41c76
-          <ref name="storageStartupPolicy"/>
a41c76
-        </optional>
a41c76
-        <optional>
a41c76
-          <ref name="encryption"/>
a41c76
-        </optional>
a41c76
-        <zeroOrMore>
a41c76
-          <ref name='devSeclabel'/>
a41c76
-        </zeroOrMore>
a41c76
+        <interleave>
a41c76
+          <optional>
a41c76
+            <attribute name="file">
a41c76
+              <ref name="absFilePath"/>
a41c76
+            </attribute>
a41c76
+          </optional>
a41c76
+          <ref name="diskSourceCommon"/>
a41c76
+          <optional>
a41c76
+            <ref name="storageStartupPolicy"/>
a41c76
+          </optional>
a41c76
+          <optional>
a41c76
+            <ref name="encryption"/>
a41c76
+          </optional>
a41c76
+          <zeroOrMore>
a41c76
+            <ref name='devSeclabel'/>
a41c76
+          </zeroOrMore>
a41c76
+        </interleave>
a41c76
       </element>
a41c76
     </optional>
a41c76
   </define>
a41c76
@@ -1667,24 +1669,26 @@
a41c76
     </attribute>
a41c76
     <optional>
a41c76
       <element name="source">
a41c76
-        <optional>
a41c76
-          <attribute name="dev">
a41c76
-            <ref name="absFilePath"/>
a41c76
-          </attribute>
a41c76
-        </optional>
a41c76
-        <ref name="diskSourceCommon"/>
a41c76
-        <optional>
a41c76
-          <ref name="storageStartupPolicy"/>
a41c76
-        </optional>
a41c76
-        <optional>
a41c76
-          <ref name="encryption"/>
a41c76
-        </optional>
a41c76
-        <optional>
a41c76
-          <ref name="reservations"/>
a41c76
-        </optional>
a41c76
-        <zeroOrMore>
a41c76
-          <ref name='devSeclabel'/>
a41c76
-        </zeroOrMore>
a41c76
+        <interleave>
a41c76
+          <optional>
a41c76
+            <attribute name="dev">
a41c76
+              <ref name="absFilePath"/>
a41c76
+            </attribute>
a41c76
+          </optional>
a41c76
+          <ref name="diskSourceCommon"/>
a41c76
+          <optional>
a41c76
+            <ref name="storageStartupPolicy"/>
a41c76
+          </optional>
a41c76
+          <optional>
a41c76
+            <ref name="encryption"/>
a41c76
+          </optional>
a41c76
+          <optional>
a41c76
+            <ref name="reservations"/>
a41c76
+          </optional>
a41c76
+          <zeroOrMore>
a41c76
+            <ref name='devSeclabel'/>
a41c76
+          </zeroOrMore>
a41c76
+        </interleave>
a41c76
       </element>
a41c76
     </optional>
a41c76
   </define>
a41c76
@@ -1695,17 +1699,19 @@
a41c76
     </attribute>
a41c76
     <optional>
a41c76
       <element name="source">
a41c76
-        <attribute name="dir">
a41c76
-          <ref name="absFilePath"/>
a41c76
-        </attribute>
a41c76
-        <ref name="diskSourceCommon"/>
a41c76
-        <optional>
a41c76
-          <ref name="storageStartupPolicy"/>
a41c76
-        </optional>
a41c76
-        <optional>
a41c76
-          <ref name="encryption"/>
a41c76
-        </optional>
a41c76
-        <empty/>
a41c76
+        <interleave>
a41c76
+          <attribute name="dir">
a41c76
+            <ref name="absFilePath"/>
a41c76
+          </attribute>
a41c76
+          <ref name="diskSourceCommon"/>
a41c76
+          <optional>
a41c76
+            <ref name="storageStartupPolicy"/>
a41c76
+          </optional>
a41c76
+          <optional>
a41c76
+            <ref name="encryption"/>
a41c76
+          </optional>
a41c76
+          <empty/>
a41c76
+        </interleave>
a41c76
       </element>
a41c76
     </optional>
a41c76
   </define>
a41c76
@@ -1856,138 +1862,152 @@
a41c76
 
a41c76
   <define name="diskSourceNetworkProtocolHTTPS">
a41c76
     <element name="source">
a41c76
-      <attribute name="protocol">
a41c76
-        <choice>
a41c76
-          <value>https</value>
a41c76
-        </choice>
a41c76
-      </attribute>
a41c76
-      <attribute name="name"/>
a41c76
-      <ref name="diskSourceCommon"/>
a41c76
-      <ref name="diskSourceNetworkHost"/>
a41c76
-      <optional>
a41c76
-        <ref name="encryption"/>
a41c76
-      </optional>
a41c76
-      <optional>
a41c76
-        <ref name="diskSourceNetworkProtocolSSLVerify"/>
a41c76
-      </optional>
a41c76
-      <optional>
a41c76
-        <ref name="diskSourceNetworkProtocolHTTPCookies"/>
a41c76
-      </optional>
a41c76
-      <ref name="diskSourceNetworkProtocolPropsCommon"/>
a41c76
+      <interleave>
a41c76
+        <attribute name="protocol">
a41c76
+          <choice>
a41c76
+            <value>https</value>
a41c76
+          </choice>
a41c76
+        </attribute>
a41c76
+        <attribute name="name"/>
a41c76
+        <ref name="diskSourceCommon"/>
a41c76
+        <ref name="diskSourceNetworkHost"/>
a41c76
+        <optional>
a41c76
+          <ref name="encryption"/>
a41c76
+        </optional>
a41c76
+        <optional>
a41c76
+          <ref name="diskSourceNetworkProtocolSSLVerify"/>
a41c76
+        </optional>
a41c76
+        <optional>
a41c76
+          <ref name="diskSourceNetworkProtocolHTTPCookies"/>
a41c76
+        </optional>
a41c76
+        <ref name="diskSourceNetworkProtocolPropsCommon"/>
a41c76
+        </interleave>
a41c76
     </element>
a41c76
   </define>
a41c76
 
a41c76
   <define name="diskSourceNetworkProtocolHTTP">
a41c76
     <element name="source">
a41c76
-      <attribute name="protocol">
a41c76
-        <choice>
a41c76
-          <value>http</value>
a41c76
-        </choice>
a41c76
-      </attribute>
a41c76
-      <attribute name="name"/>
a41c76
-      <ref name="diskSourceCommon"/>
a41c76
-      <ref name="diskSourceNetworkHost"/>
a41c76
-      <optional>
a41c76
-        <ref name="encryption"/>
a41c76
-      </optional>
a41c76
-      <optional>
a41c76
-        <ref name="diskSourceNetworkProtocolHTTPCookies"/>
a41c76
-      </optional>
a41c76
-      <ref name="diskSourceNetworkProtocolPropsCommon"/>
a41c76
+      <interleave>
a41c76
+        <attribute name="protocol">
a41c76
+          <choice>
a41c76
+            <value>http</value>
a41c76
+          </choice>
a41c76
+        </attribute>
a41c76
+        <attribute name="name"/>
a41c76
+        <ref name="diskSourceCommon"/>
a41c76
+        <ref name="diskSourceNetworkHost"/>
a41c76
+        <optional>
a41c76
+          <ref name="encryption"/>
a41c76
+        </optional>
a41c76
+        <optional>
a41c76
+          <ref name="diskSourceNetworkProtocolHTTPCookies"/>
a41c76
+        </optional>
a41c76
+        <ref name="diskSourceNetworkProtocolPropsCommon"/>
a41c76
+      </interleave>
a41c76
     </element>
a41c76
   </define>
a41c76
 
a41c76
   <define name="diskSourceNetworkProtocolFTPS">
a41c76
     <element name="source">
a41c76
-      <attribute name="protocol">
a41c76
-        <choice>
a41c76
-          <value>ftps</value>
a41c76
-        </choice>
a41c76
-      </attribute>
a41c76
-      <attribute name="name"/>
a41c76
-      <ref name="diskSourceCommon"/>
a41c76
-      <ref name="diskSourceNetworkHost"/>
a41c76
-      <optional>
a41c76
-        <ref name="encryption"/>
a41c76
-      </optional>
a41c76
-      <optional>
a41c76
-        <ref name="diskSourceNetworkProtocolSSLVerify"/>
a41c76
-      </optional>
a41c76
-      <ref name="diskSourceNetworkProtocolPropsCommon"/>
a41c76
+      <interleave>
a41c76
+        <attribute name="protocol">
a41c76
+          <choice>
a41c76
+            <value>ftps</value>
a41c76
+          </choice>
a41c76
+        </attribute>
a41c76
+        <attribute name="name"/>
a41c76
+        <ref name="diskSourceCommon"/>
a41c76
+        <ref name="diskSourceNetworkHost"/>
a41c76
+        <optional>
a41c76
+          <ref name="encryption"/>
a41c76
+        </optional>
a41c76
+        <optional>
a41c76
+          <ref name="diskSourceNetworkProtocolSSLVerify"/>
a41c76
+        </optional>
a41c76
+        <ref name="diskSourceNetworkProtocolPropsCommon"/>
a41c76
+      </interleave>
a41c76
     </element>
a41c76
   </define>
a41c76
 
a41c76
   <define name="diskSourceNetworkProtocolSimple">
a41c76
     <element name="source">
a41c76
-      <attribute name="protocol">
a41c76
-        <choice>
a41c76
-          <value>sheepdog</value>
a41c76
-          <value>ftp</value>
a41c76
-          <value>tftp</value>
a41c76
-        </choice>
a41c76
-      </attribute>
a41c76
-      <attribute name="name"/>
a41c76
-      <ref name="diskSourceCommon"/>
a41c76
-      <ref name="diskSourceNetworkHost"/>
a41c76
-      <optional>
a41c76
-        <ref name="encryption"/>
a41c76
-      </optional>
a41c76
-      <ref name="diskSourceNetworkProtocolPropsCommon"/>
a41c76
+      <interleave>
a41c76
+        <attribute name="protocol">
a41c76
+          <choice>
a41c76
+            <value>sheepdog</value>
a41c76
+            <value>ftp</value>
a41c76
+            <value>tftp</value>
a41c76
+          </choice>
a41c76
+        </attribute>
a41c76
+        <attribute name="name"/>
a41c76
+        <ref name="diskSourceCommon"/>
a41c76
+        <ref name="diskSourceNetworkHost"/>
a41c76
+        <optional>
a41c76
+          <ref name="encryption"/>
a41c76
+        </optional>
a41c76
+        <ref name="diskSourceNetworkProtocolPropsCommon"/>
a41c76
+      </interleave>
a41c76
     </element>
a41c76
   </define>
a41c76
 
a41c76
   <define name="diskSourceNetworkProtocolNBD">
a41c76
     <element name="source">
a41c76
-      <attribute name="protocol">
a41c76
-        <value>nbd</value>
a41c76
-      </attribute>
a41c76
-      <optional>
a41c76
-        <attribute name="name"/>
a41c76
-      </optional>
a41c76
-      <optional>
a41c76
-        <attribute name="tls">
a41c76
-          <ref name="virYesNo"/>
a41c76
+      <interleave>
a41c76
+        <attribute name="protocol">
a41c76
+          <value>nbd</value>
a41c76
         </attribute>
a41c76
-      </optional>
a41c76
-      <ref name="diskSourceCommon"/>
a41c76
-      <ref name="diskSourceNetworkHost"/>
a41c76
-      <optional>
a41c76
-        <ref name="encryption"/>
a41c76
-      </optional>
a41c76
+        <optional>
a41c76
+          <attribute name="name"/>
a41c76
+        </optional>
a41c76
+        <optional>
a41c76
+          <attribute name="tls">
a41c76
+            <ref name="virYesNo"/>
a41c76
+          </attribute>
a41c76
+        </optional>
a41c76
+        <ref name="diskSourceCommon"/>
a41c76
+        <ref name="diskSourceNetworkHost"/>
a41c76
+        <optional>
a41c76
+          <ref name="encryption"/>
a41c76
+        </optional>
a41c76
+      </interleave>
a41c76
     </element>
a41c76
   </define>
a41c76
 
a41c76
   <define name="diskSourceNetworkProtocolGluster">
a41c76
     <element name="source">
a41c76
-      <attribute name="protocol">
a41c76
-        <value>gluster</value>
a41c76
-      </attribute>
a41c76
-      <attribute name="name"/>
a41c76
-      <ref name="diskSourceCommon"/>
a41c76
-      <oneOrMore>
a41c76
-        <ref name="diskSourceNetworkHost"/>
a41c76
-      </oneOrMore>
a41c76
-      <optional>
a41c76
-        <ref name="encryption"/>
a41c76
-      </optional>
a41c76
+      <interleave>
a41c76
+        <attribute name="protocol">
a41c76
+          <value>gluster</value>
a41c76
+        </attribute>
a41c76
+        <attribute name="name"/>
a41c76
+        <ref name="diskSourceCommon"/>
a41c76
+        <oneOrMore>
a41c76
+          <ref name="diskSourceNetworkHost"/>
a41c76
+        </oneOrMore>
a41c76
+        <optional>
a41c76
+          <ref name="encryption"/>
a41c76
+        </optional>
a41c76
+      </interleave>
a41c76
     </element>
a41c76
   </define>
a41c76
 
a41c76
   <define name="diskSourceNetworkProtocolVxHS">
a41c76
     <element name="source">
a41c76
-      <attribute name="protocol">
a41c76
-        <choice>
a41c76
-          <value>vxhs</value>
a41c76
-        </choice>
a41c76
-      </attribute>
a41c76
-      <attribute name="name"/>
a41c76
-      <ref name="diskSourceCommon"/>
a41c76
-      <optional>
a41c76
-        <attribute name="tls">
a41c76
-          <ref name="virYesNo"/>
a41c76
+      <interleave>
a41c76
+        <attribute name="protocol">
a41c76
+          <choice>
a41c76
+            <value>vxhs</value>
a41c76
+          </choice>
a41c76
         </attribute>
a41c76
-      </optional>
a41c76
-      <ref name="diskSourceNetworkHost"/>
a41c76
+        <attribute name="name"/>
a41c76
+        <ref name="diskSourceCommon"/>
a41c76
+        <optional>
a41c76
+          <attribute name="tls">
a41c76
+            <ref name="virYesNo"/>
a41c76
+          </attribute>
a41c76
+        </optional>
a41c76
+        <ref name="diskSourceNetworkHost"/>
a41c76
+      </interleave>
a41c76
     </element>
a41c76
   </define>
a41c76
 
a41c76
@@ -2014,30 +2034,32 @@
a41c76
     </attribute>
a41c76
     <optional>
a41c76
       <element name="source">
a41c76
-        <attribute name="pool">
a41c76
-          <ref name="poolName"/>
a41c76
-        </attribute>
a41c76
-        <attribute name="volume">
a41c76
-          <ref name="volName"/>
a41c76
-        </attribute>
a41c76
-        <optional>
a41c76
-          <attribute name="mode">
a41c76
-            <choice>
a41c76
-              <value>host</value>
a41c76
-              <value>direct</value>
a41c76
-            </choice>
a41c76
+        <interleave>
a41c76
+          <attribute name="pool">
a41c76
+            <ref name="poolName"/>
a41c76
           </attribute>
a41c76
-        </optional>
a41c76
-        <ref name="diskSourceCommon"/>
a41c76
-        <optional>
a41c76
-          <ref name="storageStartupPolicy"/>
a41c76
-        </optional>
a41c76
-        <optional>
a41c76
-          <ref name="encryption"/>
a41c76
-        </optional>
a41c76
-        <zeroOrMore>
a41c76
-          <ref name='devSeclabel'/>
a41c76
-        </zeroOrMore>
a41c76
+          <attribute name="volume">
a41c76
+            <ref name="volName"/>
a41c76
+          </attribute>
a41c76
+          <optional>
a41c76
+            <attribute name="mode">
a41c76
+              <choice>
a41c76
+                <value>host</value>
a41c76
+                <value>direct</value>
a41c76
+              </choice>
a41c76
+            </attribute>
a41c76
+          </optional>
a41c76
+          <ref name="diskSourceCommon"/>
a41c76
+          <optional>
a41c76
+            <ref name="storageStartupPolicy"/>
a41c76
+          </optional>
a41c76
+          <optional>
a41c76
+            <ref name="encryption"/>
a41c76
+          </optional>
a41c76
+          <zeroOrMore>
a41c76
+            <ref name='devSeclabel'/>
a41c76
+          </zeroOrMore>
a41c76
+        </interleave>
a41c76
       </element>
a41c76
     </optional>
a41c76
   </define>
a41c76
@@ -2048,27 +2070,29 @@
a41c76
     </attribute>
a41c76
     <optional>
a41c76
       <element name="source">
a41c76
-        <attribute name="type">
a41c76
-          <value>pci</value>
a41c76
-        </attribute>
a41c76
-        <attribute name="namespace">
a41c76
-          <ref name="uint32"/>
a41c76
-        </attribute>
a41c76
-        <optional>
a41c76
-          <attribute name="managed">
a41c76
-            <ref name="virYesNo"/>
a41c76
+        <interleave>
a41c76
+          <attribute name="type">
a41c76
+            <value>pci</value>
a41c76
           </attribute>
a41c76
-        </optional>
a41c76
-        <element name="address">
a41c76
-          <ref name="pciaddress"/>
a41c76
-        </element>
a41c76
-        <ref name="diskSourceCommon"/>
a41c76
-        <optional>
a41c76
-          <ref name="storageStartupPolicy"/>
a41c76
-        </optional>
a41c76
-        <optional>
a41c76
-          <ref name="encryption"/>
a41c76
-        </optional>
a41c76
+          <attribute name="namespace">
a41c76
+            <ref name="uint32"/>
a41c76
+          </attribute>
a41c76
+          <optional>
a41c76
+            <attribute name="managed">
a41c76
+              <ref name="virYesNo"/>
a41c76
+            </attribute>
a41c76
+          </optional>
a41c76
+          <element name="address">
a41c76
+            <ref name="pciaddress"/>
a41c76
+          </element>
a41c76
+          <ref name="diskSourceCommon"/>
a41c76
+          <optional>
a41c76
+            <ref name="storageStartupPolicy"/>
a41c76
+          </optional>
a41c76
+          <optional>
a41c76
+            <ref name="encryption"/>
a41c76
+          </optional>
a41c76
+        </interleave>
a41c76
       </element>
a41c76
     </optional>
a41c76
   </define>
a41c76
-- 
a41c76
2.26.0
a41c76