[libvirt PATCH 2/3] schema: Be more flexible for diskSourceNetworkProtocolPropsCommon

Jonathon Jongsma posted 3 patches 3 years, 7 months ago
[libvirt PATCH 2/3] schema: Be more flexible for diskSourceNetworkProtocolPropsCommon
Posted by Jonathon Jongsma 3 years, 7 months ago
Add <interleave> to allow the subproperties to be specified in any
order.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
---
 src/conf/schemas/domaincommon.rng | 34 ++++++++++++++++---------------
 1 file changed, 18 insertions(+), 16 deletions(-)

diff --git a/src/conf/schemas/domaincommon.rng b/src/conf/schemas/domaincommon.rng
index e2246e6b63..da2fb0d5cb 100644
--- a/src/conf/schemas/domaincommon.rng
+++ b/src/conf/schemas/domaincommon.rng
@@ -1967,22 +1967,24 @@
   </define>
 
   <define name="diskSourceNetworkProtocolPropsCommon">
-    <optional>
-      <element name="readahead">
-        <attribute name="size">
-          <ref name="positiveInteger"/>
-        </attribute>
-        <empty/>
-      </element>
-    </optional>
-    <optional>
-      <element name="timeout">
-        <attribute name="seconds">
-          <ref name="positiveInteger"/>
-        </attribute>
-        <empty/>
-      </element>
-    </optional>
+    <interleave>
+      <optional>
+        <element name="readahead">
+          <attribute name="size">
+            <ref name="positiveInteger"/>
+          </attribute>
+          <empty/>
+        </element>
+      </optional>
+      <optional>
+        <element name="timeout">
+          <attribute name="seconds">
+            <ref name="positiveInteger"/>
+          </attribute>
+          <empty/>
+        </element>
+      </optional>
+    </interleave>
   </define>
 
   <define name="diskSourceNetworkProtocolSSLVerify">
-- 
2.35.3
Re: [libvirt PATCH 2/3] schema: Be more flexible for diskSourceNetworkProtocolPropsCommon
Posted by Michal Prívozník 3 years, 7 months ago
On 6/22/22 23:26, Jonathon Jongsma wrote:
> Add <interleave> to allow the subproperties to be specified in any
> order.
> 
> Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
> ---
>  src/conf/schemas/domaincommon.rng | 34 ++++++++++++++++---------------
>  1 file changed, 18 insertions(+), 16 deletions(-)


Reviewed-by: Michal Privoznik <mprivozn@redhat.com>

This patch makes sense regardless of the RFC nature of the series. I say
go ahead and push it.

Michal