mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
testutilsqemuschema: Support 'unstable' feature in QMP schema validator
The 'unstable' feature is present on any schema member which was not yet finalized in qemu. Use it to refuse such fields/commands in qemu as they are possibly subject to change. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
7203b7df6b
commit
fc4d0e7461
@ -32,6 +32,7 @@ struct testQEMUSchemaValidateCtxt {
|
||||
/**
|
||||
* Validate that the schema member doesn't have some significant features:
|
||||
* - 'deprecated' - schema member is deprecated
|
||||
* - 'unstable' - schema member is considered unstable
|
||||
*/
|
||||
static int
|
||||
testQEMUSchemaValidateFeatures(virJSONValue *root,
|
||||
@ -57,6 +58,11 @@ testQEMUSchemaValidateFeatures(virJSONValue *root,
|
||||
return -2;
|
||||
}
|
||||
|
||||
if (STREQ(curstr, "unstable")) {
|
||||
virBufferAsprintf(ctxt->debug, "ERROR: '%s' is unstable", name);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (STREQ(curstr, "deprecated")) {
|
||||
if (ctxt->allowDeprecated) {
|
||||
virBufferAsprintf(ctxt->debug, "WARNING: '%s' is deprecated", name);
|
||||
|
Loading…
Reference in New Issue
Block a user