File b5f63691-schema-Remove-optional-nesting-in-hostcpu-rng.patch of Package libvirt.29155
From 3f6b4dab4ab8e7594fd7e5bbefd35381a683bbb8 Mon Sep 17 00:00:00 2001
From: Jim Fehlig <jfehlig@suse.com>
Date: Thu, 11 Aug 2022 16:13:36 -0600
Subject: [PATCH 5/9] schema: Remove optional nesting in hostcpu rng
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>
(cherry picked from commit b5f63691a6c3e7d6b8c1e1de83ea1804f3b1a438)
Conflicts:
docs/schemas/cputypes.rng
---
docs/schemas/cputypes.rng | 98 +++++++++++++++++++--------------------
1 file changed, 49 insertions(+), 49 deletions(-)
Index: libvirt-8.0.0/docs/schemas/cputypes.rng
===================================================================
--- libvirt-8.0.0.orig/docs/schemas/cputypes.rng
+++ libvirt-8.0.0/docs/schemas/cputypes.rng
@@ -346,57 +346,57 @@
<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="counter">
+ <attribute name="name">
<text/>
- </element>
- </optional>
- <optional>
- <element name="microcode">
- <attribute name="version">
- <ref name="positiveInteger"/>
- </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>