[PATCH 11/15] schema: networkport: Allow interleaving of subelements of 'driver' subelement of hostdev-pci

Peter Krempa pkrempa at redhat.com
Mon Oct 17 12:37:54 UTC 2022


Signed-off-by: Peter Krempa <pkrempa at redhat.com>
---
 src/conf/schemas/networkport.rng | 28 +++++++++++++++-------------
 1 file changed, 15 insertions(+), 13 deletions(-)

diff --git a/src/conf/schemas/networkport.rng b/src/conf/schemas/networkport.rng
index 2ca76c10df..14db949578 100644
--- a/src/conf/schemas/networkport.rng
+++ b/src/conf/schemas/networkport.rng
@@ -143,20 +143,22 @@
         <ref name="virYesNo"/>
       </attribute>
     </optional>
-    <optional>
-      <element name="driver">
-        <attribute name="name">
-          <choice>
-            <value>kvm</value>
-            <value>vfio</value>
-          </choice>
-        </attribute>
-        <empty/>
+    <interleave>
+      <optional>
+        <element name="driver">
+          <attribute name="name">
+            <choice>
+              <value>kvm</value>
+              <value>vfio</value>
+            </choice>
+          </attribute>
+          <empty/>
+        </element>
+      </optional>
+      <element name="address">
+        <ref name="pciaddress"/>
       </element>
-    </optional>
-    <element name="address">
-      <ref name="pciaddress"/>
-    </element>
+    </interleave>
   </define>

 </grammar>
-- 
2.37.3



More information about the libvir-list mailing list