On Thu, Nov 14, 2019 at 01:08:21AM +0800, Wang Huaqiang wrote: > From: Huaqiang <huaqiang.wang@xxxxxxxxx> > > 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@xxxxxxxxx> > --- > 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@xxxxxxxxxx> 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 :| -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list