]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
schema: domain: Allow interleaving 'ip' and 'route' sub-elements of interface
authorPeter Krempa <pkrempa@redhat.com>
Thu, 13 Oct 2022 14:38:52 +0000 (16:38 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 1 Nov 2022 12:07:20 +0000 (13:07 +0100)
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/conf/schemas/domaincommon.rng

index a1b004921b2275b37588d9d943fa9e33b138d7f0..b6371940e499722cb19820ea1889fd9b6baad86b 100644 (file)
       All ip-related info for either the host or guest side of an interface
   -->
   <define name="interface-ip-info">
-    <zeroOrMore>
-      <element name="ip">
-        <attribute name="address">
-          <ref name="ipAddr"/>
-        </attribute>
-        <optional>
-          <attribute name="family">
-            <ref name="addr-family"/>
-          </attribute>
-        </optional>
-        <optional>
-          <attribute name="prefix">
-            <ref name="ipPrefix"/>
-          </attribute>
-        </optional>
-        <optional>
-          <attribute name="peer">
+    <interleave>
+      <zeroOrMore>
+        <element name="ip">
+          <attribute name="address">
             <ref name="ipAddr"/>
           </attribute>
-        </optional>
-        <empty/>
-      </element>
-    </zeroOrMore>
-    <zeroOrMore>
-      <ref name="route"/>
-    </zeroOrMore>
+          <optional>
+            <attribute name="family">
+              <ref name="addr-family"/>
+            </attribute>
+          </optional>
+          <optional>
+            <attribute name="prefix">
+              <ref name="ipPrefix"/>
+            </attribute>
+          </optional>
+          <optional>
+            <attribute name="peer">
+              <ref name="ipAddr"/>
+            </attribute>
+          </optional>
+          <empty/>
+        </element>
+      </zeroOrMore>
+      <zeroOrMore>
+        <ref name="route"/>
+      </zeroOrMore>
+    </interleave>
   </define>
 
   <define name="teaming">