[PATCH 08/10] schema: refactor mdev_types out of PCI nodedev schema

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Refactor mdev_types into standalone define for later reuse.

Signed-off-by: Boris Fiuczynski <fiuczy@xxxxxxxxxxxxx>
Reviewed-by: Bjoern Walk <bwalk@xxxxxxxxxxxxx>
---
 docs/schemas/nodedev.rng | 48 ++++++++++++++++++++++------------------
 1 file changed, 27 insertions(+), 21 deletions(-)

diff --git a/docs/schemas/nodedev.rng b/docs/schemas/nodedev.rng
index 166e278cf8..9548412999 100644
--- a/docs/schemas/nodedev.rng
+++ b/docs/schemas/nodedev.rng
@@ -215,27 +215,7 @@
     </optional>
 
     <optional>
-      <element name="capability">
-        <attribute name="type">
-          <value>mdev_types</value>
-        </attribute>
-        <oneOrMore>
-          <element name="type">
-            <attribute name="id">
-              <data type="string"/>
-            </attribute>
-            <optional>
-              <element name="name"><text/></element>
-            </optional>
-            <element name="deviceAPI">
-              <value>vfio-pci</value>
-            </element>
-            <element name="availableInstances">
-              <ref name="unsignedInt"/>
-            </element>
-          </element>
-        </oneOrMore>
-      </element>
+      <ref name="mdev_types"/>
     </optional>
 
     <optional>
@@ -696,4 +676,30 @@
     </data>
   </define>
 
+  <define name="mdev_types">
+    <element name="capability">
+      <attribute name="type">
+        <value>mdev_types</value>
+      </attribute>
+      <oneOrMore>
+        <element name="type">
+          <attribute name="id">
+            <data type="string"/>
+          </attribute>
+          <optional>
+            <element name="name"><text/></element>
+          </optional>
+          <element name="deviceAPI">
+            <choice>
+              <value>vfio-pci</value>
+            </choice>
+          </element>
+          <element name="availableInstances">
+            <ref name="unsignedInt"/>
+          </element>
+        </element>
+      </oneOrMore>
+    </element>
+  </define>
+
 </grammar>
-- 
2.25.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux