]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
schema: Add schema for '<inactiveDomain>' element used in the snapshot definition
authorPeter Krempa <pkrempa@redhat.com>
Thu, 25 Aug 2022 09:29:30 +0000 (11:29 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 1 Sep 2022 11:11:09 +0000 (13:11 +0200)
The '<inactiveDomain>' element stores the next-start definition of a VM
on snapshot. It was not covered by the schema when it was introduced.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2121276
Fixes: 152c165d34cb6dcd21d08427422850f406cd0643
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/conf/schemas/domaincommon.rng
src/conf/schemas/domainsnapshot.rng
src/conf/schemas/inactiveDomain.rng [new file with mode: 0644]
src/conf/schemas/meson.build

index ce4509f245eda2cc161b8936f6e153f14290353a..5ff15e87877e3718adcf98380f4bec627f600b1e 100644 (file)
     </element>
   </define>
 
+  <!-- this element is used as a child of a snapshot definition -->
+  <define name="inactiveDomain">
+    <element name="inactiveDomain">
+      <ref name="domaincontents"/>
+    </element>
+  </define>
+
   <define name="domaincontents">
     <ref name="hvs"/>
     <interleave>
index a5d1a40493b57bbce1bdf8536d6750056f252d6c..3db9f458ba7279f2b9f0333b933e9506c64c9434 100644 (file)
             </grammar>
           </choice>
         </optional>
+        <optional>
+          <grammar>
+            <include href="inactiveDomain.rng"/>
+          </grammar>
+        </optional>
         <optional>
           <element name="parent">
             <element name="name">
diff --git a/src/conf/schemas/inactiveDomain.rng b/src/conf/schemas/inactiveDomain.rng
new file mode 100644 (file)
index 0000000..ae1207d
--- /dev/null
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
+  <!-- inactiveDomain element grammar is included into domainsnapshot.rng -->
+  <start>
+    <ref name="inactiveDomain"/>
+  </start>
+
+  <include href="domainoverrides.rng"/>
+
+</grammar>
index 1bb09b4c5def5f9c7a46b9767543e0bcbe868435..9ec4c010d6246ccfc24b706a53263fdb67e79907 100644 (file)
@@ -10,6 +10,7 @@ schema_files = [
   'domain.rng',
   'domainoverrides.rng',
   'domainsnapshot.rng',
+  'inactiveDomain.rng',
   'interface.rng',
   'networkcommon.rng',
   'networkport.rng',