[libvirt] [PATCH 3/5] cachetune schema: a looser check for the order of <cache> and <monitor> element
Daniel P. Berrangé
berrange at redhat.com
Fri Dec 13 15:08:23 UTC 2019
On Thu, Nov 14, 2019 at 01:08:21AM +0800, Wang Huaqiang wrote:
> From: Huaqiang <huaqiang.wang at intel.com>
>
> Originally, inside <cputune/cachetune>, it requires the <cache> element to
> be in the position before <monitor>, and following configuration is not
> permitted by schema, but it is better to let it be valid.
>
> <cputune>
> <cachetune vcpus='0-1'>
> <monitor level='3' vcpus='0-1'/>
> ^
> |__ Not permitted originally because it is in the place
> before <cache> element.
>
> <cache id='0' level='3' type='both' size='3' unit='MiB'/>
> <cache id='1' level='3' type='both' size='3' unit='MiB'/>
> </cachetune>
> ...
> </cputune>
>
> And, let schema do more strict check by identifying following configuration to
> be invalid, due to <cachetune> should contain at least one <cache> or <monitor>
> element.
>
> <cputune>
> <cachetune vcpus='0-1'>
> ^
> |__ a <cachetune> SHOULD contain at least one <cache> or <monitor>
>
> </cachetune>
> ...
> </cputune>
>
> Signed-off-by: Huaqiang <huaqiang.wang at intel.com>
> ---
> docs/schemas/domaincommon.rng | 68 +++++++++++------------
> tests/genericxml2xmlindata/cachetune.xml | 1 +
> tests/genericxml2xmloutdata/cachetune.xml | 34 ++++++++++++
> tests/genericxml2xmltest.c | 2 +-
> 4 files changed, 70 insertions(+), 35 deletions(-)
> create mode 100644 tests/genericxml2xmloutdata/cachetune.xml
Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
More information about the libvir-list
mailing list