[PATCH v4 06/36] schema: Introduce osnvram define

Andrea Bolognani via Devel posted 36 patches 1 week ago
[PATCH v4 06/36] schema: Introduce osnvram define
Posted by Andrea Bolognani via Devel 1 week ago
This moves the definition of the <nvram> element out of the
fairly complex oshvm define and will make it easier to later
add the <varstore> element without making things unmanageable.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
---
 src/conf/schemas/domaincommon.rng | 54 +++++++++++++++++--------------
 1 file changed, 29 insertions(+), 25 deletions(-)

diff --git a/src/conf/schemas/domaincommon.rng b/src/conf/schemas/domaincommon.rng
index dafbdc63e7..e09f6e80f3 100644
--- a/src/conf/schemas/domaincommon.rng
+++ b/src/conf/schemas/domaincommon.rng
@@ -349,31 +349,7 @@
             </element>
           </optional>
           <optional>
-            <element name="nvram">
-              <optional>
-                <attribute name="template">
-                  <ref name="absFilePath"/>
-                </attribute>
-              </optional>
-              <optional>
-                <attribute name="templateFormat">
-                  <ref name="pflashFormatTypes"/>
-                </attribute>
-              </optional>
-              <optional>
-                <ref name="pflashFormat"/>
-              </optional>
-              <optional>
-                <choice>
-                  <group>
-                    <ref name="absFilePath"/>
-                  </group>
-                  <group>
-                    <ref name="diskSource"/>
-                  </group>
-                </choice>
-              </optional>
-            </element>
+            <ref name="osnvram"/>
           </optional>
           <optional>
             <ref name="osbootkernel"/>
@@ -452,6 +428,34 @@
     </element>
   </define>
 
+  <define name="osnvram">
+    <element name="nvram">
+      <optional>
+        <attribute name="template">
+          <ref name="absFilePath"/>
+        </attribute>
+      </optional>
+      <optional>
+        <attribute name="templateFormat">
+          <ref name="pflashFormatTypes"/>
+        </attribute>
+      </optional>
+      <optional>
+        <ref name="pflashFormat"/>
+      </optional>
+      <optional>
+        <choice>
+          <group>
+            <ref name="absFilePath"/>
+          </group>
+          <group>
+            <ref name="diskSource"/>
+          </group>
+        </choice>
+      </optional>
+    </element>
+  </define>
+
   <define name="osexe">
     <element name="os">
       <interleave>
-- 
2.53.0
Re: [PATCH v4 06/36] schema: Introduce osnvram define
Posted by Daniel P. Berrangé via Devel 1 week ago
On Mon, Feb 23, 2026 at 07:30:49PM +0100, Andrea Bolognani via Devel wrote:
> This moves the definition of the <nvram> element out of the
> fairly complex oshvm define and will make it easier to later
> add the <varstore> element without making things unmanageable.
> 
> Signed-off-by: Andrea Bolognani <abologna@redhat.com>
> ---
>  src/conf/schemas/domaincommon.rng | 54 +++++++++++++++++--------------
>  1 file changed, 29 insertions(+), 25 deletions(-)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


With regards,
Daniel
-- 
|: https://berrange.com       ~~        https://hachyderm.io/@berrange :|
|: https://libvirt.org          ~~          https://entangle-photo.org :|
|: https://pixelfed.art/berrange   ~~    https://fstop138.berrange.com :|