schema: Add schema for guest or host cpu definition

`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>
This commit is contained in:
Tim Wiederhake 2020-09-30 13:55:01 +02:00 committed by Peter Krempa
parent dfa5231934
commit 5d325240c6
2 changed files with 13 additions and 0 deletions

12
docs/schemas/cpu.rng Normal file
View File

@ -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>

View File

@ -1,6 +1,7 @@
docs_schema_files = [
'basictypes.rng',
'capability.rng',
'cpu.rng',
'cputypes.rng',
'domainbackup.rng',
'domaincaps.rng',