render / rpms / libvirt

Forked from rpms/libvirt 10 months ago
Clone
Blob Blame History Raw
From e37b1531942872a229b9f45524ea4679f3b1e8d6 Mon Sep 17 00:00:00 2001
Message-Id: <e37b1531942872a229b9f45524ea4679f3b1e8d6@dist-git>
From: Michal Privoznik <mprivozn@redhat.com>
Date: Mon, 9 Nov 2020 17:22:33 +0100
Subject: [PATCH] RNG: Allow interleaving of /domain/cpu/numa/cell children
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

So far, the <cell/> element can have two types of children
elements: <distances/> and <cache/> (which can be repeated more
times). However, there is no reason to require specific order in
input XML. Allow elements to be interleaved.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
(cherry picked from commit fd2ad818b29ca56904dd228f0774f553f99c1157)

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1749518

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Message-Id: <48b8e99ea6fbc6bcab0f7b3d17e7824ef1b232e2.1604938847.git.mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
---
 docs/schemas/cputypes.rng | 22 ++++++++++++----------
 1 file changed, 12 insertions(+), 10 deletions(-)

diff --git a/docs/schemas/cputypes.rng b/docs/schemas/cputypes.rng
index ba30dbf9ff..a1cae23161 100644
--- a/docs/schemas/cputypes.rng
+++ b/docs/schemas/cputypes.rng
@@ -146,16 +146,18 @@
           <ref name="virYesNo"/>
         </attribute>
       </optional>
-      <optional>
-        <element name="distances">
-          <oneOrMore>
-            <ref name="numaDistance"/>
-          </oneOrMore>
-        </element>
-      </optional>
-      <zeroOrMore>
-        <ref name="numaCache"/>
-      </zeroOrMore>
+      <interleave>
+        <optional>
+          <element name="distances">
+            <oneOrMore>
+              <ref name="numaDistance"/>
+            </oneOrMore>
+          </element>
+        </optional>
+        <zeroOrMore>
+          <ref name="numaCache"/>
+        </zeroOrMore>
+      </interleave>
     </element>
   </define>
 
-- 
2.29.2