]> xenbits.xensource.com Git - libvirt.git/commitdiff
schema: Remove optional nesting in hostcpu rng
authorJim Fehlig <jfehlig@suse.com>
Thu, 11 Aug 2022 22:13:36 +0000 (16:13 -0600)
committerJim Fehlig <jfehlig@suse.com>
Mon, 15 Aug 2022 15:32:59 +0000 (09:32 -0600)
The hostcpu rng has an optional "model" element, with the remaining
elements each within a nested optional. Remove the optional nesting
and have each element explicitly listed as optional

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/conf/schemas/cputypes.rng

index 4ae386c3c0ba4c69011ab6e407bf1f435467dd98..6fbb069661c1f12538b89d76a3c6056577652453 100644 (file)
         <element name="model">
           <text/>
         </element>
-        <optional>
-          <element name="vendor">
+      </optional>
+      <optional>
+        <element name="vendor">
+          <text/>
+        </element>
+      </optional>
+      <optional>
+        <element name="microcode">
+          <attribute name="version">
+            <ref name="positiveInteger"/>
+          </attribute>
+        </element>
+      </optional>
+      <optional>
+        <element name="signature">
+          <attribute name="family">
+            <ref name="positiveInteger"/>
+          </attribute>
+          <attribute name="model">
+            <ref name="unsignedInt"/>
+          </attribute>
+          <attribute name="stepping">
+            <ref name="unsignedInt"/>
+          </attribute>
+        </element>
+      </optional>
+      <optional>
+        <element name="counter">
+          <attribute name="name">
             <text/>
-          </element>
-        </optional>
-        <optional>
-          <element name="microcode">
-            <attribute name="version">
-              <ref name="positiveInteger"/>
-            </attribute>
-          </element>
-        </optional>
-        <optional>
-          <element name="signature">
-            <attribute name="family">
-              <ref name="positiveInteger"/>
-            </attribute>
-            <attribute name="model">
-              <ref name="unsignedInt"/>
-            </attribute>
-            <attribute name="stepping">
-              <ref name="unsignedInt"/>
-            </attribute>
-          </element>
-        </optional>
-        <optional>
-          <element name="counter">
-            <attribute name="name">
-              <text/>
-            </attribute>
-            <attribute name="frequency">
-              <ref name="positiveInteger"/>
-            </attribute>
-            <attribute name="scaling">
-              <ref name="virYesNo"/>
-            </attribute>
-          </element>
-        </optional>
-        <optional>
-          <ref name="cpuTopology"/>
-        </optional>
-        <zeroOrMore>
-          <element name="feature">
-            <attribute name="name">
-              <data type="string">
-                <param name="pattern">[a-zA-Z0-9\-_]+</param>
-              </data>
-            </attribute>
-            <empty/>
-          </element>
-        </zeroOrMore>
-        <zeroOrMore>
-          <element name="pages">
-            <optional>
-              <attribute name="unit">
-                <ref name="unit"/>
-              </attribute>
-            </optional>
-            <attribute name="size">
-              <ref name="unsignedInt"/>
-            </attribute>
-          </element>
-        </zeroOrMore>
+          </attribute>
+          <attribute name="frequency">
+            <ref name="positiveInteger"/>
+          </attribute>
+          <attribute name="scaling">
+            <ref name="virYesNo"/>
+          </attribute>
+        </element>
       </optional>
+      <optional>
+        <ref name="cpuTopology"/>
+      </optional>
+      <zeroOrMore>
+        <element name="feature">
+          <attribute name="name">
+            <data type="string">
+              <param name="pattern">[a-zA-Z0-9\-_]+</param>
+            </data>
+          </attribute>
+          <empty/>
+        </element>
+      </zeroOrMore>
+      <zeroOrMore>
+        <element name="pages">
+          <optional>
+            <attribute name="unit">
+              <ref name="unit"/>
+            </attribute>
+          </optional>
+          <attribute name="size">
+            <ref name="unsignedInt"/>
+          </attribute>
+        </element>
+      </zeroOrMore>
     </element>
   </define>