]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
schema: Add schema for guest or host cpu definition
authorTim Wiederhake <twiederh@redhat.com>
Wed, 30 Sep 2020 11:55:01 +0000 (13:55 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 7 Oct 2020 07:18:07 +0000 (09:18 +0200)
`virsh cpu-compare` and `virsh hypervisor-cpu-compare` both accept
guest and host cpu definitions. This schema is able to validate both
possibilities.

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
docs/schemas/cpu.rng [new file with mode: 0644]
docs/schemas/meson.build

diff --git a/docs/schemas/cpu.rng b/docs/schemas/cpu.rng
new file mode 100644 (file)
index 0000000..d1eb674
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
+  <include href="basictypes.rng"/>
+  <include href="cputypes.rng"/>
+
+  <start>
+    <choice>
+      <ref name="guestcpu"/>
+      <ref name="hostcpu"/>
+    </choice>
+  </start>
+</grammar>
index 7fc7ff0503883d74cd99c4444d36358272f9b416..bb6a48787fd9e2705aaa27f2d7268e3341cccfbb 100644 (file)
@@ -1,6 +1,7 @@
 docs_schema_files = [
   'basictypes.rng',
   'capability.rng',
+  'cpu.rng',
   'cputypes.rng',
   'domainbackup.rng',
   'domaincaps.rng',