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 <[email protected]>
---
 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

Reply via email to