testQEMUSchemaValidateObjectMember: validate QMP object member deprecation

The QMP schema validator wasn't adapted to consider features of 'object'
members and thus we didn't catch the deprecation of 'device' in
'block_set_io_throttle'.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2023-05-22 12:49:17 +02:00
parent 9d6867198d
commit 79b04c9606

View File

@ -187,6 +187,10 @@ testQEMUSchemaValidateObjectMember(const char *key,
return -1;
}
/* validate that the member is not deprecated */
if ((rc = testQEMUSchemaValidateDeprecated(keymember, key, data->ctxt)) < 0)
return rc;
/* lookup schema entry for keytype */
if (!(keytype = virJSONValueObjectGetString(keymember, "type")) ||
!(keyschema = virHashLookup(data->ctxt->schema, keytype))) {