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(a)redhat.com>
---
src/conf/schemas/domaincommon.rng | 7 +++++++
src/conf/schemas/domainsnapshot.rng | 5 +++++
src/conf/schemas/inactiveDomain.rng | 10 ++++++++++
3 files changed, 22 insertions(+)
create mode 100644 src/conf/schemas/inactiveDomain.rng
diff --git a/src/conf/schemas/domaincommon.rng b/src/conf/schemas/domaincommon.rng
index cc6a3475c8..ae04e0ea7d 100644
--- a/src/conf/schemas/domaincommon.rng
+++ b/src/conf/schemas/domaincommon.rng
@@ -37,6 +37,13 @@
</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>
diff --git a/src/conf/schemas/domainsnapshot.rng b/src/conf/schemas/domainsnapshot.rng
index a5d1a40493..3db9f458ba 100644
--- a/src/conf/schemas/domainsnapshot.rng
+++ b/src/conf/schemas/domainsnapshot.rng
@@ -83,6 +83,11 @@
</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
index 0000000000..ae1207d978
--- /dev/null
+++ b/src/conf/schemas/inactiveDomain.rng
@@ -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>
--
2.37.1