[libvirt PATCH v3 4/8] schema: Add schema for guest or host cpu definition

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



`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@xxxxxxxxxx>
---
 docs/schemas/cpu.rng     | 12 ++++++++++++
 docs/schemas/meson.build |  1 +
 2 files changed, 13 insertions(+)
 create mode 100644 docs/schemas/cpu.rng

diff --git a/docs/schemas/cpu.rng b/docs/schemas/cpu.rng
new file mode 100644
index 0000000000..d1eb67430d
--- /dev/null
+++ b/docs/schemas/cpu.rng
@@ -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>
diff --git a/docs/schemas/meson.build b/docs/schemas/meson.build
index 7fc7ff0503..bb6a48787f 100644
--- a/docs/schemas/meson.build
+++ b/docs/schemas/meson.build
@@ -1,6 +1,7 @@
 docs_schema_files = [
   'basictypes.rng',
   'capability.rng',
+  'cpu.rng',
   'cputypes.rng',
   'domainbackup.rng',
   'domaincaps.rng',
-- 
2.26.2




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux