[PATCH 7/8] schema: Fix capability grammar for pagesElem

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

 



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

Commit id '02129b7c0' added a single pagesElem for slightly
different purposes. One usage was an output for host page size
listing and the other for NUMA supported page sizes. For the
former, only the pages unit and size are formatted, while for
the latter the pages unit, size, and availability data is formatted.

The virt-xml-validate would fail because it expected something
extra in the host page size output. So split up pagesElem a bit
and create pagesHost and pagesNuma for the differences.

Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>
---
 docs/schemas/capability.rng | 30 +++++++++++++++++++-----------
 1 file changed, 19 insertions(+), 11 deletions(-)

diff --git a/docs/schemas/capability.rng b/docs/schemas/capability.rng
index e1b7858540..66c5de62e5 100644
--- a/docs/schemas/capability.rng
+++ b/docs/schemas/capability.rng
@@ -129,7 +129,7 @@
       </element>
     </zeroOrMore>
     <zeroOrMore>
-      <ref name='pagesElem'/>
+      <ref name='pagesHost'/>
     </zeroOrMore>
   </define>
 
@@ -203,7 +203,7 @@
       </optional>
 
       <zeroOrMore>
-        <ref name='pagesElem'/>
+        <ref name='pagesNuma'/>
       </zeroOrMore>
 
       <optional>
@@ -484,17 +484,25 @@
     </data>
   </define>
 
-  <define name='pagesElem'>
+  <define name='pagesHost'>
     <element name='pages'>
-      <optional>
-        <attribute name='unit'>
-          <ref name='unit'/>
-        </attribute>
-      </optional>
-      <attribute name='size'>
-        <ref name='unsignedInt'/>
-      </attribute>
+      <ref name='pagesElem'/>
+    </element>
+  </define>
+  <define name='pagesNuma'>
+    <element name='pages'>
+      <ref name='pagesElem'/>
       <ref name='unsignedInt'/>
     </element>
   </define>
+  <define name='pagesElem'>
+    <optional>
+      <attribute name='unit'>
+        <ref name='unit'/>
+      </attribute>
+    </optional>
+    <attribute name='size'>
+      <ref name='unsignedInt'/>
+    </attribute>
+  </define>
 </grammar>
-- 
2.14.3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[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