mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 11:35:19 +00:00
testQEMUSchemaValidateEnum: Validate deprecated members
Starting from QEMU-6.2 enum members can be deprecated. Add support to the validator. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
43e2c6544e
commit
cc54647fb0
@ -381,6 +381,12 @@ testQEMUSchemaValidateEnum(virJSONValue *obj,
|
|||||||
virJSONValue *member = virJSONValueArrayGet(members, i);
|
virJSONValue *member = virJSONValueArrayGet(members, i);
|
||||||
|
|
||||||
if (STREQ_NULLABLE(objstr, virJSONValueObjectGetString(member, "name"))) {
|
if (STREQ_NULLABLE(objstr, virJSONValueObjectGetString(member, "name"))) {
|
||||||
|
int rc;
|
||||||
|
|
||||||
|
/* the new 'members' array allows us to check deprecations */
|
||||||
|
if ((rc = testQEMUSchemaValidateDeprecated(member, objstr, ctxt)) < 0)
|
||||||
|
return rc;
|
||||||
|
|
||||||
virBufferAsprintf(ctxt->debug, "'%s' OK", NULLSTR(objstr));
|
virBufferAsprintf(ctxt->debug, "'%s' OK", NULLSTR(objstr));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user