]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
schemas: Extract overrides for the domain element from 'domain.rng'
authorPeter Krempa <pkrempa@redhat.com>
Thu, 25 Aug 2022 09:20:50 +0000 (11:20 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 1 Sep 2022 11:11:09 +0000 (13:11 +0200)
Move the overrides into a single file so that later patches can add
another top level element 'inactiveDomain' used in snapshots.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/conf/schemas/domain.rng
src/conf/schemas/domainoverrides.rng [new file with mode: 0644]
src/conf/schemas/meson.build

index b93bbed9593b776e4fe015d647ff1c2998e698c4..adc4386a2783bf49020ed1b4f09e9b1461de3d8b 100644 (file)
@@ -6,16 +6,6 @@
     <ref name="domain"/>
   </start>
 
-  <include href="domaincommon.rng"/>
-
-  <define name="storageStartupPolicy" combine="choice">
-    <!-- overrides the no-op version in storagecommon.rng -->
-    <ref name="startupPolicy"/>
-  </define>
-
-  <define name="storageSourceExtra" combine="choice">
-    <!-- overrides the no-op version in storagecommon.rng -->
-    <ref name="diskspec"/>
-  </define>
+  <include href="domainoverrides.rng"/>
 
 </grammar>
diff --git a/src/conf/schemas/domainoverrides.rng b/src/conf/schemas/domainoverrides.rng
new file mode 100644 (file)
index 0000000..13b18a2
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
+  <!-- Overrides for the no-op versions of storage elements for use with domain XMLs. -->
+  <include href="domaincommon.rng"/>
+
+  <define name="storageStartupPolicy" combine="choice">
+    <!-- overrides the no-op version in storagecommon.rng -->
+    <ref name="startupPolicy"/>
+  </define>
+
+  <define name="storageSourceExtra" combine="choice">
+    <!-- overrides the no-op version in storagecommon.rng -->
+    <ref name="diskspec"/>
+  </define>
+
+</grammar>
index 700161bf75bfa918bb922cb77fff2003fb29a1fb..1bb09b4c5def5f9c7a46b9767543e0bcbe868435 100644 (file)
@@ -8,6 +8,7 @@ schema_files = [
   'domaincheckpoint.rng',
   'domaincommon.rng',
   'domain.rng',
+  'domainoverrides.rng',
   'domainsnapshot.rng',
   'interface.rng',
   'networkcommon.rng',