From nobody Fri May 3 15:32:30 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1521743568803803.3396025292557; Thu, 22 Mar 2018 11:32:48 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 42D1551EF6; Thu, 22 Mar 2018 18:32:47 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0CF7B82F71; Thu, 22 Mar 2018 18:32:47 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 96AF3181BA01; Thu, 22 Mar 2018 18:32:46 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w2MIVrti015591 for ; Thu, 22 Mar 2018 14:31:53 -0400 Received: by smtp.corp.redhat.com (Postfix) id BBBA88442D; Thu, 22 Mar 2018 18:31:53 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id 45CA36F9E2; Thu, 22 Mar 2018 18:31:53 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Thu, 22 Mar 2018 19:31:38 +0100 Message-Id: <81cd6cce9bd871a23ef1b3b7fe7fb44bcfac3509.1521743167.git.pkrempa@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH 01/11] util: buffer: Tolerate NULL 'buf' in virBufferStrcat X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Thu, 22 Mar 2018 18:32:47 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Most other buffer APIs tolerate the buffer being NULL. Signed-off-by: Peter Krempa --- src/util/virbuffer.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/util/virbuffer.c b/src/util/virbuffer.c index 1a6bf122e0..3d6defb73a 100644 --- a/src/util/virbuffer.c +++ b/src/util/virbuffer.c @@ -883,6 +883,9 @@ virBufferStrcat(virBufferPtr buf, ...) { va_list ap; + if (!buf) + return; + va_start(ap, buf); virBufferStrcatVArgs(buf, ap); va_end(ap); --=20 2.16.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri May 3 15:32:30 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1521743602123158.40224637500512; Thu, 22 Mar 2018 11:33:22 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C2B3FA456F; Thu, 22 Mar 2018 18:33:20 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A125F80F6F; Thu, 22 Mar 2018 18:33:20 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 623FE181BA05; Thu, 22 Mar 2018 18:33:20 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w2MIVsBM015602 for ; Thu, 22 Mar 2018 14:31:54 -0400 Received: by smtp.corp.redhat.com (Postfix) id 94FB38442E; Thu, 22 Mar 2018 18:31:54 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id 00A6F6F9E2; Thu, 22 Mar 2018 18:31:53 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Thu, 22 Mar 2018 19:31:39 +0100 Message-Id: <4174fdb75cc9259a8bcb6f22b90fe0b7a1730d4b.1521743167.git.pkrempa@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH 02/11] qemu: caps: Move QAPI schema related code into separate file X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Thu, 22 Mar 2018 18:33:21 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Extract the code into qemu_qapi.c/h so that we separate it from various parts of the code. Signed-off-by: Peter Krempa --- po/POTFILES.in | 1 + src/qemu/Makefile.inc.am | 2 + src/qemu/qemu_capabilities.c | 158 +----------------------------------- src/qemu/qemu_qapi.c | 187 +++++++++++++++++++++++++++++++++++++++= ++++ src/qemu/qemu_qapi.h | 36 +++++++++ 5 files changed, 227 insertions(+), 157 deletions(-) create mode 100644 src/qemu/qemu_qapi.c create mode 100644 src/qemu/qemu_qapi.h diff --git a/po/POTFILES.in b/po/POTFILES.in index 71c61dec95..d84859a4e3 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -141,6 +141,7 @@ src/qemu/qemu_monitor_json.c src/qemu/qemu_monitor_text.c src/qemu/qemu_parse_command.c src/qemu/qemu_process.c +src/qemu/qemu_qapi.c src/remote/remote_client_bodies.h src/remote/remote_daemon.c src/remote/remote_daemon_config.c diff --git a/src/qemu/Makefile.inc.am b/src/qemu/Makefile.inc.am index 2ad062cdb5..8ef290a6c1 100644 --- a/src/qemu/Makefile.inc.am +++ b/src/qemu/Makefile.inc.am @@ -46,6 +46,8 @@ QEMU_DRIVER_SOURCES =3D \ qemu/qemu_capspriv.h \ qemu/qemu_security.c \ qemu/qemu_security.h \ + qemu/qemu_qapi.c \ + qemu/qemu_qapi.h \ $(NULL) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 3eb5ed6d1a..7801c9b33c 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -46,6 +46,7 @@ #include "qemu_domain.h" #define __QEMU_CAPSPRIV_H_ALLOW__ #include "qemu_capspriv.h" +#include "qemu_qapi.h" #include #include @@ -4564,163 +4565,6 @@ virQEMUCapsInitQMPBasicArch(virQEMUCapsPtr qemuCaps) } -/** - * virQEMUCapsQMPSchemaObjectGetType: - * @field: name of the object containing the requested type - * @name: name of the requested type - * @namefield: name of the object property holding @name - * - * Helper that selects the type of a QMP schema object member or it's vari= ant - * member. Returns the type string on success or NULL on error. - */ -static const char * -virQEMUCapsQMPSchemaObjectGetType(const char *field, - const char *name, - const char *namefield, - virJSONValuePtr elem) -{ - virJSONValuePtr arr; - virJSONValuePtr cur; - const char *curname; - const char *type; - size_t i; - - if (!(arr =3D virJSONValueObjectGetArray(elem, field))) - return NULL; - - for (i =3D 0; i < virJSONValueArraySize(arr); i++) { - if (!(cur =3D virJSONValueArrayGet(arr, i)) || - !(curname =3D virJSONValueObjectGetString(cur, namefield)) || - !(type =3D virJSONValueObjectGetString(cur, "type"))) - continue; - - if (STREQ(name, curname)) - return type; - } - - return NULL; -} - - -static virJSONValuePtr -virQEMUCapsQMPSchemaTraverse(const char *baseName, - char **query, - virHashTablePtr schema) -{ - virJSONValuePtr base; - const char *metatype; - - do { - if (!(base =3D virHashLookup(schema, baseName))) - return NULL; - - if (!*query) - return base; - - if (!(metatype =3D virJSONValueObjectGetString(base, "meta-type"))) - return NULL; - - /* flatten arrays by default */ - if (STREQ(metatype, "array")) { - if (!(baseName =3D virJSONValueObjectGetString(base, "element-= type"))) - return NULL; - - continue; - } else if (STREQ(metatype, "object")) { - if (**query =3D=3D '+') - baseName =3D virQEMUCapsQMPSchemaObjectGetType("variants", - *query + 1, - "case", base); - else - baseName =3D virQEMUCapsQMPSchemaObjectGetType("members", - *query, - "name", base); - - if (!baseName) - return NULL; - } else if (STREQ(metatype, "command") || - STREQ(metatype, "event")) { - if (!(baseName =3D virJSONValueObjectGetString(base, *query))) - return NULL; - } else { - /* alternates, basic types and enums can't be entered */ - return NULL; - } - - query++; - } while (*query); - - return base; -} - - -/** - * virQEMUCapsQMPSchemaGetByPath: - * @query: string specifying the required data type (see below) - * @schema: hash table containing the schema data - * @entry: filled with the located schema object requested by @query - * - * Retrieves the requested schema entry specified by @query to @entry. The - * @query parameter has the following syntax which is very closely tied to= the - * qemu schema syntax entries separated by slashes with a few special char= acters: - * - * "command_or_event/attribute/subattribute/+variant_discriminator/subattr= ibute" - * - * command_or_event: name of the event or attribute to introspect - * attribute: selects whether arguments or return type should be introspec= ted - * ("arg-type" or "ret-type" for commands, "arg-type" for event= s) - * subattribute: specifies member name of object types - * +variant_discriminator: In the case of unionized objects, select a - * specific case to introspect. - * - * Array types are automatically flattened to the singular type. Alternate - * types are currently not supported. - * - * The above types can be chained arbitrarily using slashes to construct a= ny - * path into the schema tree. - * - * Returns 0 on success (including if the requested schema was not found) = and - * fills @entry appropriately. On failure returns -1 and sets an appropria= te - * error message. - */ -static int -virQEMUCapsQMPSchemaGetByPath(const char *query, - virHashTablePtr schema, - virJSONValuePtr *entry) -{ - char **elems =3D NULL; - - *entry =3D NULL; - - if (!(elems =3D virStringSplit(query, "/", 0))) - return -1; - - if (!*elems) { - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("malformed query st= ring")); - virStringListFree(elems); - return -1; - } - - *entry =3D virQEMUCapsQMPSchemaTraverse(*elems, elems + 1, schema); - - virStringListFree(elems); - return 0; -} - - -static bool -virQEMUCapsQMPSchemaQueryPath(const char *query, - virHashTablePtr schema) -{ - virJSONValuePtr entry; - - if (virQEMUCapsQMPSchemaGetByPath(query, schema, &entry)) - return false; - - return !!entry; -} - - static int virQEMUCapsProbeQMPSchemaCapabilities(virQEMUCapsPtr qemuCaps, qemuMonitorPtr mon) diff --git a/src/qemu/qemu_qapi.c b/src/qemu/qemu_qapi.c new file mode 100644 index 0000000000..2646afeee2 --- /dev/null +++ b/src/qemu/qemu_qapi.c @@ -0,0 +1,187 @@ +/* + * qemu_qapi.c: helper functions for QEMU QAPI schema handling + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see + * . + */ + +#include + +#include "qemu_qapi.h" + +#include "viralloc.h" +#include "virstring.h" +#include "virerror.h" +#include "virlog.h" + +#define VIR_FROM_THIS VIR_FROM_QEMU + +VIR_LOG_INIT("qemu.qemu_qapi"); + + +/** + * virQEMUCapsQMPSchemaObjectGetType: + * @field: name of the object containing the requested type + * @name: name of the requested type + * @namefield: name of the object property holding @name + * + * Helper that selects the type of a QMP schema object member or it's vari= ant + * member. Returns the type string on success or NULL on error. + */ +static const char * +virQEMUCapsQMPSchemaObjectGetType(const char *field, + const char *name, + const char *namefield, + virJSONValuePtr elem) +{ + virJSONValuePtr arr; + virJSONValuePtr cur; + const char *curname; + const char *type; + size_t i; + + if (!(arr =3D virJSONValueObjectGetArray(elem, field))) + return NULL; + + for (i =3D 0; i < virJSONValueArraySize(arr); i++) { + if (!(cur =3D virJSONValueArrayGet(arr, i)) || + !(curname =3D virJSONValueObjectGetString(cur, namefield)) || + !(type =3D virJSONValueObjectGetString(cur, "type"))) + continue; + + if (STREQ(name, curname)) + return type; + } + + return NULL; +} + + +static virJSONValuePtr +virQEMUCapsQMPSchemaTraverse(const char *baseName, + char **query, + virHashTablePtr schema) +{ + virJSONValuePtr base; + const char *metatype; + + do { + if (!(base =3D virHashLookup(schema, baseName))) + return NULL; + + if (!*query) + return base; + + if (!(metatype =3D virJSONValueObjectGetString(base, "meta-type"))) + return NULL; + + /* flatten arrays by default */ + if (STREQ(metatype, "array")) { + if (!(baseName =3D virJSONValueObjectGetString(base, "element-= type"))) + return NULL; + + continue; + } else if (STREQ(metatype, "object")) { + if (**query =3D=3D '+') + baseName =3D virQEMUCapsQMPSchemaObjectGetType("variants", + *query + 1, + "case", base); + else + baseName =3D virQEMUCapsQMPSchemaObjectGetType("members", + *query, + "name", base); + + if (!baseName) + return NULL; + } else if (STREQ(metatype, "command") || + STREQ(metatype, "event")) { + if (!(baseName =3D virJSONValueObjectGetString(base, *query))) + return NULL; + } else { + /* alternates, basic types and enums can't be entered */ + return NULL; + } + + query++; + } while (*query); + + return base; +} + + +/** + * virQEMUCapsQMPSchemaGetByPath: + * @query: string specifying the required data type (see below) + * @schema: hash table containing the schema data + * @entry: filled with the located schema object requested by @query + * + * Retrieves the requested schema entry specified by @query to @entry. The + * @query parameter has the following syntax which is very closely tied to= the + * qemu schema syntax entries separated by slashes with a few special char= acters: + * + * "command_or_event/attribute/subattribute/+variant_discriminator/subattr= ibute" + * + * command_or_event: name of the event or attribute to introspect + * attribute: selects whether arguments or return type should be introspec= ted + * ("arg-type" or "ret-type" for commands, "arg-type" for event= s) + * subattribute: specifies member name of object types + * +variant_discriminator: In the case of unionized objects, select a + * specific case to introspect. + * + * Array types are automatically flattened to the singular type. Alternate + * types are currently not supported. + * + * The above types can be chained arbitrarily using slashes to construct a= ny + * path into the schema tree. + * + * Returns 0 on success (including if the requested schema was not found) = and + * fills @entry appropriately. On failure returns -1 and sets an appropria= te + * error message. + */ +int +virQEMUCapsQMPSchemaGetByPath(const char *query, + virHashTablePtr schema, + virJSONValuePtr *entry) +{ + char **elems =3D NULL; + + *entry =3D NULL; + + if (!(elems =3D virStringSplit(query, "/", 0))) + return -1; + + if (!*elems) { + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("malformed query st= ring")); + virStringListFree(elems); + return -1; + } + + *entry =3D virQEMUCapsQMPSchemaTraverse(*elems, elems + 1, schema); + + virStringListFree(elems); + return 0; +} + + +bool +virQEMUCapsQMPSchemaQueryPath(const char *query, + virHashTablePtr schema) +{ + virJSONValuePtr entry; + + if (virQEMUCapsQMPSchemaGetByPath(query, schema, &entry)) + return false; + + return !!entry; +} diff --git a/src/qemu/qemu_qapi.h b/src/qemu/qemu_qapi.h new file mode 100644 index 0000000000..413d0629b5 --- /dev/null +++ b/src/qemu/qemu_qapi.h @@ -0,0 +1,36 @@ +/* + * qemu_qapi.h: helper functions for QEMU QAPI schema + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see + * . + */ + +#ifndef __QEMU_QAPI_H__ +# define __QEMU_QAPI_H__ + +# include "internal.h" + +# include "virhash.h" +# include "virjson.h" + +int +virQEMUCapsQMPSchemaGetByPath(const char *query, + virHashTablePtr schema, + virJSONValuePtr *entry); + +bool +virQEMUCapsQMPSchemaQueryPath(const char *query, + virHashTablePtr schema); + +#endif /* __QEMU_QAPI_H__ */ --=20 2.16.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri May 3 15:32:30 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1521743606280875.5426683935185; Thu, 22 Mar 2018 11:33:26 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0545612E37B; Thu, 22 Mar 2018 18:33:25 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C2A9A7ADBF; Thu, 22 Mar 2018 18:33:24 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 855544CA9F; Thu, 22 Mar 2018 18:33:24 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w2MIVtiI015609 for ; Thu, 22 Mar 2018 14:31:55 -0400 Received: by smtp.corp.redhat.com (Postfix) id 50BF18442D; Thu, 22 Mar 2018 18:31:55 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id CDF1284436; Thu, 22 Mar 2018 18:31:54 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Thu, 22 Mar 2018 19:31:40 +0100 Message-Id: <75c47ad5bfe851f14615180cd87942ab26d5f6a8.1521743167.git.pkrempa@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH 03/11] qemu: qapi: Fix naming of moved functions X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Thu, 22 Mar 2018 18:33:25 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Change the prefix of the functions to 'virQEMUQapi' and rename the two public APIs so that the verb is put last. Signed-off-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 4 ++-- src/qemu/qemu_qapi.c | 36 ++++++++++++++++++------------------ src/qemu/qemu_qapi.h | 10 +++++----- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 7801c9b33c..a6170c66f2 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -1833,7 +1833,7 @@ static struct virQEMUCapsStringFlags virQEMUCapsObjec= tPropsIntelIOMMU[] =3D { { "device-iotlb", QEMU_CAPS_INTEL_IOMMU_DEVICE_IOTLB }, }; -/* see documentation for virQEMUCapsQMPSchemaGetByPath for the query forma= t */ +/* see documentation for virQEMUQapiSchemaPathGet for the query format */ static struct virQEMUCapsStringFlags virQEMUCapsQMPSchemaQueries[] =3D { { "blockdev-add/arg-type/options/+gluster/debug-level", QEMU_CAPS_GLUS= TER_DEBUG_LEVEL}, { "blockdev-add/arg-type/+gluster/debug", QEMU_CAPS_GLUSTER_DEBUG_LEVE= L}, @@ -4579,7 +4579,7 @@ virQEMUCapsProbeQMPSchemaCapabilities(virQEMUCapsPtr = qemuCaps, for (i =3D 0; i < ARRAY_CARDINALITY(virQEMUCapsQMPSchemaQueries); i++)= { entry =3D virQEMUCapsQMPSchemaQueries + i; - if (virQEMUCapsQMPSchemaQueryPath(entry->value, schema)) + if (virQEMUQapiSchemaPathExists(entry->value, schema)) virQEMUCapsSet(qemuCaps, entry->flag); } diff --git a/src/qemu/qemu_qapi.c b/src/qemu/qemu_qapi.c index 2646afeee2..0a18764ac1 100644 --- a/src/qemu/qemu_qapi.c +++ b/src/qemu/qemu_qapi.c @@ -31,7 +31,7 @@ VIR_LOG_INIT("qemu.qemu_qapi"); /** - * virQEMUCapsQMPSchemaObjectGetType: + * virQEMUQapiSchemaObjectGetType: * @field: name of the object containing the requested type * @name: name of the requested type * @namefield: name of the object property holding @name @@ -40,10 +40,10 @@ VIR_LOG_INIT("qemu.qemu_qapi"); * member. Returns the type string on success or NULL on error. */ static const char * -virQEMUCapsQMPSchemaObjectGetType(const char *field, - const char *name, - const char *namefield, - virJSONValuePtr elem) +virQEMUQapiSchemaObjectGetType(const char *field, + const char *name, + const char *namefield, + virJSONValuePtr elem) { virJSONValuePtr arr; virJSONValuePtr cur; @@ -69,9 +69,9 @@ virQEMUCapsQMPSchemaObjectGetType(const char *field, static virJSONValuePtr -virQEMUCapsQMPSchemaTraverse(const char *baseName, - char **query, - virHashTablePtr schema) +virQEMUQapiSchemaTraverse(const char *baseName, + char **query, + virHashTablePtr schema) { virJSONValuePtr base; const char *metatype; @@ -94,11 +94,11 @@ virQEMUCapsQMPSchemaTraverse(const char *baseName, continue; } else if (STREQ(metatype, "object")) { if (**query =3D=3D '+') - baseName =3D virQEMUCapsQMPSchemaObjectGetType("variants", + baseName =3D virQEMUQapiSchemaObjectGetType("variants", *query + 1, "case", base); else - baseName =3D virQEMUCapsQMPSchemaObjectGetType("members", + baseName =3D virQEMUQapiSchemaObjectGetType("members", *query, "name", base); @@ -121,7 +121,7 @@ virQEMUCapsQMPSchemaTraverse(const char *baseName, /** - * virQEMUCapsQMPSchemaGetByPath: + * virQEMUQapiSchemaPathGet: * @query: string specifying the required data type (see below) * @schema: hash table containing the schema data * @entry: filled with the located schema object requested by @query @@ -150,9 +150,9 @@ virQEMUCapsQMPSchemaTraverse(const char *baseName, * error message. */ int -virQEMUCapsQMPSchemaGetByPath(const char *query, - virHashTablePtr schema, - virJSONValuePtr *entry) +virQEMUQapiSchemaPathGet(const char *query, + virHashTablePtr schema, + virJSONValuePtr *entry) { char **elems =3D NULL; @@ -167,7 +167,7 @@ virQEMUCapsQMPSchemaGetByPath(const char *query, return -1; } - *entry =3D virQEMUCapsQMPSchemaTraverse(*elems, elems + 1, schema); + *entry =3D virQEMUQapiSchemaTraverse(*elems, elems + 1, schema); virStringListFree(elems); return 0; @@ -175,12 +175,12 @@ virQEMUCapsQMPSchemaGetByPath(const char *query, bool -virQEMUCapsQMPSchemaQueryPath(const char *query, - virHashTablePtr schema) +virQEMUQapiSchemaPathExists(const char *query, + virHashTablePtr schema) { virJSONValuePtr entry; - if (virQEMUCapsQMPSchemaGetByPath(query, schema, &entry)) + if (virQEMUQapiSchemaPathGet(query, schema, &entry)) return false; return !!entry; diff --git a/src/qemu/qemu_qapi.h b/src/qemu/qemu_qapi.h index 413d0629b5..7b5546eefe 100644 --- a/src/qemu/qemu_qapi.h +++ b/src/qemu/qemu_qapi.h @@ -25,12 +25,12 @@ # include "virjson.h" int -virQEMUCapsQMPSchemaGetByPath(const char *query, - virHashTablePtr schema, - virJSONValuePtr *entry); +virQEMUQapiSchemaPathGet(const char *query, + virHashTablePtr schema, + virJSONValuePtr *entry); bool -virQEMUCapsQMPSchemaQueryPath(const char *query, - virHashTablePtr schema); +virQEMUQapiSchemaPathExists(const char *query, + virHashTablePtr schema); #endif /* __QEMU_QAPI_H__ */ --=20 2.16.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri May 3 15:32:30 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1521743643940958.8428463753476; Thu, 22 Mar 2018 11:34:03 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 74F147FEAF; Thu, 22 Mar 2018 18:34:02 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2D3AE80A51; Thu, 22 Mar 2018 18:34:02 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id D43AA4CA9B; Thu, 22 Mar 2018 18:34:01 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w2MIVura015617 for ; Thu, 22 Mar 2018 14:31:56 -0400 Received: by smtp.corp.redhat.com (Postfix) id 0B51C84433; Thu, 22 Mar 2018 18:31:56 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id 88D2C8442E; Thu, 22 Mar 2018 18:31:55 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Thu, 22 Mar 2018 19:31:41 +0100 Message-Id: <6cd03e0d87fb82746db66ba232c3c93b3c08e95c.1521743167.git.pkrempa@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH 04/11] qemu: monitor: Move processing of QMP schema to the new file X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Thu, 22 Mar 2018 18:34:02 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The JSON array was processed to the hash table used by the query apis in the monitor code. Move it to a new helper in qemu_qapi.c. Signed-off-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 9 ++++++-- src/qemu/qemu_monitor.c | 2 +- src/qemu/qemu_monitor.h | 2 +- src/qemu/qemu_monitor_json.c | 41 +++++------------------------------- src/qemu/qemu_monitor_json.h | 2 +- src/qemu/qemu_qapi.c | 50 ++++++++++++++++++++++++++++++++++++++++= ++++ src/qemu/qemu_qapi.h | 4 ++++ 7 files changed, 69 insertions(+), 41 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index a6170c66f2..16f7c7d6c9 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -4570,12 +4570,17 @@ virQEMUCapsProbeQMPSchemaCapabilities(virQEMUCapsPt= r qemuCaps, qemuMonitorPtr mon) { struct virQEMUCapsStringFlags *entry; - virHashTablePtr schema; + virJSONValuePtr schemareply; + virHashTablePtr schema =3D NULL; size_t i; - if (!(schema =3D qemuMonitorQueryQMPSchema(mon))) + if (!(schemareply =3D qemuMonitorQueryQMPSchema(mon))) return -1; + if (!(schema =3D virQEMUQapiSchemaConvert(schemareply))) + return -1; + schemareply =3D NULL; + for (i =3D 0; i < ARRAY_CARDINALITY(virQEMUCapsQMPSchemaQueries); i++)= { entry =3D virQEMUCapsQMPSchemaQueries + i; diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index 1d67a97789..e169553b7e 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -4316,7 +4316,7 @@ qemuMonitorGetRTCTime(qemuMonitorPtr mon, } -virHashTablePtr +virJSONValuePtr qemuMonitorQueryQMPSchema(qemuMonitorPtr mon) { QEMU_CHECK_MONITOR_JSON_NULL(mon); diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h index adfa87aba9..7a22323504 100644 --- a/src/qemu/qemu_monitor.h +++ b/src/qemu/qemu_monitor.h @@ -1175,7 +1175,7 @@ int qemuMonitorMigrateContinue(qemuMonitorPtr mon, int qemuMonitorGetRTCTime(qemuMonitorPtr mon, struct tm *tm); -virHashTablePtr qemuMonitorQueryQMPSchema(qemuMonitorPtr mon); +virJSONValuePtr qemuMonitorQueryQMPSchema(qemuMonitorPtr mon); int qemuMonitorSetBlockThreshold(qemuMonitorPtr mon, const char *nodename, diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 08dfffdf64..d80c4f18d1 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -7776,35 +7776,12 @@ qemuMonitorJSONGetHotpluggableCPUs(qemuMonitorPtr m= on, } -static int -qemuMonitorJSONFillQMPSchema(size_t pos ATTRIBUTE_UNUSED, - virJSONValuePtr item, - void *opaque) -{ - const char *name; - virHashTablePtr schema =3D opaque; - - if (!(name =3D virJSONValueObjectGetString(item, "name"))) { - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", - _("malformed QMP schema")); - return -1; - } - - if (virHashAddEntry(schema, name, item) < 0) - return -1; - - return 0; -} - - -virHashTablePtr +virJSONValuePtr qemuMonitorJSONQueryQMPSchema(qemuMonitorPtr mon) { virJSONValuePtr cmd; virJSONValuePtr reply =3D NULL; - virJSONValuePtr arr; - virHashTablePtr schema =3D NULL; - virHashTablePtr ret =3D NULL; + virJSONValuePtr ret =3D NULL; if (!(cmd =3D qemuMonitorJSONMakeCommand("query-qmp-schema", NULL))) return NULL; @@ -7815,21 +7792,13 @@ qemuMonitorJSONQueryQMPSchema(qemuMonitorPtr mon) if (qemuMonitorJSONCheckError(cmd, reply) < 0) goto cleanup; - arr =3D virJSONValueObjectGet(reply, "return"); - - if (!(schema =3D virHashCreate(512, virJSONValueHashFree))) - goto cleanup; - - if (virJSONValueArrayForeachSteal(arr, qemuMonitorJSONFillQMPSchema, - schema) < 0) - goto cleanup; - - VIR_STEAL_PTR(ret, schema); + if (!(ret =3D virJSONValueObjectStealArray(reply, "return"))) + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + _("query-qmp-schema reply is not an array")); cleanup: virJSONValueFree(cmd); virJSONValueFree(reply); - virHashFree(schema); return ret; } diff --git a/src/qemu/qemu_monitor_json.h b/src/qemu/qemu_monitor_json.h index ec243becc4..846d366b27 100644 --- a/src/qemu/qemu_monitor_json.h +++ b/src/qemu/qemu_monitor_json.h @@ -516,7 +516,7 @@ int qemuMonitorJSONGetHotpluggableCPUs(qemuMonitorPtr m= on, size_t *nentries) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3); -virHashTablePtr qemuMonitorJSONQueryQMPSchema(qemuMonitorPtr mon) +virJSONValuePtr qemuMonitorJSONQueryQMPSchema(qemuMonitorPtr mon) ATTRIBUTE_NONNULL(1); int qemuMonitorJSONSetBlockThreshold(qemuMonitorPtr mon, diff --git a/src/qemu/qemu_qapi.c b/src/qemu/qemu_qapi.c index 0a18764ac1..e63896397f 100644 --- a/src/qemu/qemu_qapi.c +++ b/src/qemu/qemu_qapi.c @@ -185,3 +185,53 @@ virQEMUQapiSchemaPathExists(const char *query, return !!entry; } + +static int +virQEMUQapiSchemaEntryProcess(size_t pos ATTRIBUTE_UNUSED, + virJSONValuePtr item, + void *opaque) +{ + const char *name; + virHashTablePtr schema =3D opaque; + + if (!(name =3D virJSONValueObjectGetString(item, "name"))) { + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + _("malformed QMP schema")); + return -1; + } + + if (virHashAddEntry(schema, name, item) < 0) + return -1; + + return 0; +} + + +/** + * virQEMUQapiSchemaConvert: + * @schemareply: Schema data as returned by the qemu monitor + * + * Converts the schema into the hash-table used by the functions working w= ith + * the schema. @schemareply is consumed and freed. + */ +virHashTablePtr +virQEMUQapiSchemaConvert(virJSONValuePtr schemareply) +{ + virHashTablePtr schema; + virHashTablePtr ret =3D NULL; + + if (!(schema =3D virHashCreate(512, virJSONValueHashFree))) + goto cleanup; + + if (virJSONValueArrayForeachSteal(schemareply, + virQEMUQapiSchemaEntryProcess, + schema) < 0) + goto cleanup; + + VIR_STEAL_PTR(ret, schema); + + cleanup: + virJSONValueFree(schemareply); + virHashFree(schema); + return ret; +} diff --git a/src/qemu/qemu_qapi.h b/src/qemu/qemu_qapi.h index 7b5546eefe..b0a68bec12 100644 --- a/src/qemu/qemu_qapi.h +++ b/src/qemu/qemu_qapi.h @@ -33,4 +33,8 @@ bool virQEMUQapiSchemaPathExists(const char *query, virHashTablePtr schema); +virHashTablePtr +virQEMUQapiSchemaConvert(virJSONValuePtr schemareply); + + #endif /* __QEMU_QAPI_H__ */ --=20 2.16.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri May 3 15:32:30 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 152174357386472.07727113556155; Thu, 22 Mar 2018 11:32:53 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 648AFC057F82; Thu, 22 Mar 2018 18:32:52 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 38AE8749D1; Thu, 22 Mar 2018 18:32:52 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id D95F1181BA02; Thu, 22 Mar 2018 18:32:51 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w2MIVu7M015625 for ; Thu, 22 Mar 2018 14:31:56 -0400 Received: by smtp.corp.redhat.com (Postfix) id BA5CE84433; Thu, 22 Mar 2018 18:31:56 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id 43C7D6F9E2; Thu, 22 Mar 2018 18:31:56 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Thu, 22 Mar 2018 19:31:42 +0100 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH 05/11] util: json: Add accessor for looking up JSON value type X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Thu, 22 Mar 2018 18:32:52 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Peter Krempa --- src/libvirt_private.syms | 1 + src/util/virjson.c | 7 +++++++ src/util/virjson.h | 2 ++ 3 files changed, 10 insertions(+) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index c3e4fd23df..03fe3b315f 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -2041,6 +2041,7 @@ virJSONValueGetNumberLong; virJSONValueGetNumberUint; virJSONValueGetNumberUlong; virJSONValueGetString; +virJSONValueGetType; virJSONValueHashFree; virJSONValueIsArray; virJSONValueIsNull; diff --git a/src/util/virjson.c b/src/util/virjson.c index 14b68b8c93..6a02ddf0cc 100644 --- a/src/util/virjson.c +++ b/src/util/virjson.c @@ -68,6 +68,13 @@ struct _virJSONParser { }; +virJSONType +virJSONValueGetType(const virJSONValue *value) +{ + return value->type; +} + + /** * virJSONValueObjectAddVArgs: * @obj: JSON object to add the values to diff --git a/src/util/virjson.h b/src/util/virjson.h index b76a3c3472..017a1f20ed 100644 --- a/src/util/virjson.h +++ b/src/util/virjson.h @@ -83,6 +83,8 @@ struct _virJSONValue { void virJSONValueFree(virJSONValuePtr value); void virJSONValueHashFree(void *opaque, const void *name); +virJSONType virJSONValueGetType(const virJSONValue *value); + int virJSONValueObjectCreate(virJSONValuePtr *obj, ...) ATTRIBUTE_NONNULL(1) ATTRIBUTE_SENTINEL; int virJSONValueObjectCreateVArgs(virJSONValuePtr *obj, va_list args) --=20 2.16.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri May 3 15:32:30 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1521743647562762.3609464926589; Thu, 22 Mar 2018 11:34:07 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1766A26AC66; Thu, 22 Mar 2018 18:34:06 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DEC7660637; Thu, 22 Mar 2018 18:34:05 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id A4EE44CAA3; Thu, 22 Mar 2018 18:34:05 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w2MIVvUZ015633 for ; Thu, 22 Mar 2018 14:31:57 -0400 Received: by smtp.corp.redhat.com (Postfix) id 75A9384433; Thu, 22 Mar 2018 18:31:57 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id F2F066F9E2; Thu, 22 Mar 2018 18:31:56 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Thu, 22 Mar 2018 19:31:43 +0100 Message-Id: <19e7dca9974feb0499dc49c3a398e8c74e8fab82.1521743167.git.pkrempa@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH 06/11] qemu: qapi: Return correct entry in virQEMUQapiSchemaTraverse X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Thu, 22 Mar 2018 18:34:06 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" virQEMUQapiSchemaTraverse would return previous-to-last queried item on a query. It would not be a problem if checking if the given path exists since error reporting works properly but if the caller is interrested in the result, it would be wrong. Signed-off-by: Peter Krempa --- src/qemu/qemu_qapi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_qapi.c b/src/qemu/qemu_qapi.c index e63896397f..c821e2eb55 100644 --- a/src/qemu/qemu_qapi.c +++ b/src/qemu/qemu_qapi.c @@ -76,7 +76,7 @@ virQEMUQapiSchemaTraverse(const char *baseName, virJSONValuePtr base; const char *metatype; - do { + while (1) { if (!(base =3D virHashLookup(schema, baseName))) return NULL; @@ -114,7 +114,7 @@ virQEMUQapiSchemaTraverse(const char *baseName, } query++; - } while (*query); + } return base; } --=20 2.16.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri May 3 15:32:30 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1521743578844778.2843053465537; Thu, 22 Mar 2018 11:32:58 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 057B4445D5; Thu, 22 Mar 2018 18:32:56 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C802B12A65; Thu, 22 Mar 2018 18:32:55 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 8DD374CA99; Thu, 22 Mar 2018 18:32:55 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w2MIVw4R015645 for ; Thu, 22 Mar 2018 14:31:58 -0400 Received: by smtp.corp.redhat.com (Postfix) id AB1288442D; Thu, 22 Mar 2018 18:31:58 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id AF53F84436; Thu, 22 Mar 2018 18:31:57 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Thu, 22 Mar 2018 19:31:44 +0100 Message-Id: <3a3dabaa991baef9f326b746ebc4274415a850df.1521743167.git.pkrempa@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH 07/11] tests: Add data file with QEMU QAPI schema X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Thu, 22 Mar 2018 18:32:57 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Add the QAPI schema (returned by 'query-qmp-schema' command) which will be used for QAPI schema testing in upcomming patches. Signed-off-by: Peter Krempa --- tests/Makefile.am | 1 + tests/qemuqapischema.json | 11364 ++++++++++++++++++++++++++++++++++++++++= ++++ 2 files changed, 11365 insertions(+) create mode 100644 tests/qemuqapischema.json diff --git a/tests/Makefile.am b/tests/Makefile.am index 15c8cc8158..fe8847386e 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -129,6 +129,7 @@ EXTRA_DIST =3D \ qemuxml2argvdata \ qemuxml2xmloutdata \ qemustatusxml2xmldata \ + qemuqapischema.json \ qemumemlockdata \ secretxml2xmlin \ securityselinuxhelperdata \ diff --git a/tests/qemuqapischema.json b/tests/qemuqapischema.json new file mode 100644 index 0000000000..d95b5e536e --- /dev/null +++ b/tests/qemuqapischema.json @@ -0,0 +1,11364 @@ +[ + { + "name": "query-status", + "ret-type": "1", + "allow-oob": false, + "meta-type": "command", + "arg-type": "0" + }, + { + "name": "SHUTDOWN", + "meta-type": "event", + "arg-type": "2" + }, + { + "name": "POWERDOWN", + "meta-type": "event", + "arg-type": "0" + }, + { + "name": "RESET", + "meta-type": "event", + "arg-type": "3" + }, + { + "name": "STOP", + "meta-type": "event", + "arg-type": "0" + }, + { + "name": "RESUME", + "meta-type": "event", + "arg-type": "0" + }, + { + "name": "SUSPEND", + "meta-type": "event", + "arg-type": "0" + }, + { + "name": "SUSPEND_DISK", + "meta-type": "event", + "arg-type": "0" + }, + { + "name": "WAKEUP", + "meta-type": "event", + "arg-type": "0" + }, + { + "name": "WATCHDOG", + "meta-type": "event", + "arg-type": "4" + }, + { + "name": "watchdog-set-action", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "5" + }, + { + "name": "GUEST_PANICKED", + "meta-type": "event", + "arg-type": "6" + }, + { + "name": "x-block-latency-histogram-set", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "7" + }, + { + "name": "query-block", + "ret-type": "[8]", + "allow-oob": false, + "meta-type": "command", + "arg-type": "0" + }, + { + "name": "query-blockstats", + "ret-type": "[10]", + "allow-oob": false, + "meta-type": "command", + "arg-type": "9" + }, + { + "name": "query-block-jobs", + "ret-type": "[11]", + "allow-oob": false, + "meta-type": "command", + "arg-type": "0" + }, + { + "name": "block_passwd", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "12" + }, + { + "name": "block_resize", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "13" + }, + { + "name": "blockdev-snapshot-sync", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "14" + }, + { + "name": "blockdev-snapshot", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "15" + }, + { + "name": "change-backing-file", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "16" + }, + { + "name": "block-commit", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "17" + }, + { + "name": "drive-backup", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "18" + }, + { + "name": "blockdev-backup", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "19" + }, + { + "name": "query-named-block-nodes", + "ret-type": "[20]", + "allow-oob": false, + "meta-type": "command", + "arg-type": "0" + }, + { + "name": "drive-mirror", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "21" + }, + { + "name": "block-dirty-bitmap-add", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "22" + }, + { + "name": "block-dirty-bitmap-remove", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "23" + }, + { + "name": "block-dirty-bitmap-clear", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "23" + }, + { + "name": "x-debug-block-dirty-bitmap-sha256", + "ret-type": "24", + "allow-oob": false, + "meta-type": "command", + "arg-type": "23" + }, + { + "name": "blockdev-mirror", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "25" + }, + { + "name": "block_set_io_throttle", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "26" + }, + { + "name": "block-stream", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "27" + }, + { + "name": "block-job-set-speed", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "28" + }, + { + "name": "block-job-cancel", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "29" + }, + { + "name": "block-job-pause", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "30" + }, + { + "name": "block-job-resume", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "31" + }, + { + "name": "block-job-complete", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "32" + }, + { + "name": "block-job-dismiss", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "33" + }, + { + "name": "block-job-finalize", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "34" + }, + { + "name": "blockdev-add", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "35" + }, + { + "name": "blockdev-del", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "36" + }, + { + "name": "x-blockdev-create", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "37" + }, + { + "name": "blockdev-open-tray", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "38" + }, + { + "name": "blockdev-close-tray", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "39" + }, + { + "name": "blockdev-remove-medium", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "40" + }, + { + "name": "blockdev-insert-medium", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "41" + }, + { + "name": "blockdev-change-medium", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "42" + }, + { + "name": "BLOCK_IMAGE_CORRUPTED", + "meta-type": "event", + "arg-type": "43" + }, + { + "name": "BLOCK_IO_ERROR", + "meta-type": "event", + "arg-type": "44" + }, + { + "name": "BLOCK_JOB_COMPLETED", + "meta-type": "event", + "arg-type": "45" + }, + { + "name": "BLOCK_JOB_CANCELLED", + "meta-type": "event", + "arg-type": "46" + }, + { + "name": "BLOCK_JOB_ERROR", + "meta-type": "event", + "arg-type": "47" + }, + { + "name": "BLOCK_JOB_READY", + "meta-type": "event", + "arg-type": "48" + }, + { + "name": "BLOCK_JOB_PENDING", + "meta-type": "event", + "arg-type": "49" + }, + { + "name": "BLOCK_WRITE_THRESHOLD", + "meta-type": "event", + "arg-type": "50" + }, + { + "name": "block-set-write-threshold", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "51" + }, + { + "name": "x-blockdev-change", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "52" + }, + { + "name": "x-blockdev-set-iothread", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "53" + }, + { + "name": "blockdev-snapshot-internal-sync", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "54" + }, + { + "name": "blockdev-snapshot-delete-internal-sync", + "ret-type": "56", + "allow-oob": false, + "meta-type": "command", + "arg-type": "55" + }, + { + "name": "eject", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "57" + }, + { + "name": "nbd-server-start", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "58" + }, + { + "name": "nbd-server-add", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "59" + }, + { + "name": "nbd-server-remove", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "60" + }, + { + "name": "nbd-server-stop", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "0" + }, + { + "name": "DEVICE_TRAY_MOVED", + "meta-type": "event", + "arg-type": "61" + }, + { + "name": "QUORUM_FAILURE", + "meta-type": "event", + "arg-type": "62" + }, + { + "name": "QUORUM_REPORT_BAD", + "meta-type": "event", + "arg-type": "63" + }, + { + "name": "query-chardev", + "ret-type": "[64]", + "allow-oob": false, + "meta-type": "command", + "arg-type": "0" + }, + { + "name": "query-chardev-backends", + "ret-type": "[65]", + "allow-oob": false, + "meta-type": "command", + "arg-type": "0" + }, + { + "name": "ringbuf-write", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "66" + }, + { + "name": "ringbuf-read", + "ret-type": "str", + "allow-oob": false, + "meta-type": "command", + "arg-type": "67" + }, + { + "name": "chardev-add", + "ret-type": "69", + "allow-oob": false, + "meta-type": "command", + "arg-type": "68" + }, + { + "name": "chardev-change", + "ret-type": "69", + "allow-oob": false, + "meta-type": "command", + "arg-type": "70" + }, + { + "name": "chardev-remove", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "71" + }, + { + "name": "chardev-send-break", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "72" + }, + { + "name": "VSERPORT_CHANGE", + "meta-type": "event", + "arg-type": "73" + }, + { + "name": "set_link", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "74" + }, + { + "name": "netdev_add", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "75" + }, + { + "name": "netdev_del", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "76" + }, + { + "name": "query-rx-filter", + "ret-type": "[78]", + "allow-oob": false, + "meta-type": "command", + "arg-type": "77" + }, + { + "name": "NIC_RX_FILTER_CHANGED", + "meta-type": "event", + "arg-type": "79" + }, + { + "name": "query-rocker", + "ret-type": "81", + "allow-oob": false, + "meta-type": "command", + "arg-type": "80" + }, + { + "name": "query-rocker-ports", + "ret-type": "[83]", + "allow-oob": false, + "meta-type": "command", + "arg-type": "82" + }, + { + "name": "query-rocker-of-dpa-flows", + "ret-type": "[85]", + "allow-oob": false, + "meta-type": "command", + "arg-type": "84" + }, + { + "name": "query-rocker-of-dpa-groups", + "ret-type": "[87]", + "allow-oob": false, + "meta-type": "command", + "arg-type": "86" + }, + { + "name": "query-tpm-models", + "ret-type": "[88]", + "allow-oob": false, + "meta-type": "command", + "arg-type": "0" + }, + { + "name": "query-tpm-types", + "ret-type": "[89]", + "allow-oob": false, + "meta-type": "command", + "arg-type": "0" + }, + { + "name": "query-tpm", + "ret-type": "[90]", + "allow-oob": false, + "meta-type": "command", + "arg-type": "0" + }, + { + "name": "set_password", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "91" + }, + { + "name": "expire_password", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "92" + }, + { + "name": "screendump", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "93" + }, + { + "name": "query-spice", + "ret-type": "94", + "allow-oob": false, + "meta-type": "command", + "arg-type": "0" + }, + { + "name": "SPICE_CONNECTED", + "meta-type": "event", + "arg-type": "95" + }, + { + "name": "SPICE_INITIALIZED", + "meta-type": "event", + "arg-type": "96" + }, + { + "name": "SPICE_DISCONNECTED", + "meta-type": "event", + "arg-type": "97" + }, + { + "name": "SPICE_MIGRATE_COMPLETED", + "meta-type": "event", + "arg-type": "0" + }, + { + "name": "query-vnc", + "ret-type": "98", + "allow-oob": false, + "meta-type": "command", + "arg-type": "0" + }, + { + "name": "query-vnc-servers", + "ret-type": "[99]", + "allow-oob": false, + "meta-type": "command", + "arg-type": "0" + }, + { + "name": "change-vnc-password", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "100" + }, + { + "name": "VNC_CONNECTED", + "meta-type": "event", + "arg-type": "101" + }, + { + "name": "VNC_INITIALIZED", + "meta-type": "event", + "arg-type": "102" + }, + { + "name": "VNC_DISCONNECTED", + "meta-type": "event", + "arg-type": "103" + }, + { + "name": "query-mice", + "ret-type": "[104]", + "allow-oob": false, + "meta-type": "command", + "arg-type": "0" + }, + { + "name": "send-key", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "105" + }, + { + "name": "input-send-event", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "106" + }, + { + "name": "query-migrate", + "ret-type": "107", + "allow-oob": false, + "meta-type": "command", + "arg-type": "0" + }, + { + "name": "migrate-set-capabilities", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "108" + }, + { + "name": "query-migrate-capabilities", + "ret-type": "[109]", + "allow-oob": false, + "meta-type": "command", + "arg-type": "0" + }, + { + "name": "migrate-set-parameters", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "110" + }, + { + "name": "query-migrate-parameters", + "ret-type": "111", + "allow-oob": false, + "meta-type": "command", + "arg-type": "0" + }, + { + "name": "client_migrate_info", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "112" + }, + { + "name": "migrate-start-postcopy", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "0" + }, + { + "name": "MIGRATION", + "meta-type": "event", + "arg-type": "113" + }, + { + "name": "MIGRATION_PASS", + "meta-type": "event", + "arg-type": "114" + }, + { + "name": "x-colo-lost-heartbeat", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "0" + }, + { + "name": "migrate_cancel", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "0" + }, + { + "name": "migrate-continue", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "115" + }, + { + "name": "migrate_set_downtime", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "116" + }, + { + "name": "migrate_set_speed", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "117" + }, + { + "name": "migrate-set-cache-size", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "118" + }, + { + "name": "query-migrate-cache-size", + "ret-type": "int", + "allow-oob": false, + "meta-type": "command", + "arg-type": "0" + }, + { + "name": "migrate", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "119" + }, + { + "name": "migrate-incoming", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "120" + }, + { + "name": "xen-save-devices-state", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "121" + }, + { + "name": "xen-set-replication", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "122" + }, + { + "name": "query-xen-replication-status", + "ret-type": "123", + "allow-oob": false, + "meta-type": "command", + "arg-type": "0" + }, + { + "name": "xen-colo-do-checkpoint", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "0" + }, + { + "name": "transaction", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "124" + }, + { + "name": "trace-event-get-state", + "ret-type": "[126]", + "allow-oob": false, + "meta-type": "command", + "arg-type": "125" + }, + { + "name": "trace-event-set-state", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "127" + }, + { + "name": "query-qmp-schema", + "ret-type": "[128]", + "allow-oob": false, + "meta-type": "command", + "arg-type": "0" + }, + { + "name": "qmp_capabilities", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "129" + }, + { + "name": "query-version", + "ret-type": "130", + "allow-oob": false, + "meta-type": "command", + "arg-type": "0" + }, + { + "name": "query-commands", + "ret-type": "[131]", + "allow-oob": false, + "meta-type": "command", + "arg-type": "0" + }, + { + "name": "add_client", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "132" + }, + { + "name": "query-name", + "ret-type": "133", + "allow-oob": false, + "meta-type": "command", + "arg-type": "0" + }, + { + "name": "query-kvm", + "ret-type": "134", + "allow-oob": false, + "meta-type": "command", + "arg-type": "0" + }, + { + "name": "query-uuid", + "ret-type": "135", + "allow-oob": false, + "meta-type": "command", + "arg-type": "0" + }, + { + "name": "query-events", + "ret-type": "[136]", + "allow-oob": false, + "meta-type": "command", + "arg-type": "0" + }, + { + "name": "query-cpus", + "ret-type": "[137]", + "allow-oob": false, + "meta-type": "command", + "arg-type": "0" + }, + { + "name": "query-cpus-fast", + "ret-type": "[138]", + "allow-oob": false, + "meta-type": "command", + "arg-type": "0" + }, + { + "name": "query-iothreads", + "ret-type": "[139]", + "allow-oob": false, + "meta-type": "command", + "arg-type": "0" + }, + { + "name": "query-balloon", + "ret-type": "140", + "allow-oob": false, + "meta-type": "command", + "arg-type": "0" + }, + { + "name": "BALLOON_CHANGE", + "meta-type": "event", + "arg-type": "141" + }, + { + "name": "query-pci", + "ret-type": "[142]", + "allow-oob": false, + "meta-type": "command", + "arg-type": "0" + }, + { + "name": "quit", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "0" + }, + { + "name": "stop", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "0" + }, + { + "name": "system_reset", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "0" + }, + { + "name": "system_powerdown", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "0" + }, + { + "name": "cpu-add", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "143" + }, + { + "name": "memsave", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "144" + }, + { + "name": "pmemsave", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "145" + }, + { + "name": "cont", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "0" + }, + { + "name": "system_wakeup", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "0" + }, + { + "name": "inject-nmi", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "0" + }, + { + "name": "balloon", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "146" + }, + { + "name": "human-monitor-command", + "ret-type": "str", + "allow-oob": false, + "meta-type": "command", + "arg-type": "147" + }, + { + "name": "qom-list", + "ret-type": "[149]", + "allow-oob": false, + "meta-type": "command", + "arg-type": "148" + }, + { + "name": "qom-get", + "ret-type": "any", + "allow-oob": false, + "meta-type": "command", + "arg-type": "150" + }, + { + "name": "qom-set", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "151" + }, + { + "name": "change", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "152" + }, + { + "name": "qom-list-types", + "ret-type": "[154]", + "allow-oob": false, + "meta-type": "command", + "arg-type": "153" + }, + { + "name": "device-list-properties", + "ret-type": "[149]", + "allow-oob": false, + "meta-type": "command", + "arg-type": "155" + }, + { + "name": "qom-list-properties", + "ret-type": "[149]", + "allow-oob": false, + "meta-type": "command", + "arg-type": "156" + }, + { + "name": "xen-set-global-dirty-log", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "157" + }, + { + "name": "device_add", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "158" + }, + { + "name": "device_del", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "159" + }, + { + "name": "DEVICE_DELETED", + "meta-type": "event", + "arg-type": "160" + }, + { + "name": "dump-guest-memory", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "161" + }, + { + "name": "query-dump", + "ret-type": "162", + "allow-oob": false, + "meta-type": "command", + "arg-type": "0" + }, + { + "name": "DUMP_COMPLETED", + "meta-type": "event", + "arg-type": "163" + }, + { + "name": "query-dump-guest-memory-capability", + "ret-type": "164", + "allow-oob": false, + "meta-type": "command", + "arg-type": "0" + }, + { + "name": "dump-skeys", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "165" + }, + { + "name": "object-add", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "166" + }, + { + "name": "object-del", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "167" + }, + { + "name": "getfd", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "168" + }, + { + "name": "closefd", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "169" + }, + { + "name": "query-machines", + "ret-type": "[170]", + "allow-oob": false, + "meta-type": "command", + "arg-type": "0" + }, + { + "name": "query-memory-size-summary", + "ret-type": "171", + "allow-oob": false, + "meta-type": "command", + "arg-type": "0" + }, + { + "name": "query-cpu-definitions", + "ret-type": "[172]", + "allow-oob": false, + "meta-type": "command", + "arg-type": "0" + }, + { + "name": "query-cpu-model-expansion", + "ret-type": "174", + "allow-oob": false, + "meta-type": "command", + "arg-type": "173" + }, + { + "name": "query-cpu-model-comparison", + "ret-type": "176", + "allow-oob": false, + "meta-type": "command", + "arg-type": "175" + }, + { + "name": "query-cpu-model-baseline", + "ret-type": "178", + "allow-oob": false, + "meta-type": "command", + "arg-type": "177" + }, + { + "name": "add-fd", + "ret-type": "180", + "allow-oob": false, + "meta-type": "command", + "arg-type": "179" + }, + { + "name": "remove-fd", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "181" + }, + { + "name": "query-fdsets", + "ret-type": "[182]", + "allow-oob": false, + "meta-type": "command", + "arg-type": "0" + }, + { + "name": "query-target", + "ret-type": "183", + "allow-oob": false, + "meta-type": "command", + "arg-type": "0" + }, + { + "name": "query-command-line-options", + "ret-type": "[185]", + "allow-oob": false, + "meta-type": "command", + "arg-type": "184" + }, + { + "name": "query-memdev", + "ret-type": "[186]", + "allow-oob": false, + "meta-type": "command", + "arg-type": "0" + }, + { + "name": "query-memory-devices", + "ret-type": "[187]", + "allow-oob": false, + "meta-type": "command", + "arg-type": "0" + }, + { + "name": "MEM_UNPLUG_ERROR", + "meta-type": "event", + "arg-type": "188" + }, + { + "name": "query-acpi-ospm-status", + "ret-type": "[189]", + "allow-oob": false, + "meta-type": "command", + "arg-type": "0" + }, + { + "name": "ACPI_DEVICE_OST", + "meta-type": "event", + "arg-type": "190" + }, + { + "name": "rtc-reset-reinjection", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "0" + }, + { + "name": "RTC_CHANGE", + "meta-type": "event", + "arg-type": "191" + }, + { + "name": "xen-load-devices-state", + "ret-type": "0", + "allow-oob": false, + "meta-type": "command", + "arg-type": "192" + }, + { + "name": "query-gic-capabilities", + "ret-type": "[193]", + "allow-oob": false, + "meta-type": "command", + "arg-type": "0" + }, + { + "name": "query-hotpluggable-cpus", + "ret-type": "[194]", + "allow-oob": false, + "meta-type": "command", + "arg-type": "0" + }, + { + "name": "query-vm-generation-id", + "ret-type": "195", + "allow-oob": false, + "meta-type": "command", + "arg-type": "0" + }, + { + "name": "query-sev", + "ret-type": "196", + "allow-oob": false, + "meta-type": "command", + "arg-type": "0" + }, + { + "name": "query-sev-launch-measure", + "ret-type": "197", + "allow-oob": false, + "meta-type": "command", + "arg-type": "0" + }, + { + "name": "query-sev-capabilities", + "ret-type": "198", + "allow-oob": false, + "meta-type": "command", + "arg-type": "0" + }, + { + "name": "COMMAND_DROPPED", + "meta-type": "event", + "arg-type": "199" + }, + { + "name": "x-oob-test", + "ret-type": "0", + "allow-oob": true, + "meta-type": "command", + "arg-type": "200" + }, + { + "name": "0", + "members": [ + ], + "meta-type": "object" + }, + { + "name": "1", + "members": [ + { + "name": "running", + "type": "bool" + }, + { + "name": "singlestep", + "type": "bool" + }, + { + "name": "status", + "type": "201" + } + ], + "meta-type": "object" + }, + { + "name": "2", + "members": [ + { + "name": "guest", + "type": "bool" + } + ], + "meta-type": "object" + }, + { + "name": "3", + "members": [ + { + "name": "guest", + "type": "bool" + } + ], + "meta-type": "object" + }, + { + "name": "4", + "members": [ + { + "name": "action", + "type": "202" + } + ], + "meta-type": "object" + }, + { + "name": "5", + "members": [ + { + "name": "action", + "type": "202" + } + ], + "meta-type": "object" + }, + { + "name": "6", + "members": [ + { + "name": "action", + "type": "203" + }, + { + "name": "info", + "default": null, + "type": "204" + } + ], + "meta-type": "object" + }, + { + "name": "7", + "members": [ + { + "name": "device", + "type": "str" + }, + { + "name": "boundaries", + "default": null, + "type": "[int]" + }, + { + "name": "boundaries-read", + "default": null, + "type": "[int]" + }, + { + "name": "boundaries-write", + "default": null, + "type": "[int]" + }, + { + "name": "boundaries-flush", + "default": null, + "type": "[int]" + } + ], + "meta-type": "object" + }, + { + "name": "[8]", + "element-type": "8", + "meta-type": "array" + }, + { + "name": "8", + "members": [ + { + "name": "device", + "type": "str" + }, + { + "name": "qdev", + "default": null, + "type": "str" + }, + { + "name": "type", + "type": "str" + }, + { + "name": "removable", + "type": "bool" + }, + { + "name": "locked", + "type": "bool" + }, + { + "name": "inserted", + "default": null, + "type": "20" + }, + { + "name": "tray_open", + "default": null, + "type": "bool" + }, + { + "name": "io-status", + "default": null, + "type": "205" + }, + { + "name": "dirty-bitmaps", + "default": null, + "type": "[206]" + } + ], + "meta-type": "object" + }, + { + "name": "9", + "members": [ + { + "name": "query-nodes", + "default": null, + "type": "bool" + } + ], + "meta-type": "object" + }, + { + "name": "[10]", + "element-type": "10", + "meta-type": "array" + }, + { + "name": "10", + "members": [ + { + "name": "device", + "default": null, + "type": "str" + }, + { + "name": "node-name", + "default": null, + "type": "str" + }, + { + "name": "stats", + "type": "207" + }, + { + "name": "parent", + "default": null, + "type": "10" + }, + { + "name": "backing", + "default": null, + "type": "10" + } + ], + "meta-type": "object" + }, + { + "name": "[11]", + "element-type": "11", + "meta-type": "array" + }, + { + "name": "11", + "members": [ + { + "name": "type", + "type": "str" + }, + { + "name": "device", + "type": "str" + }, + { + "name": "len", + "type": "int" + }, + { + "name": "offset", + "type": "int" + }, + { + "name": "busy", + "type": "bool" + }, + { + "name": "paused", + "type": "bool" + }, + { + "name": "speed", + "type": "int" + }, + { + "name": "io-status", + "type": "205" + }, + { + "name": "ready", + "type": "bool" + }, + { + "name": "status", + "type": "208" + }, + { + "name": "auto-finalize", + "type": "bool" + }, + { + "name": "auto-dismiss", + "type": "bool" + } + ], + "meta-type": "object" + }, + { + "name": "12", + "members": [ + { + "name": "device", + "default": null, + "type": "str" + }, + { + "name": "node-name", + "default": null, + "type": "str" + }, + { + "name": "password", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "13", + "members": [ + { + "name": "device", + "default": null, + "type": "str" + }, + { + "name": "node-name", + "default": null, + "type": "str" + }, + { + "name": "size", + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "14", + "members": [ + { + "name": "device", + "default": null, + "type": "str" + }, + { + "name": "node-name", + "default": null, + "type": "str" + }, + { + "name": "snapshot-file", + "type": "str" + }, + { + "name": "snapshot-node-name", + "default": null, + "type": "str" + }, + { + "name": "format", + "default": null, + "type": "str" + }, + { + "name": "mode", + "default": null, + "type": "209" + } + ], + "meta-type": "object" + }, + { + "name": "15", + "members": [ + { + "name": "node", + "type": "str" + }, + { + "name": "overlay", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "16", + "members": [ + { + "name": "device", + "type": "str" + }, + { + "name": "image-node-name", + "type": "str" + }, + { + "name": "backing-file", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "17", + "members": [ + { + "name": "job-id", + "default": null, + "type": "str" + }, + { + "name": "device", + "type": "str" + }, + { + "name": "base", + "default": null, + "type": "str" + }, + { + "name": "top", + "default": null, + "type": "str" + }, + { + "name": "backing-file", + "default": null, + "type": "str" + }, + { + "name": "speed", + "default": null, + "type": "int" + }, + { + "name": "filter-node-name", + "default": null, + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "18", + "members": [ + { + "name": "job-id", + "default": null, + "type": "str" + }, + { + "name": "device", + "type": "str" + }, + { + "name": "target", + "type": "str" + }, + { + "name": "format", + "default": null, + "type": "str" + }, + { + "name": "sync", + "type": "210" + }, + { + "name": "mode", + "default": null, + "type": "209" + }, + { + "name": "speed", + "default": null, + "type": "int" + }, + { + "name": "bitmap", + "default": null, + "type": "str" + }, + { + "name": "compress", + "default": null, + "type": "bool" + }, + { + "name": "on-source-error", + "default": null, + "type": "211" + }, + { + "name": "on-target-error", + "default": null, + "type": "211" + }, + { + "name": "auto-finalize", + "default": null, + "type": "bool" + }, + { + "name": "auto-dismiss", + "default": null, + "type": "bool" + } + ], + "meta-type": "object" + }, + { + "name": "19", + "members": [ + { + "name": "job-id", + "default": null, + "type": "str" + }, + { + "name": "device", + "type": "str" + }, + { + "name": "target", + "type": "str" + }, + { + "name": "sync", + "type": "210" + }, + { + "name": "speed", + "default": null, + "type": "int" + }, + { + "name": "compress", + "default": null, + "type": "bool" + }, + { + "name": "on-source-error", + "default": null, + "type": "211" + }, + { + "name": "on-target-error", + "default": null, + "type": "211" + }, + { + "name": "auto-finalize", + "default": null, + "type": "bool" + }, + { + "name": "auto-dismiss", + "default": null, + "type": "bool" + } + ], + "meta-type": "object" + }, + { + "name": "[20]", + "element-type": "20", + "meta-type": "array" + }, + { + "name": "20", + "members": [ + { + "name": "file", + "type": "str" + }, + { + "name": "node-name", + "default": null, + "type": "str" + }, + { + "name": "ro", + "type": "bool" + }, + { + "name": "drv", + "type": "str" + }, + { + "name": "backing_file", + "default": null, + "type": "str" + }, + { + "name": "backing_file_depth", + "type": "int" + }, + { + "name": "encrypted", + "type": "bool" + }, + { + "name": "encryption_key_missing", + "type": "bool" + }, + { + "name": "detect_zeroes", + "type": "212" + }, + { + "name": "bps", + "type": "int" + }, + { + "name": "bps_rd", + "type": "int" + }, + { + "name": "bps_wr", + "type": "int" + }, + { + "name": "iops", + "type": "int" + }, + { + "name": "iops_rd", + "type": "int" + }, + { + "name": "iops_wr", + "type": "int" + }, + { + "name": "image", + "type": "213" + }, + { + "name": "bps_max", + "default": null, + "type": "int" + }, + { + "name": "bps_rd_max", + "default": null, + "type": "int" + }, + { + "name": "bps_wr_max", + "default": null, + "type": "int" + }, + { + "name": "iops_max", + "default": null, + "type": "int" + }, + { + "name": "iops_rd_max", + "default": null, + "type": "int" + }, + { + "name": "iops_wr_max", + "default": null, + "type": "int" + }, + { + "name": "bps_max_length", + "default": null, + "type": "int" + }, + { + "name": "bps_rd_max_length", + "default": null, + "type": "int" + }, + { + "name": "bps_wr_max_length", + "default": null, + "type": "int" + }, + { + "name": "iops_max_length", + "default": null, + "type": "int" + }, + { + "name": "iops_rd_max_length", + "default": null, + "type": "int" + }, + { + "name": "iops_wr_max_length", + "default": null, + "type": "int" + }, + { + "name": "iops_size", + "default": null, + "type": "int" + }, + { + "name": "group", + "default": null, + "type": "str" + }, + { + "name": "cache", + "type": "214" + }, + { + "name": "write_threshold", + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "21", + "members": [ + { + "name": "job-id", + "default": null, + "type": "str" + }, + { + "name": "device", + "type": "str" + }, + { + "name": "target", + "type": "str" + }, + { + "name": "format", + "default": null, + "type": "str" + }, + { + "name": "node-name", + "default": null, + "type": "str" + }, + { + "name": "replaces", + "default": null, + "type": "str" + }, + { + "name": "sync", + "type": "210" + }, + { + "name": "mode", + "default": null, + "type": "209" + }, + { + "name": "speed", + "default": null, + "type": "int" + }, + { + "name": "granularity", + "default": null, + "type": "int" + }, + { + "name": "buf-size", + "default": null, + "type": "int" + }, + { + "name": "on-source-error", + "default": null, + "type": "211" + }, + { + "name": "on-target-error", + "default": null, + "type": "211" + }, + { + "name": "unmap", + "default": null, + "type": "bool" + } + ], + "meta-type": "object" + }, + { + "name": "22", + "members": [ + { + "name": "node", + "type": "str" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "granularity", + "default": null, + "type": "int" + }, + { + "name": "persistent", + "default": null, + "type": "bool" + }, + { + "name": "autoload", + "default": null, + "type": "bool" + } + ], + "meta-type": "object" + }, + { + "name": "23", + "members": [ + { + "name": "node", + "type": "str" + }, + { + "name": "name", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "24", + "members": [ + { + "name": "sha256", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "25", + "members": [ + { + "name": "job-id", + "default": null, + "type": "str" + }, + { + "name": "device", + "type": "str" + }, + { + "name": "target", + "type": "str" + }, + { + "name": "replaces", + "default": null, + "type": "str" + }, + { + "name": "sync", + "type": "210" + }, + { + "name": "speed", + "default": null, + "type": "int" + }, + { + "name": "granularity", + "default": null, + "type": "int" + }, + { + "name": "buf-size", + "default": null, + "type": "int" + }, + { + "name": "on-source-error", + "default": null, + "type": "211" + }, + { + "name": "on-target-error", + "default": null, + "type": "211" + }, + { + "name": "filter-node-name", + "default": null, + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "26", + "members": [ + { + "name": "device", + "default": null, + "type": "str" + }, + { + "name": "id", + "default": null, + "type": "str" + }, + { + "name": "bps", + "type": "int" + }, + { + "name": "bps_rd", + "type": "int" + }, + { + "name": "bps_wr", + "type": "int" + }, + { + "name": "iops", + "type": "int" + }, + { + "name": "iops_rd", + "type": "int" + }, + { + "name": "iops_wr", + "type": "int" + }, + { + "name": "bps_max", + "default": null, + "type": "int" + }, + { + "name": "bps_rd_max", + "default": null, + "type": "int" + }, + { + "name": "bps_wr_max", + "default": null, + "type": "int" + }, + { + "name": "iops_max", + "default": null, + "type": "int" + }, + { + "name": "iops_rd_max", + "default": null, + "type": "int" + }, + { + "name": "iops_wr_max", + "default": null, + "type": "int" + }, + { + "name": "bps_max_length", + "default": null, + "type": "int" + }, + { + "name": "bps_rd_max_length", + "default": null, + "type": "int" + }, + { + "name": "bps_wr_max_length", + "default": null, + "type": "int" + }, + { + "name": "iops_max_length", + "default": null, + "type": "int" + }, + { + "name": "iops_rd_max_length", + "default": null, + "type": "int" + }, + { + "name": "iops_wr_max_length", + "default": null, + "type": "int" + }, + { + "name": "iops_size", + "default": null, + "type": "int" + }, + { + "name": "group", + "default": null, + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "27", + "members": [ + { + "name": "job-id", + "default": null, + "type": "str" + }, + { + "name": "device", + "type": "str" + }, + { + "name": "base", + "default": null, + "type": "str" + }, + { + "name": "base-node", + "default": null, + "type": "str" + }, + { + "name": "backing-file", + "default": null, + "type": "str" + }, + { + "name": "speed", + "default": null, + "type": "int" + }, + { + "name": "on-error", + "default": null, + "type": "211" + } + ], + "meta-type": "object" + }, + { + "name": "28", + "members": [ + { + "name": "device", + "type": "str" + }, + { + "name": "speed", + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "29", + "members": [ + { + "name": "device", + "type": "str" + }, + { + "name": "force", + "default": null, + "type": "bool" + } + ], + "meta-type": "object" + }, + { + "name": "30", + "members": [ + { + "name": "device", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "31", + "members": [ + { + "name": "device", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "32", + "members": [ + { + "name": "device", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "33", + "members": [ + { + "name": "id", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "34", + "members": [ + { + "name": "id", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "35", + "tag": "driver", + "variants": [ + { + "case": "blkdebug", + "type": "218" + }, + { + "case": "blkverify", + "type": "219" + }, + { + "case": "bochs", + "type": "220" + }, + { + "case": "cloop", + "type": "220" + }, + { + "case": "dmg", + "type": "220" + }, + { + "case": "file", + "type": "221" + }, + { + "case": "ftp", + "type": "222" + }, + { + "case": "ftps", + "type": "223" + }, + { + "case": "gluster", + "type": "224" + }, + { + "case": "host_cdrom", + "type": "221" + }, + { + "case": "host_device", + "type": "221" + }, + { + "case": "http", + "type": "225" + }, + { + "case": "https", + "type": "226" + }, + { + "case": "iscsi", + "type": "227" + }, + { + "case": "luks", + "type": "228" + }, + { + "case": "nbd", + "type": "229" + }, + { + "case": "nfs", + "type": "230" + }, + { + "case": "null-aio", + "type": "231" + }, + { + "case": "null-co", + "type": "231" + }, + { + "case": "nvme", + "type": "232" + }, + { + "case": "parallels", + "type": "220" + }, + { + "case": "qcow2", + "type": "233" + }, + { + "case": "qcow", + "type": "234" + }, + { + "case": "qed", + "type": "235" + }, + { + "case": "quorum", + "type": "236" + }, + { + "case": "raw", + "type": "237" + }, + { + "case": "rbd", + "type": "238" + }, + { + "case": "replication", + "type": "239" + }, + { + "case": "sheepdog", + "type": "240" + }, + { + "case": "ssh", + "type": "241" + }, + { + "case": "throttle", + "type": "242" + }, + { + "case": "vdi", + "type": "220" + }, + { + "case": "vhdx", + "type": "220" + }, + { + "case": "vmdk", + "type": "235" + }, + { + "case": "vpc", + "type": "220" + }, + { + "case": "vvfat", + "type": "243" + }, + { + "case": "vxhs", + "type": "244" + } + ], + "members": [ + { + "name": "driver", + "type": "215" + }, + { + "name": "node-name", + "default": null, + "type": "str" + }, + { + "name": "discard", + "default": null, + "type": "216" + }, + { + "name": "cache", + "default": null, + "type": "217" + }, + { + "name": "read-only", + "default": null, + "type": "bool" + }, + { + "name": "force-share", + "default": null, + "type": "bool" + }, + { + "name": "detect-zeroes", + "default": null, + "type": "212" + } + ], + "meta-type": "object" + }, + { + "name": "36", + "members": [ + { + "name": "node-name", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "37", + "tag": "driver", + "variants": [ + { + "case": "blkdebug", + "type": "245" + }, + { + "case": "blkverify", + "type": "245" + }, + { + "case": "bochs", + "type": "245" + }, + { + "case": "cloop", + "type": "245" + }, + { + "case": "dmg", + "type": "245" + }, + { + "case": "file", + "type": "246" + }, + { + "case": "ftp", + "type": "245" + }, + { + "case": "ftps", + "type": "245" + }, + { + "case": "gluster", + "type": "247" + }, + { + "case": "host_cdrom", + "type": "245" + }, + { + "case": "host_device", + "type": "245" + }, + { + "case": "http", + "type": "245" + }, + { + "case": "https", + "type": "245" + }, + { + "case": "iscsi", + "type": "245" + }, + { + "case": "luks", + "type": "248" + }, + { + "case": "nbd", + "type": "245" + }, + { + "case": "nfs", + "type": "249" + }, + { + "case": "null-aio", + "type": "245" + }, + { + "case": "null-co", + "type": "245" + }, + { + "case": "nvme", + "type": "245" + }, + { + "case": "parallels", + "type": "250" + }, + { + "case": "qcow", + "type": "251" + }, + { + "case": "qcow2", + "type": "252" + }, + { + "case": "qed", + "type": "253" + }, + { + "case": "quorum", + "type": "245" + }, + { + "case": "raw", + "type": "245" + }, + { + "case": "rbd", + "type": "254" + }, + { + "case": "replication", + "type": "245" + }, + { + "case": "sheepdog", + "type": "255" + }, + { + "case": "ssh", + "type": "256" + }, + { + "case": "throttle", + "type": "245" + }, + { + "case": "vdi", + "type": "257" + }, + { + "case": "vhdx", + "type": "258" + }, + { + "case": "vmdk", + "type": "245" + }, + { + "case": "vpc", + "type": "259" + }, + { + "case": "vvfat", + "type": "245" + }, + { + "case": "vxhs", + "type": "245" + } + ], + "members": [ + { + "name": "driver", + "type": "215" + } + ], + "meta-type": "object" + }, + { + "name": "38", + "members": [ + { + "name": "device", + "default": null, + "type": "str" + }, + { + "name": "id", + "default": null, + "type": "str" + }, + { + "name": "force", + "default": null, + "type": "bool" + } + ], + "meta-type": "object" + }, + { + "name": "39", + "members": [ + { + "name": "device", + "default": null, + "type": "str" + }, + { + "name": "id", + "default": null, + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "40", + "members": [ + { + "name": "id", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "41", + "members": [ + { + "name": "id", + "type": "str" + }, + { + "name": "node-name", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "42", + "members": [ + { + "name": "device", + "default": null, + "type": "str" + }, + { + "name": "id", + "default": null, + "type": "str" + }, + { + "name": "filename", + "type": "str" + }, + { + "name": "format", + "default": null, + "type": "str" + }, + { + "name": "read-only-mode", + "default": null, + "type": "260" + } + ], + "meta-type": "object" + }, + { + "name": "43", + "members": [ + { + "name": "device", + "type": "str" + }, + { + "name": "node-name", + "default": null, + "type": "str" + }, + { + "name": "msg", + "type": "str" + }, + { + "name": "offset", + "default": null, + "type": "int" + }, + { + "name": "size", + "default": null, + "type": "int" + }, + { + "name": "fatal", + "type": "bool" + } + ], + "meta-type": "object" + }, + { + "name": "44", + "members": [ + { + "name": "device", + "type": "str" + }, + { + "name": "node-name", + "default": null, + "type": "str" + }, + { + "name": "operation", + "type": "261" + }, + { + "name": "action", + "type": "262" + }, + { + "name": "nospace", + "default": null, + "type": "bool" + }, + { + "name": "reason", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "45", + "members": [ + { + "name": "type", + "type": "263" + }, + { + "name": "device", + "type": "str" + }, + { + "name": "len", + "type": "int" + }, + { + "name": "offset", + "type": "int" + }, + { + "name": "speed", + "type": "int" + }, + { + "name": "error", + "default": null, + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "46", + "members": [ + { + "name": "type", + "type": "263" + }, + { + "name": "device", + "type": "str" + }, + { + "name": "len", + "type": "int" + }, + { + "name": "offset", + "type": "int" + }, + { + "name": "speed", + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "47", + "members": [ + { + "name": "device", + "type": "str" + }, + { + "name": "operation", + "type": "261" + }, + { + "name": "action", + "type": "262" + } + ], + "meta-type": "object" + }, + { + "name": "48", + "members": [ + { + "name": "type", + "type": "263" + }, + { + "name": "device", + "type": "str" + }, + { + "name": "len", + "type": "int" + }, + { + "name": "offset", + "type": "int" + }, + { + "name": "speed", + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "49", + "members": [ + { + "name": "type", + "type": "263" + }, + { + "name": "id", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "50", + "members": [ + { + "name": "node-name", + "type": "str" + }, + { + "name": "amount-exceeded", + "type": "int" + }, + { + "name": "write-threshold", + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "51", + "members": [ + { + "name": "node-name", + "type": "str" + }, + { + "name": "write-threshold", + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "52", + "members": [ + { + "name": "parent", + "type": "str" + }, + { + "name": "child", + "default": null, + "type": "str" + }, + { + "name": "node", + "default": null, + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "53", + "members": [ + { + "name": "node-name", + "type": "str" + }, + { + "name": "iothread", + "type": "264" + }, + { + "name": "force", + "default": null, + "type": "bool" + } + ], + "meta-type": "object" + }, + { + "name": "54", + "members": [ + { + "name": "device", + "type": "str" + }, + { + "name": "name", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "55", + "members": [ + { + "name": "device", + "type": "str" + }, + { + "name": "id", + "default": null, + "type": "str" + }, + { + "name": "name", + "default": null, + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "56", + "members": [ + { + "name": "id", + "type": "str" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "vm-state-size", + "type": "int" + }, + { + "name": "date-sec", + "type": "int" + }, + { + "name": "date-nsec", + "type": "int" + }, + { + "name": "vm-clock-sec", + "type": "int" + }, + { + "name": "vm-clock-nsec", + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "57", + "members": [ + { + "name": "device", + "default": null, + "type": "str" + }, + { + "name": "id", + "default": null, + "type": "str" + }, + { + "name": "force", + "default": null, + "type": "bool" + } + ], + "meta-type": "object" + }, + { + "name": "58", + "members": [ + { + "name": "addr", + "type": "265" + }, + { + "name": "tls-creds", + "default": null, + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "59", + "members": [ + { + "name": "device", + "type": "str" + }, + { + "name": "name", + "default": null, + "type": "str" + }, + { + "name": "writable", + "default": null, + "type": "bool" + } + ], + "meta-type": "object" + }, + { + "name": "60", + "members": [ + { + "name": "name", + "type": "str" + }, + { + "name": "mode", + "default": null, + "type": "266" + } + ], + "meta-type": "object" + }, + { + "name": "61", + "members": [ + { + "name": "device", + "type": "str" + }, + { + "name": "id", + "type": "str" + }, + { + "name": "tray-open", + "type": "bool" + } + ], + "meta-type": "object" + }, + { + "name": "62", + "members": [ + { + "name": "reference", + "type": "str" + }, + { + "name": "sector-num", + "type": "int" + }, + { + "name": "sectors-count", + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "63", + "members": [ + { + "name": "type", + "type": "267" + }, + { + "name": "error", + "default": null, + "type": "str" + }, + { + "name": "node-name", + "type": "str" + }, + { + "name": "sector-num", + "type": "int" + }, + { + "name": "sectors-count", + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "[64]", + "element-type": "64", + "meta-type": "array" + }, + { + "name": "64", + "members": [ + { + "name": "label", + "type": "str" + }, + { + "name": "filename", + "type": "str" + }, + { + "name": "frontend-open", + "type": "bool" + } + ], + "meta-type": "object" + }, + { + "name": "[65]", + "element-type": "65", + "meta-type": "array" + }, + { + "name": "65", + "members": [ + { + "name": "name", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "66", + "members": [ + { + "name": "device", + "type": "str" + }, + { + "name": "data", + "type": "str" + }, + { + "name": "format", + "default": null, + "type": "268" + } + ], + "meta-type": "object" + }, + { + "name": "67", + "members": [ + { + "name": "device", + "type": "str" + }, + { + "name": "size", + "type": "int" + }, + { + "name": "format", + "default": null, + "type": "268" + } + ], + "meta-type": "object" + }, + { + "name": "str", + "json-type": "string", + "meta-type": "builtin" + }, + { + "name": "68", + "members": [ + { + "name": "id", + "type": "str" + }, + { + "name": "backend", + "type": "269" + } + ], + "meta-type": "object" + }, + { + "name": "69", + "members": [ + { + "name": "pty", + "default": null, + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "70", + "members": [ + { + "name": "id", + "type": "str" + }, + { + "name": "backend", + "type": "269" + } + ], + "meta-type": "object" + }, + { + "name": "71", + "members": [ + { + "name": "id", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "72", + "members": [ + { + "name": "id", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "73", + "members": [ + { + "name": "id", + "type": "str" + }, + { + "name": "open", + "type": "bool" + } + ], + "meta-type": "object" + }, + { + "name": "74", + "members": [ + { + "name": "name", + "type": "str" + }, + { + "name": "up", + "type": "bool" + } + ], + "meta-type": "object" + }, + { + "name": "75", + "members": [ + { + "name": "type", + "type": "str" + }, + { + "name": "id", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "76", + "members": [ + { + "name": "id", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "77", + "members": [ + { + "name": "name", + "default": null, + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "[78]", + "element-type": "78", + "meta-type": "array" + }, + { + "name": "78", + "members": [ + { + "name": "name", + "type": "str" + }, + { + "name": "promiscuous", + "type": "bool" + }, + { + "name": "multicast", + "type": "270" + }, + { + "name": "unicast", + "type": "270" + }, + { + "name": "vlan", + "type": "270" + }, + { + "name": "broadcast-allowed", + "type": "bool" + }, + { + "name": "multicast-overflow", + "type": "bool" + }, + { + "name": "unicast-overflow", + "type": "bool" + }, + { + "name": "main-mac", + "type": "str" + }, + { + "name": "vlan-table", + "type": "[int]" + }, + { + "name": "unicast-table", + "type": "[str]" + }, + { + "name": "multicast-table", + "type": "[str]" + } + ], + "meta-type": "object" + }, + { + "name": "79", + "members": [ + { + "name": "name", + "default": null, + "type": "str" + }, + { + "name": "path", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "80", + "members": [ + { + "name": "name", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "81", + "members": [ + { + "name": "name", + "type": "str" + }, + { + "name": "id", + "type": "int" + }, + { + "name": "ports", + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "82", + "members": [ + { + "name": "name", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "[83]", + "element-type": "83", + "meta-type": "array" + }, + { + "name": "83", + "members": [ + { + "name": "name", + "type": "str" + }, + { + "name": "enabled", + "type": "bool" + }, + { + "name": "link-up", + "type": "bool" + }, + { + "name": "speed", + "type": "int" + }, + { + "name": "duplex", + "type": "271" + }, + { + "name": "autoneg", + "type": "272" + } + ], + "meta-type": "object" + }, + { + "name": "84", + "members": [ + { + "name": "name", + "type": "str" + }, + { + "name": "tbl-id", + "default": null, + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "[85]", + "element-type": "85", + "meta-type": "array" + }, + { + "name": "85", + "members": [ + { + "name": "cookie", + "type": "int" + }, + { + "name": "hits", + "type": "int" + }, + { + "name": "key", + "type": "273" + }, + { + "name": "mask", + "type": "274" + }, + { + "name": "action", + "type": "275" + } + ], + "meta-type": "object" + }, + { + "name": "86", + "members": [ + { + "name": "name", + "type": "str" + }, + { + "name": "type", + "default": null, + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "[87]", + "element-type": "87", + "meta-type": "array" + }, + { + "name": "87", + "members": [ + { + "name": "id", + "type": "int" + }, + { + "name": "type", + "type": "int" + }, + { + "name": "vlan-id", + "default": null, + "type": "int" + }, + { + "name": "pport", + "default": null, + "type": "int" + }, + { + "name": "index", + "default": null, + "type": "int" + }, + { + "name": "out-pport", + "default": null, + "type": "int" + }, + { + "name": "group-id", + "default": null, + "type": "int" + }, + { + "name": "set-vlan-id", + "default": null, + "type": "int" + }, + { + "name": "pop-vlan", + "default": null, + "type": "int" + }, + { + "name": "group-ids", + "default": null, + "type": "[int]" + }, + { + "name": "set-eth-src", + "default": null, + "type": "str" + }, + { + "name": "set-eth-dst", + "default": null, + "type": "str" + }, + { + "name": "ttl-check", + "default": null, + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "[88]", + "element-type": "88", + "meta-type": "array" + }, + { + "name": "88", + "meta-type": "enum", + "values": [ + "tpm-tis", + "tpm-crb" + ] + }, + { + "name": "[89]", + "element-type": "89", + "meta-type": "array" + }, + { + "name": "89", + "meta-type": "enum", + "values": [ + "passthrough", + "emulator" + ] + }, + { + "name": "[90]", + "element-type": "90", + "meta-type": "array" + }, + { + "name": "90", + "members": [ + { + "name": "id", + "type": "str" + }, + { + "name": "model", + "type": "88" + }, + { + "name": "options", + "type": "276" + } + ], + "meta-type": "object" + }, + { + "name": "91", + "members": [ + { + "name": "protocol", + "type": "str" + }, + { + "name": "password", + "type": "str" + }, + { + "name": "connected", + "default": null, + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "92", + "members": [ + { + "name": "protocol", + "type": "str" + }, + { + "name": "time", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "93", + "members": [ + { + "name": "filename", + "type": "str" + }, + { + "name": "device", + "default": null, + "type": "str" + }, + { + "name": "head", + "default": null, + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "94", + "members": [ + { + "name": "enabled", + "type": "bool" + }, + { + "name": "migrated", + "type": "bool" + }, + { + "name": "host", + "default": null, + "type": "str" + }, + { + "name": "port", + "default": null, + "type": "int" + }, + { + "name": "tls-port", + "default": null, + "type": "int" + }, + { + "name": "auth", + "default": null, + "type": "str" + }, + { + "name": "compiled-version", + "default": null, + "type": "str" + }, + { + "name": "mouse-mode", + "type": "277" + }, + { + "name": "channels", + "default": null, + "type": "[278]" + } + ], + "meta-type": "object" + }, + { + "name": "95", + "members": [ + { + "name": "server", + "type": "279" + }, + { + "name": "client", + "type": "279" + } + ], + "meta-type": "object" + }, + { + "name": "96", + "members": [ + { + "name": "server", + "type": "280" + }, + { + "name": "client", + "type": "278" + } + ], + "meta-type": "object" + }, + { + "name": "97", + "members": [ + { + "name": "server", + "type": "279" + }, + { + "name": "client", + "type": "279" + } + ], + "meta-type": "object" + }, + { + "name": "98", + "members": [ + { + "name": "enabled", + "type": "bool" + }, + { + "name": "host", + "default": null, + "type": "str" + }, + { + "name": "family", + "default": null, + "type": "281" + }, + { + "name": "service", + "default": null, + "type": "str" + }, + { + "name": "auth", + "default": null, + "type": "str" + }, + { + "name": "clients", + "default": null, + "type": "[282]" + } + ], + "meta-type": "object" + }, + { + "name": "[99]", + "element-type": "99", + "meta-type": "array" + }, + { + "name": "99", + "members": [ + { + "name": "id", + "type": "str" + }, + { + "name": "server", + "type": "[283]" + }, + { + "name": "clients", + "type": "[282]" + }, + { + "name": "auth", + "type": "284" + }, + { + "name": "vencrypt", + "default": null, + "type": "285" + }, + { + "name": "display", + "default": null, + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "100", + "members": [ + { + "name": "password", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "101", + "members": [ + { + "name": "server", + "type": "286" + }, + { + "name": "client", + "type": "287" + } + ], + "meta-type": "object" + }, + { + "name": "102", + "members": [ + { + "name": "server", + "type": "286" + }, + { + "name": "client", + "type": "282" + } + ], + "meta-type": "object" + }, + { + "name": "103", + "members": [ + { + "name": "server", + "type": "286" + }, + { + "name": "client", + "type": "282" + } + ], + "meta-type": "object" + }, + { + "name": "[104]", + "element-type": "104", + "meta-type": "array" + }, + { + "name": "104", + "members": [ + { + "name": "name", + "type": "str" + }, + { + "name": "index", + "type": "int" + }, + { + "name": "current", + "type": "bool" + }, + { + "name": "absolute", + "type": "bool" + } + ], + "meta-type": "object" + }, + { + "name": "105", + "members": [ + { + "name": "keys", + "type": "[288]" + }, + { + "name": "hold-time", + "default": null, + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "106", + "members": [ + { + "name": "device", + "default": null, + "type": "str" + }, + { + "name": "head", + "default": null, + "type": "int" + }, + { + "name": "events", + "type": "[289]" + } + ], + "meta-type": "object" + }, + { + "name": "107", + "members": [ + { + "name": "status", + "default": null, + "type": "290" + }, + { + "name": "ram", + "default": null, + "type": "291" + }, + { + "name": "disk", + "default": null, + "type": "291" + }, + { + "name": "xbzrle-cache", + "default": null, + "type": "292" + }, + { + "name": "total-time", + "default": null, + "type": "int" + }, + { + "name": "expected-downtime", + "default": null, + "type": "int" + }, + { + "name": "downtime", + "default": null, + "type": "int" + }, + { + "name": "setup-time", + "default": null, + "type": "int" + }, + { + "name": "cpu-throttle-percentage", + "default": null, + "type": "int" + }, + { + "name": "error-desc", + "default": null, + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "108", + "members": [ + { + "name": "capabilities", + "type": "[109]" + } + ], + "meta-type": "object" + }, + { + "name": "[109]", + "element-type": "109", + "meta-type": "array" + }, + { + "name": "109", + "members": [ + { + "name": "capability", + "type": "293" + }, + { + "name": "state", + "type": "bool" + } + ], + "meta-type": "object" + }, + { + "name": "110", + "members": [ + { + "name": "compress-level", + "default": null, + "type": "int" + }, + { + "name": "compress-threads", + "default": null, + "type": "int" + }, + { + "name": "decompress-threads", + "default": null, + "type": "int" + }, + { + "name": "cpu-throttle-initial", + "default": null, + "type": "int" + }, + { + "name": "cpu-throttle-increment", + "default": null, + "type": "int" + }, + { + "name": "tls-creds", + "default": null, + "type": "264" + }, + { + "name": "tls-hostname", + "default": null, + "type": "264" + }, + { + "name": "max-bandwidth", + "default": null, + "type": "int" + }, + { + "name": "downtime-limit", + "default": null, + "type": "int" + }, + { + "name": "x-checkpoint-delay", + "default": null, + "type": "int" + }, + { + "name": "block-incremental", + "default": null, + "type": "bool" + }, + { + "name": "x-multifd-channels", + "default": null, + "type": "int" + }, + { + "name": "x-multifd-page-count", + "default": null, + "type": "int" + }, + { + "name": "xbzrle-cache-size", + "default": null, + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "111", + "members": [ + { + "name": "compress-level", + "default": null, + "type": "int" + }, + { + "name": "compress-threads", + "default": null, + "type": "int" + }, + { + "name": "decompress-threads", + "default": null, + "type": "int" + }, + { + "name": "cpu-throttle-initial", + "default": null, + "type": "int" + }, + { + "name": "cpu-throttle-increment", + "default": null, + "type": "int" + }, + { + "name": "tls-creds", + "default": null, + "type": "str" + }, + { + "name": "tls-hostname", + "default": null, + "type": "str" + }, + { + "name": "max-bandwidth", + "default": null, + "type": "int" + }, + { + "name": "downtime-limit", + "default": null, + "type": "int" + }, + { + "name": "x-checkpoint-delay", + "default": null, + "type": "int" + }, + { + "name": "block-incremental", + "default": null, + "type": "bool" + }, + { + "name": "x-multifd-channels", + "default": null, + "type": "int" + }, + { + "name": "x-multifd-page-count", + "default": null, + "type": "int" + }, + { + "name": "xbzrle-cache-size", + "default": null, + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "112", + "members": [ + { + "name": "protocol", + "type": "str" + }, + { + "name": "hostname", + "type": "str" + }, + { + "name": "port", + "default": null, + "type": "int" + }, + { + "name": "tls-port", + "default": null, + "type": "int" + }, + { + "name": "cert-subject", + "default": null, + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "113", + "members": [ + { + "name": "status", + "type": "290" + } + ], + "meta-type": "object" + }, + { + "name": "114", + "members": [ + { + "name": "pass", + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "115", + "members": [ + { + "name": "state", + "type": "290" + } + ], + "meta-type": "object" + }, + { + "name": "116", + "members": [ + { + "name": "value", + "type": "number" + } + ], + "meta-type": "object" + }, + { + "name": "117", + "members": [ + { + "name": "value", + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "118", + "members": [ + { + "name": "value", + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "int", + "json-type": "int", + "meta-type": "builtin" + }, + { + "name": "119", + "members": [ + { + "name": "uri", + "type": "str" + }, + { + "name": "blk", + "default": null, + "type": "bool" + }, + { + "name": "inc", + "default": null, + "type": "bool" + }, + { + "name": "detach", + "default": null, + "type": "bool" + } + ], + "meta-type": "object" + }, + { + "name": "120", + "members": [ + { + "name": "uri", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "121", + "members": [ + { + "name": "filename", + "type": "str" + }, + { + "name": "live", + "default": null, + "type": "bool" + } + ], + "meta-type": "object" + }, + { + "name": "122", + "members": [ + { + "name": "enable", + "type": "bool" + }, + { + "name": "primary", + "type": "bool" + }, + { + "name": "failover", + "default": null, + "type": "bool" + } + ], + "meta-type": "object" + }, + { + "name": "123", + "members": [ + { + "name": "error", + "type": "bool" + }, + { + "name": "desc", + "default": null, + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "124", + "members": [ + { + "name": "actions", + "type": "[294]" + }, + { + "name": "properties", + "default": null, + "type": "295" + } + ], + "meta-type": "object" + }, + { + "name": "125", + "members": [ + { + "name": "name", + "type": "str" + }, + { + "name": "vcpu", + "default": null, + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "[126]", + "element-type": "126", + "meta-type": "array" + }, + { + "name": "126", + "members": [ + { + "name": "name", + "type": "str" + }, + { + "name": "state", + "type": "296" + }, + { + "name": "vcpu", + "type": "bool" + } + ], + "meta-type": "object" + }, + { + "name": "127", + "members": [ + { + "name": "name", + "type": "str" + }, + { + "name": "enable", + "type": "bool" + }, + { + "name": "ignore-unavailable", + "default": null, + "type": "bool" + }, + { + "name": "vcpu", + "default": null, + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "[128]", + "element-type": "128", + "meta-type": "array" + }, + { + "name": "128", + "tag": "meta-type", + "variants": [ + { + "case": "builtin", + "type": "298" + }, + { + "case": "enum", + "type": "299" + }, + { + "case": "array", + "type": "300" + }, + { + "case": "object", + "type": "301" + }, + { + "case": "alternate", + "type": "302" + }, + { + "case": "command", + "type": "303" + }, + { + "case": "event", + "type": "304" + } + ], + "members": [ + { + "name": "name", + "type": "str" + }, + { + "name": "meta-type", + "type": "297" + } + ], + "meta-type": "object" + }, + { + "name": "129", + "members": [ + { + "name": "enable", + "default": null, + "type": "[305]" + } + ], + "meta-type": "object" + }, + { + "name": "130", + "members": [ + { + "name": "qemu", + "type": "306" + }, + { + "name": "package", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "[131]", + "element-type": "131", + "meta-type": "array" + }, + { + "name": "131", + "members": [ + { + "name": "name", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "132", + "members": [ + { + "name": "protocol", + "type": "str" + }, + { + "name": "fdname", + "type": "str" + }, + { + "name": "skipauth", + "default": null, + "type": "bool" + }, + { + "name": "tls", + "default": null, + "type": "bool" + } + ], + "meta-type": "object" + }, + { + "name": "133", + "members": [ + { + "name": "name", + "default": null, + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "134", + "members": [ + { + "name": "enabled", + "type": "bool" + }, + { + "name": "present", + "type": "bool" + } + ], + "meta-type": "object" + }, + { + "name": "135", + "members": [ + { + "name": "UUID", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "[136]", + "element-type": "136", + "meta-type": "array" + }, + { + "name": "136", + "members": [ + { + "name": "name", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "[137]", + "element-type": "137", + "meta-type": "array" + }, + { + "name": "137", + "tag": "arch", + "variants": [ + { + "case": "x86", + "type": "309" + }, + { + "case": "sparc", + "type": "310" + }, + { + "case": "ppc", + "type": "311" + }, + { + "case": "mips", + "type": "312" + }, + { + "case": "tricore", + "type": "313" + }, + { + "case": "s390", + "type": "314" + }, + { + "case": "riscv", + "type": "315" + }, + { + "case": "other", + "type": "316" + } + ], + "members": [ + { + "name": "CPU", + "type": "int" + }, + { + "name": "current", + "type": "bool" + }, + { + "name": "halted", + "type": "bool" + }, + { + "name": "qom_path", + "type": "str" + }, + { + "name": "thread_id", + "type": "int" + }, + { + "name": "props", + "default": null, + "type": "307" + }, + { + "name": "arch", + "type": "308" + } + ], + "meta-type": "object" + }, + { + "name": "[138]", + "element-type": "138", + "meta-type": "array" + }, + { + "name": "138", + "tag": "arch", + "variants": [ + { + "case": "x86", + "type": "316" + }, + { + "case": "sparc", + "type": "316" + }, + { + "case": "ppc", + "type": "316" + }, + { + "case": "mips", + "type": "316" + }, + { + "case": "tricore", + "type": "316" + }, + { + "case": "s390", + "type": "314" + }, + { + "case": "riscv", + "type": "315" + }, + { + "case": "other", + "type": "316" + } + ], + "members": [ + { + "name": "cpu-index", + "type": "int" + }, + { + "name": "qom-path", + "type": "str" + }, + { + "name": "thread-id", + "type": "int" + }, + { + "name": "props", + "default": null, + "type": "307" + }, + { + "name": "arch", + "type": "308" + } + ], + "meta-type": "object" + }, + { + "name": "[139]", + "element-type": "139", + "meta-type": "array" + }, + { + "name": "139", + "members": [ + { + "name": "id", + "type": "str" + }, + { + "name": "thread-id", + "type": "int" + }, + { + "name": "poll-max-ns", + "type": "int" + }, + { + "name": "poll-grow", + "type": "int" + }, + { + "name": "poll-shrink", + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "140", + "members": [ + { + "name": "actual", + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "141", + "members": [ + { + "name": "actual", + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "[142]", + "element-type": "142", + "meta-type": "array" + }, + { + "name": "142", + "members": [ + { + "name": "bus", + "type": "int" + }, + { + "name": "devices", + "type": "[317]" + } + ], + "meta-type": "object" + }, + { + "name": "143", + "members": [ + { + "name": "id", + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "144", + "members": [ + { + "name": "val", + "type": "int" + }, + { + "name": "size", + "type": "int" + }, + { + "name": "filename", + "type": "str" + }, + { + "name": "cpu-index", + "default": null, + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "145", + "members": [ + { + "name": "val", + "type": "int" + }, + { + "name": "size", + "type": "int" + }, + { + "name": "filename", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "146", + "members": [ + { + "name": "value", + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "147", + "members": [ + { + "name": "command-line", + "type": "str" + }, + { + "name": "cpu-index", + "default": null, + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "148", + "members": [ + { + "name": "path", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "[149]", + "element-type": "149", + "meta-type": "array" + }, + { + "name": "149", + "members": [ + { + "name": "name", + "type": "str" + }, + { + "name": "type", + "type": "str" + }, + { + "name": "description", + "default": null, + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "150", + "members": [ + { + "name": "path", + "type": "str" + }, + { + "name": "property", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "any", + "json-type": "value", + "meta-type": "builtin" + }, + { + "name": "151", + "members": [ + { + "name": "path", + "type": "str" + }, + { + "name": "property", + "type": "str" + }, + { + "name": "value", + "type": "any" + } + ], + "meta-type": "object" + }, + { + "name": "152", + "members": [ + { + "name": "device", + "type": "str" + }, + { + "name": "target", + "type": "str" + }, + { + "name": "arg", + "default": null, + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "153", + "members": [ + { + "name": "implements", + "default": null, + "type": "str" + }, + { + "name": "abstract", + "default": null, + "type": "bool" + } + ], + "meta-type": "object" + }, + { + "name": "[154]", + "element-type": "154", + "meta-type": "array" + }, + { + "name": "154", + "members": [ + { + "name": "name", + "type": "str" + }, + { + "name": "abstract", + "default": null, + "type": "bool" + }, + { + "name": "parent", + "default": null, + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "155", + "members": [ + { + "name": "typename", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "156", + "members": [ + { + "name": "typename", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "157", + "members": [ + { + "name": "enable", + "type": "bool" + } + ], + "meta-type": "object" + }, + { + "name": "158", + "members": [ + { + "name": "driver", + "type": "str" + }, + { + "name": "bus", + "default": null, + "type": "str" + }, + { + "name": "id", + "default": null, + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "159", + "members": [ + { + "name": "id", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "160", + "members": [ + { + "name": "device", + "default": null, + "type": "str" + }, + { + "name": "path", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "161", + "members": [ + { + "name": "paging", + "type": "bool" + }, + { + "name": "protocol", + "type": "str" + }, + { + "name": "detach", + "default": null, + "type": "bool" + }, + { + "name": "begin", + "default": null, + "type": "int" + }, + { + "name": "length", + "default": null, + "type": "int" + }, + { + "name": "format", + "default": null, + "type": "318" + } + ], + "meta-type": "object" + }, + { + "name": "162", + "members": [ + { + "name": "status", + "type": "319" + }, + { + "name": "completed", + "type": "int" + }, + { + "name": "total", + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "163", + "members": [ + { + "name": "result", + "type": "162" + }, + { + "name": "error", + "default": null, + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "164", + "members": [ + { + "name": "formats", + "type": "[318]" + } + ], + "meta-type": "object" + }, + { + "name": "165", + "members": [ + { + "name": "filename", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "166", + "members": [ + { + "name": "qom-type", + "type": "str" + }, + { + "name": "id", + "type": "str" + }, + { + "name": "props", + "default": null, + "type": "any" + } + ], + "meta-type": "object" + }, + { + "name": "167", + "members": [ + { + "name": "id", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "168", + "members": [ + { + "name": "fdname", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "169", + "members": [ + { + "name": "fdname", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "[170]", + "element-type": "170", + "meta-type": "array" + }, + { + "name": "170", + "members": [ + { + "name": "name", + "type": "str" + }, + { + "name": "alias", + "default": null, + "type": "str" + }, + { + "name": "is-default", + "default": null, + "type": "bool" + }, + { + "name": "cpu-max", + "type": "int" + }, + { + "name": "hotpluggable-cpus", + "type": "bool" + } + ], + "meta-type": "object" + }, + { + "name": "171", + "members": [ + { + "name": "base-memory", + "type": "int" + }, + { + "name": "plugged-memory", + "default": null, + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "[172]", + "element-type": "172", + "meta-type": "array" + }, + { + "name": "172", + "members": [ + { + "name": "name", + "type": "str" + }, + { + "name": "migration-safe", + "default": null, + "type": "bool" + }, + { + "name": "static", + "type": "bool" + }, + { + "name": "unavailable-features", + "default": null, + "type": "[str]" + }, + { + "name": "typename", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "173", + "members": [ + { + "name": "type", + "type": "320" + }, + { + "name": "model", + "type": "321" + } + ], + "meta-type": "object" + }, + { + "name": "174", + "members": [ + { + "name": "model", + "type": "321" + } + ], + "meta-type": "object" + }, + { + "name": "175", + "members": [ + { + "name": "modela", + "type": "321" + }, + { + "name": "modelb", + "type": "321" + } + ], + "meta-type": "object" + }, + { + "name": "176", + "members": [ + { + "name": "result", + "type": "322" + }, + { + "name": "responsible-properties", + "type": "[str]" + } + ], + "meta-type": "object" + }, + { + "name": "177", + "members": [ + { + "name": "modela", + "type": "321" + }, + { + "name": "modelb", + "type": "321" + } + ], + "meta-type": "object" + }, + { + "name": "178", + "members": [ + { + "name": "model", + "type": "321" + } + ], + "meta-type": "object" + }, + { + "name": "179", + "members": [ + { + "name": "fdset-id", + "default": null, + "type": "int" + }, + { + "name": "opaque", + "default": null, + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "180", + "members": [ + { + "name": "fdset-id", + "type": "int" + }, + { + "name": "fd", + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "181", + "members": [ + { + "name": "fdset-id", + "type": "int" + }, + { + "name": "fd", + "default": null, + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "[182]", + "element-type": "182", + "meta-type": "array" + }, + { + "name": "182", + "members": [ + { + "name": "fdset-id", + "type": "int" + }, + { + "name": "fds", + "type": "[323]" + } + ], + "meta-type": "object" + }, + { + "name": "183", + "members": [ + { + "name": "arch", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "184", + "members": [ + { + "name": "option", + "default": null, + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "[185]", + "element-type": "185", + "meta-type": "array" + }, + { + "name": "185", + "members": [ + { + "name": "option", + "type": "str" + }, + { + "name": "parameters", + "type": "[324]" + } + ], + "meta-type": "object" + }, + { + "name": "[186]", + "element-type": "186", + "meta-type": "array" + }, + { + "name": "186", + "members": [ + { + "name": "id", + "default": null, + "type": "str" + }, + { + "name": "size", + "type": "int" + }, + { + "name": "merge", + "type": "bool" + }, + { + "name": "dump", + "type": "bool" + }, + { + "name": "prealloc", + "type": "bool" + }, + { + "name": "host-nodes", + "type": "[int]" + }, + { + "name": "policy", + "type": "325" + } + ], + "meta-type": "object" + }, + { + "name": "[187]", + "element-type": "187", + "meta-type": "array" + }, + { + "name": "187", + "tag": "type", + "variants": [ + { + "case": "dimm", + "type": "327" + }, + { + "case": "nvdimm", + "type": "327" + } + ], + "members": [ + { + "name": "type", + "type": "326" + } + ], + "meta-type": "object" + }, + { + "name": "188", + "members": [ + { + "name": "device", + "type": "str" + }, + { + "name": "msg", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "[189]", + "element-type": "189", + "meta-type": "array" + }, + { + "name": "189", + "members": [ + { + "name": "device", + "default": null, + "type": "str" + }, + { + "name": "slot", + "type": "str" + }, + { + "name": "slot-type", + "type": "328" + }, + { + "name": "source", + "type": "int" + }, + { + "name": "status", + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "190", + "members": [ + { + "name": "info", + "type": "189" + } + ], + "meta-type": "object" + }, + { + "name": "191", + "members": [ + { + "name": "offset", + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "192", + "members": [ + { + "name": "filename", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "[193]", + "element-type": "193", + "meta-type": "array" + }, + { + "name": "193", + "members": [ + { + "name": "version", + "type": "int" + }, + { + "name": "emulated", + "type": "bool" + }, + { + "name": "kernel", + "type": "bool" + } + ], + "meta-type": "object" + }, + { + "name": "[194]", + "element-type": "194", + "meta-type": "array" + }, + { + "name": "194", + "members": [ + { + "name": "type", + "type": "str" + }, + { + "name": "vcpus-count", + "type": "int" + }, + { + "name": "props", + "type": "307" + }, + { + "name": "qom-path", + "default": null, + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "195", + "members": [ + { + "name": "guid", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "196", + "members": [ + { + "name": "enabled", + "type": "bool" + }, + { + "name": "api-major", + "type": "int" + }, + { + "name": "api-minor", + "type": "int" + }, + { + "name": "build-id", + "type": "int" + }, + { + "name": "policy", + "type": "int" + }, + { + "name": "state", + "type": "329" + }, + { + "name": "handle", + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "197", + "members": [ + { + "name": "data", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "198", + "members": [ + { + "name": "pdh", + "type": "str" + }, + { + "name": "cert-chain", + "type": "str" + }, + { + "name": "cbitpos", + "type": "int" + }, + { + "name": "reduced-phys-bits", + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "199", + "members": [ + { + "name": "id", + "type": "any" + }, + { + "name": "reason", + "type": "330" + } + ], + "meta-type": "object" + }, + { + "name": "200", + "members": [ + { + "name": "lock", + "type": "bool" + } + ], + "meta-type": "object" + }, + { + "name": "bool", + "json-type": "boolean", + "meta-type": "builtin" + }, + { + "name": "201", + "meta-type": "enum", + "values": [ + "debug", + "inmigrate", + "internal-error", + "io-error", + "paused", + "postmigrate", + "prelaunch", + "finish-migrate", + "restore-vm", + "running", + "save-vm", + "shutdown", + "suspended", + "watchdog", + "guest-panicked", + "colo" + ] + }, + { + "name": "202", + "meta-type": "enum", + "values": [ + "reset", + "shutdown", + "poweroff", + "pause", + "debug", + "none", + "inject-nmi" + ] + }, + { + "name": "203", + "meta-type": "enum", + "values": [ + "pause", + "poweroff" + ] + }, + { + "name": "204", + "tag": "type", + "variants": [ + { + "case": "hyper-v", + "type": "332" + }, + { + "case": "s390", + "type": "333" + } + ], + "members": [ + { + "name": "type", + "type": "331" + } + ], + "meta-type": "object" + }, + { + "name": "[int]", + "element-type": "int", + "meta-type": "array" + }, + { + "name": "205", + "meta-type": "enum", + "values": [ + "ok", + "failed", + "nospace" + ] + }, + { + "name": "[206]", + "element-type": "206", + "meta-type": "array" + }, + { + "name": "206", + "members": [ + { + "name": "name", + "default": null, + "type": "str" + }, + { + "name": "count", + "type": "int" + }, + { + "name": "granularity", + "type": "int" + }, + { + "name": "status", + "type": "334" + } + ], + "meta-type": "object" + }, + { + "name": "207", + "members": [ + { + "name": "rd_bytes", + "type": "int" + }, + { + "name": "wr_bytes", + "type": "int" + }, + { + "name": "rd_operations", + "type": "int" + }, + { + "name": "wr_operations", + "type": "int" + }, + { + "name": "flush_operations", + "type": "int" + }, + { + "name": "flush_total_time_ns", + "type": "int" + }, + { + "name": "wr_total_time_ns", + "type": "int" + }, + { + "name": "rd_total_time_ns", + "type": "int" + }, + { + "name": "wr_highest_offset", + "type": "int" + }, + { + "name": "rd_merged", + "type": "int" + }, + { + "name": "wr_merged", + "type": "int" + }, + { + "name": "idle_time_ns", + "default": null, + "type": "int" + }, + { + "name": "failed_rd_operations", + "type": "int" + }, + { + "name": "failed_wr_operations", + "type": "int" + }, + { + "name": "failed_flush_operations", + "type": "int" + }, + { + "name": "invalid_rd_operations", + "type": "int" + }, + { + "name": "invalid_wr_operations", + "type": "int" + }, + { + "name": "invalid_flush_operations", + "type": "int" + }, + { + "name": "account_invalid", + "type": "bool" + }, + { + "name": "account_failed", + "type": "bool" + }, + { + "name": "timed_stats", + "type": "[335]" + }, + { + "name": "x_rd_latency_histogram", + "default": null, + "type": "336" + }, + { + "name": "x_wr_latency_histogram", + "default": null, + "type": "336" + }, + { + "name": "x_flush_latency_histogram", + "default": null, + "type": "336" + } + ], + "meta-type": "object" + }, + { + "name": "208", + "meta-type": "enum", + "values": [ + "undefined", + "created", + "running", + "paused", + "ready", + "standby", + "waiting", + "pending", + "aborting", + "concluded", + "null" + ] + }, + { + "name": "209", + "meta-type": "enum", + "values": [ + "existing", + "absolute-paths" + ] + }, + { + "name": "210", + "meta-type": "enum", + "values": [ + "top", + "full", + "none", + "incremental" + ] + }, + { + "name": "211", + "meta-type": "enum", + "values": [ + "report", + "ignore", + "enospc", + "stop", + "auto" + ] + }, + { + "name": "212", + "meta-type": "enum", + "values": [ + "off", + "on", + "unmap" + ] + }, + { + "name": "213", + "members": [ + { + "name": "filename", + "type": "str" + }, + { + "name": "format", + "type": "str" + }, + { + "name": "dirty-flag", + "default": null, + "type": "bool" + }, + { + "name": "actual-size", + "default": null, + "type": "int" + }, + { + "name": "virtual-size", + "type": "int" + }, + { + "name": "cluster-size", + "default": null, + "type": "int" + }, + { + "name": "encrypted", + "default": null, + "type": "bool" + }, + { + "name": "compressed", + "default": null, + "type": "bool" + }, + { + "name": "backing-filename", + "default": null, + "type": "str" + }, + { + "name": "full-backing-filename", + "default": null, + "type": "str" + }, + { + "name": "backing-filename-format", + "default": null, + "type": "str" + }, + { + "name": "snapshots", + "default": null, + "type": "[56]" + }, + { + "name": "backing-image", + "default": null, + "type": "213" + }, + { + "name": "format-specific", + "default": null, + "type": "337" + } + ], + "meta-type": "object" + }, + { + "name": "214", + "members": [ + { + "name": "writeback", + "type": "bool" + }, + { + "name": "direct", + "type": "bool" + }, + { + "name": "no-flush", + "type": "bool" + } + ], + "meta-type": "object" + }, + { + "name": "215", + "meta-type": "enum", + "values": [ + "blkdebug", + "blkverify", + "bochs", + "cloop", + "dmg", + "file", + "ftp", + "ftps", + "gluster", + "host_cdrom", + "host_device", + "http", + "https", + "iscsi", + "luks", + "nbd", + "nfs", + "null-aio", + "null-co", + "nvme", + "parallels", + "qcow", + "qcow2", + "qed", + "quorum", + "raw", + "rbd", + "replication", + "sheepdog", + "ssh", + "throttle", + "vdi", + "vhdx", + "vmdk", + "vpc", + "vvfat", + "vxhs" + ] + }, + { + "name": "216", + "meta-type": "enum", + "values": [ + "ignore", + "unmap" + ] + }, + { + "name": "217", + "members": [ + { + "name": "direct", + "default": null, + "type": "bool" + }, + { + "name": "no-flush", + "default": null, + "type": "bool" + } + ], + "meta-type": "object" + }, + { + "name": "218", + "members": [ + { + "name": "image", + "type": "338" + }, + { + "name": "config", + "default": null, + "type": "str" + }, + { + "name": "align", + "default": null, + "type": "int" + }, + { + "name": "max-transfer", + "default": null, + "type": "int" + }, + { + "name": "opt-write-zero", + "default": null, + "type": "int" + }, + { + "name": "max-write-zero", + "default": null, + "type": "int" + }, + { + "name": "opt-discard", + "default": null, + "type": "int" + }, + { + "name": "max-discard", + "default": null, + "type": "int" + }, + { + "name": "inject-error", + "default": null, + "type": "[339]" + }, + { + "name": "set-state", + "default": null, + "type": "[340]" + } + ], + "meta-type": "object" + }, + { + "name": "219", + "members": [ + { + "name": "test", + "type": "338" + }, + { + "name": "raw", + "type": "338" + } + ], + "meta-type": "object" + }, + { + "name": "220", + "members": [ + { + "name": "file", + "type": "338" + } + ], + "meta-type": "object" + }, + { + "name": "221", + "members": [ + { + "name": "filename", + "type": "str" + }, + { + "name": "pr-manager", + "default": null, + "type": "str" + }, + { + "name": "locking", + "default": null, + "type": "341" + }, + { + "name": "aio", + "default": null, + "type": "342" + } + ], + "meta-type": "object" + }, + { + "name": "222", + "members": [ + { + "name": "url", + "type": "str" + }, + { + "name": "readahead", + "default": null, + "type": "int" + }, + { + "name": "timeout", + "default": null, + "type": "int" + }, + { + "name": "username", + "default": null, + "type": "str" + }, + { + "name": "password-secret", + "default": null, + "type": "str" + }, + { + "name": "proxy-username", + "default": null, + "type": "str" + }, + { + "name": "proxy-password-secret", + "default": null, + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "223", + "members": [ + { + "name": "url", + "type": "str" + }, + { + "name": "readahead", + "default": null, + "type": "int" + }, + { + "name": "timeout", + "default": null, + "type": "int" + }, + { + "name": "username", + "default": null, + "type": "str" + }, + { + "name": "password-secret", + "default": null, + "type": "str" + }, + { + "name": "proxy-username", + "default": null, + "type": "str" + }, + { + "name": "proxy-password-secret", + "default": null, + "type": "str" + }, + { + "name": "sslverify", + "default": null, + "type": "bool" + } + ], + "meta-type": "object" + }, + { + "name": "224", + "members": [ + { + "name": "volume", + "type": "str" + }, + { + "name": "path", + "type": "str" + }, + { + "name": "server", + "type": "[343]" + }, + { + "name": "debug", + "default": null, + "type": "int" + }, + { + "name": "logfile", + "default": null, + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "225", + "members": [ + { + "name": "url", + "type": "str" + }, + { + "name": "readahead", + "default": null, + "type": "int" + }, + { + "name": "timeout", + "default": null, + "type": "int" + }, + { + "name": "username", + "default": null, + "type": "str" + }, + { + "name": "password-secret", + "default": null, + "type": "str" + }, + { + "name": "proxy-username", + "default": null, + "type": "str" + }, + { + "name": "proxy-password-secret", + "default": null, + "type": "str" + }, + { + "name": "cookie", + "default": null, + "type": "str" + }, + { + "name": "cookie-secret", + "default": null, + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "226", + "members": [ + { + "name": "url", + "type": "str" + }, + { + "name": "readahead", + "default": null, + "type": "int" + }, + { + "name": "timeout", + "default": null, + "type": "int" + }, + { + "name": "username", + "default": null, + "type": "str" + }, + { + "name": "password-secret", + "default": null, + "type": "str" + }, + { + "name": "proxy-username", + "default": null, + "type": "str" + }, + { + "name": "proxy-password-secret", + "default": null, + "type": "str" + }, + { + "name": "cookie", + "default": null, + "type": "str" + }, + { + "name": "sslverify", + "default": null, + "type": "bool" + }, + { + "name": "cookie-secret", + "default": null, + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "227", + "members": [ + { + "name": "transport", + "type": "344" + }, + { + "name": "portal", + "type": "str" + }, + { + "name": "target", + "type": "str" + }, + { + "name": "lun", + "default": null, + "type": "int" + }, + { + "name": "user", + "default": null, + "type": "str" + }, + { + "name": "password-secret", + "default": null, + "type": "str" + }, + { + "name": "initiator-name", + "default": null, + "type": "str" + }, + { + "name": "header-digest", + "default": null, + "type": "345" + }, + { + "name": "timeout", + "default": null, + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "228", + "members": [ + { + "name": "file", + "type": "338" + }, + { + "name": "key-secret", + "default": null, + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "229", + "members": [ + { + "name": "server", + "type": "343" + }, + { + "name": "export", + "default": null, + "type": "str" + }, + { + "name": "tls-creds", + "default": null, + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "230", + "members": [ + { + "name": "server", + "type": "346" + }, + { + "name": "path", + "type": "str" + }, + { + "name": "user", + "default": null, + "type": "int" + }, + { + "name": "group", + "default": null, + "type": "int" + }, + { + "name": "tcp-syn-count", + "default": null, + "type": "int" + }, + { + "name": "readahead-size", + "default": null, + "type": "int" + }, + { + "name": "page-cache-size", + "default": null, + "type": "int" + }, + { + "name": "debug", + "default": null, + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "231", + "members": [ + { + "name": "size", + "default": null, + "type": "int" + }, + { + "name": "latency-ns", + "default": null, + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "232", + "members": [ + { + "name": "device", + "type": "str" + }, + { + "name": "namespace", + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "233", + "members": [ + { + "name": "file", + "type": "338" + }, + { + "name": "backing", + "default": null, + "type": "347" + }, + { + "name": "lazy-refcounts", + "default": null, + "type": "bool" + }, + { + "name": "pass-discard-request", + "default": null, + "type": "bool" + }, + { + "name": "pass-discard-snapshot", + "default": null, + "type": "bool" + }, + { + "name": "pass-discard-other", + "default": null, + "type": "bool" + }, + { + "name": "overlap-check", + "default": null, + "type": "348" + }, + { + "name": "cache-size", + "default": null, + "type": "int" + }, + { + "name": "l2-cache-size", + "default": null, + "type": "int" + }, + { + "name": "l2-cache-entry-size", + "default": null, + "type": "int" + }, + { + "name": "refcount-cache-size", + "default": null, + "type": "int" + }, + { + "name": "cache-clean-interval", + "default": null, + "type": "int" + }, + { + "name": "encrypt", + "default": null, + "type": "349" + } + ], + "meta-type": "object" + }, + { + "name": "234", + "members": [ + { + "name": "file", + "type": "338" + }, + { + "name": "backing", + "default": null, + "type": "347" + }, + { + "name": "encrypt", + "default": null, + "type": "350" + } + ], + "meta-type": "object" + }, + { + "name": "235", + "members": [ + { + "name": "file", + "type": "338" + }, + { + "name": "backing", + "default": null, + "type": "347" + } + ], + "meta-type": "object" + }, + { + "name": "236", + "members": [ + { + "name": "blkverify", + "default": null, + "type": "bool" + }, + { + "name": "children", + "type": "[338]" + }, + { + "name": "vote-threshold", + "type": "int" + }, + { + "name": "rewrite-corrupted", + "default": null, + "type": "bool" + }, + { + "name": "read-pattern", + "default": null, + "type": "351" + } + ], + "meta-type": "object" + }, + { + "name": "237", + "members": [ + { + "name": "file", + "type": "338" + }, + { + "name": "offset", + "default": null, + "type": "int" + }, + { + "name": "size", + "default": null, + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "238", + "members": [ + { + "name": "pool", + "type": "str" + }, + { + "name": "image", + "type": "str" + }, + { + "name": "conf", + "default": null, + "type": "str" + }, + { + "name": "snapshot", + "default": null, + "type": "str" + }, + { + "name": "user", + "default": null, + "type": "str" + }, + { + "name": "server", + "default": null, + "type": "[352]" + } + ], + "meta-type": "object" + }, + { + "name": "239", + "members": [ + { + "name": "file", + "type": "338" + }, + { + "name": "mode", + "type": "353" + }, + { + "name": "top-id", + "default": null, + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "240", + "members": [ + { + "name": "server", + "type": "343" + }, + { + "name": "vdi", + "type": "str" + }, + { + "name": "snap-id", + "default": null, + "type": "int" + }, + { + "name": "tag", + "default": null, + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "241", + "members": [ + { + "name": "server", + "type": "354" + }, + { + "name": "path", + "type": "str" + }, + { + "name": "user", + "default": null, + "type": "str" + }, + { + "name": "host-key-check", + "default": null, + "type": "355" + } + ], + "meta-type": "object" + }, + { + "name": "242", + "members": [ + { + "name": "throttle-group", + "type": "str" + }, + { + "name": "file", + "type": "338" + } + ], + "meta-type": "object" + }, + { + "name": "243", + "members": [ + { + "name": "dir", + "type": "str" + }, + { + "name": "fat-type", + "default": null, + "type": "int" + }, + { + "name": "floppy", + "default": null, + "type": "bool" + }, + { + "name": "label", + "default": null, + "type": "str" + }, + { + "name": "rw", + "default": null, + "type": "bool" + } + ], + "meta-type": "object" + }, + { + "name": "244", + "members": [ + { + "name": "vdisk-id", + "type": "str" + }, + { + "name": "server", + "type": "352" + }, + { + "name": "tls-creds", + "default": null, + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "245", + "members": [ + ], + "meta-type": "object" + }, + { + "name": "246", + "members": [ + { + "name": "filename", + "type": "str" + }, + { + "name": "size", + "type": "int" + }, + { + "name": "preallocation", + "default": null, + "type": "356" + }, + { + "name": "nocow", + "default": null, + "type": "bool" + } + ], + "meta-type": "object" + }, + { + "name": "247", + "members": [ + { + "name": "location", + "type": "224" + }, + { + "name": "size", + "type": "int" + }, + { + "name": "preallocation", + "default": null, + "type": "356" + } + ], + "meta-type": "object" + }, + { + "name": "248", + "members": [ + { + "name": "key-secret", + "default": null, + "type": "str" + }, + { + "name": "cipher-alg", + "default": null, + "type": "357" + }, + { + "name": "cipher-mode", + "default": null, + "type": "358" + }, + { + "name": "ivgen-alg", + "default": null, + "type": "359" + }, + { + "name": "ivgen-hash-alg", + "default": null, + "type": "360" + }, + { + "name": "hash-alg", + "default": null, + "type": "360" + }, + { + "name": "iter-time", + "default": null, + "type": "int" + }, + { + "name": "file", + "type": "338" + }, + { + "name": "size", + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "249", + "members": [ + { + "name": "location", + "type": "230" + }, + { + "name": "size", + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "250", + "members": [ + { + "name": "file", + "type": "338" + }, + { + "name": "size", + "type": "int" + }, + { + "name": "cluster-size", + "default": null, + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "251", + "members": [ + { + "name": "file", + "type": "338" + }, + { + "name": "size", + "type": "int" + }, + { + "name": "backing-file", + "default": null, + "type": "str" + }, + { + "name": "encrypt", + "default": null, + "type": "361" + } + ], + "meta-type": "object" + }, + { + "name": "252", + "members": [ + { + "name": "file", + "type": "338" + }, + { + "name": "size", + "type": "int" + }, + { + "name": "version", + "default": null, + "type": "362" + }, + { + "name": "backing-file", + "default": null, + "type": "str" + }, + { + "name": "backing-fmt", + "default": null, + "type": "215" + }, + { + "name": "encrypt", + "default": null, + "type": "361" + }, + { + "name": "cluster-size", + "default": null, + "type": "int" + }, + { + "name": "preallocation", + "default": null, + "type": "356" + }, + { + "name": "lazy-refcounts", + "default": null, + "type": "bool" + }, + { + "name": "refcount-bits", + "default": null, + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "253", + "members": [ + { + "name": "file", + "type": "338" + }, + { + "name": "size", + "type": "int" + }, + { + "name": "backing-file", + "default": null, + "type": "str" + }, + { + "name": "backing-fmt", + "default": null, + "type": "215" + }, + { + "name": "cluster-size", + "default": null, + "type": "int" + }, + { + "name": "table-size", + "default": null, + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "254", + "members": [ + { + "name": "location", + "type": "238" + }, + { + "name": "size", + "type": "int" + }, + { + "name": "cluster-size", + "default": null, + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "255", + "members": [ + { + "name": "location", + "type": "240" + }, + { + "name": "size", + "type": "int" + }, + { + "name": "backing-file", + "default": null, + "type": "str" + }, + { + "name": "preallocation", + "default": null, + "type": "356" + }, + { + "name": "redundancy", + "default": null, + "type": "363" + }, + { + "name": "object-size", + "default": null, + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "256", + "members": [ + { + "name": "location", + "type": "241" + }, + { + "name": "size", + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "257", + "members": [ + { + "name": "file", + "type": "338" + }, + { + "name": "size", + "type": "int" + }, + { + "name": "static", + "default": null, + "type": "bool" + } + ], + "meta-type": "object" + }, + { + "name": "258", + "members": [ + { + "name": "file", + "type": "338" + }, + { + "name": "size", + "type": "int" + }, + { + "name": "log-size", + "default": null, + "type": "int" + }, + { + "name": "block-size", + "default": null, + "type": "int" + }, + { + "name": "subformat", + "default": null, + "type": "364" + }, + { + "name": "block-state-zero", + "default": null, + "type": "bool" + } + ], + "meta-type": "object" + }, + { + "name": "259", + "members": [ + { + "name": "file", + "type": "338" + }, + { + "name": "size", + "type": "int" + }, + { + "name": "subformat", + "default": null, + "type": "365" + }, + { + "name": "force-size", + "default": null, + "type": "bool" + } + ], + "meta-type": "object" + }, + { + "name": "260", + "meta-type": "enum", + "values": [ + "retain", + "read-only", + "read-write" + ] + }, + { + "name": "261", + "meta-type": "enum", + "values": [ + "read", + "write" + ] + }, + { + "name": "262", + "meta-type": "enum", + "values": [ + "ignore", + "report", + "stop" + ] + }, + { + "name": "263", + "meta-type": "enum", + "values": [ + "commit", + "stream", + "mirror", + "backup" + ] + }, + { + "name": "264", + "members": [ + { + "type": "str" + }, + { + "type": "null" + } + ], + "meta-type": "alternate" + }, + { + "name": "265", + "tag": "type", + "variants": [ + { + "case": "inet", + "type": "367" + }, + { + "case": "unix", + "type": "368" + }, + { + "case": "vsock", + "type": "369" + }, + { + "case": "fd", + "type": "370" + } + ], + "members": [ + { + "name": "type", + "type": "366" + } + ], + "meta-type": "object" + }, + { + "name": "266", + "meta-type": "enum", + "values": [ + "safe", + "hard" + ] + }, + { + "name": "267", + "meta-type": "enum", + "values": [ + "read", + "write", + "flush" + ] + }, + { + "name": "268", + "meta-type": "enum", + "values": [ + "utf8", + "base64" + ] + }, + { + "name": "269", + "tag": "type", + "variants": [ + { + "case": "file", + "type": "372" + }, + { + "case": "serial", + "type": "373" + }, + { + "case": "parallel", + "type": "373" + }, + { + "case": "pipe", + "type": "373" + }, + { + "case": "socket", + "type": "374" + }, + { + "case": "udp", + "type": "375" + }, + { + "case": "pty", + "type": "376" + }, + { + "case": "null", + "type": "376" + }, + { + "case": "mux", + "type": "377" + }, + { + "case": "msmouse", + "type": "376" + }, + { + "case": "wctablet", + "type": "376" + }, + { + "case": "braille", + "type": "376" + }, + { + "case": "testdev", + "type": "376" + }, + { + "case": "stdio", + "type": "378" + }, + { + "case": "console", + "type": "376" + }, + { + "case": "spicevmc", + "type": "379" + }, + { + "case": "spiceport", + "type": "380" + }, + { + "case": "vc", + "type": "381" + }, + { + "case": "ringbuf", + "type": "382" + }, + { + "case": "memory", + "type": "382" + } + ], + "members": [ + { + "name": "type", + "type": "371" + } + ], + "meta-type": "object" + }, + { + "name": "270", + "meta-type": "enum", + "values": [ + "normal", + "none", + "all" + ] + }, + { + "name": "[str]", + "element-type": "str", + "meta-type": "array" + }, + { + "name": "271", + "meta-type": "enum", + "values": [ + "half", + "full" + ] + }, + { + "name": "272", + "meta-type": "enum", + "values": [ + "off", + "on" + ] + }, + { + "name": "273", + "members": [ + { + "name": "priority", + "type": "int" + }, + { + "name": "tbl-id", + "type": "int" + }, + { + "name": "in-pport", + "default": null, + "type": "int" + }, + { + "name": "tunnel-id", + "default": null, + "type": "int" + }, + { + "name": "vlan-id", + "default": null, + "type": "int" + }, + { + "name": "eth-type", + "default": null, + "type": "int" + }, + { + "name": "eth-src", + "default": null, + "type": "str" + }, + { + "name": "eth-dst", + "default": null, + "type": "str" + }, + { + "name": "ip-proto", + "default": null, + "type": "int" + }, + { + "name": "ip-tos", + "default": null, + "type": "int" + }, + { + "name": "ip-dst", + "default": null, + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "274", + "members": [ + { + "name": "in-pport", + "default": null, + "type": "int" + }, + { + "name": "tunnel-id", + "default": null, + "type": "int" + }, + { + "name": "vlan-id", + "default": null, + "type": "int" + }, + { + "name": "eth-src", + "default": null, + "type": "str" + }, + { + "name": "eth-dst", + "default": null, + "type": "str" + }, + { + "name": "ip-proto", + "default": null, + "type": "int" + }, + { + "name": "ip-tos", + "default": null, + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "275", + "members": [ + { + "name": "goto-tbl", + "default": null, + "type": "int" + }, + { + "name": "group-id", + "default": null, + "type": "int" + }, + { + "name": "tunnel-lport", + "default": null, + "type": "int" + }, + { + "name": "vlan-id", + "default": null, + "type": "int" + }, + { + "name": "new-vlan-id", + "default": null, + "type": "int" + }, + { + "name": "out-pport", + "default": null, + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "276", + "tag": "type", + "variants": [ + { + "case": "passthrough", + "type": "384" + }, + { + "case": "emulator", + "type": "385" + } + ], + "members": [ + { + "name": "type", + "type": "383" + } + ], + "meta-type": "object" + }, + { + "name": "277", + "meta-type": "enum", + "values": [ + "client", + "server", + "unknown" + ] + }, + { + "name": "[278]", + "element-type": "278", + "meta-type": "array" + }, + { + "name": "278", + "members": [ + { + "name": "host", + "type": "str" + }, + { + "name": "port", + "type": "str" + }, + { + "name": "family", + "type": "281" + }, + { + "name": "connection-id", + "type": "int" + }, + { + "name": "channel-type", + "type": "int" + }, + { + "name": "channel-id", + "type": "int" + }, + { + "name": "tls", + "type": "bool" + } + ], + "meta-type": "object" + }, + { + "name": "279", + "members": [ + { + "name": "host", + "type": "str" + }, + { + "name": "port", + "type": "str" + }, + { + "name": "family", + "type": "281" + } + ], + "meta-type": "object" + }, + { + "name": "280", + "members": [ + { + "name": "host", + "type": "str" + }, + { + "name": "port", + "type": "str" + }, + { + "name": "family", + "type": "281" + }, + { + "name": "auth", + "default": null, + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "281", + "meta-type": "enum", + "values": [ + "ipv4", + "ipv6", + "unix", + "vsock", + "unknown" + ] + }, + { + "name": "[282]", + "element-type": "282", + "meta-type": "array" + }, + { + "name": "282", + "members": [ + { + "name": "host", + "type": "str" + }, + { + "name": "service", + "type": "str" + }, + { + "name": "family", + "type": "281" + }, + { + "name": "websocket", + "type": "bool" + }, + { + "name": "x509_dname", + "default": null, + "type": "str" + }, + { + "name": "sasl_username", + "default": null, + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "[283]", + "element-type": "283", + "meta-type": "array" + }, + { + "name": "283", + "members": [ + { + "name": "host", + "type": "str" + }, + { + "name": "service", + "type": "str" + }, + { + "name": "family", + "type": "281" + }, + { + "name": "websocket", + "type": "bool" + }, + { + "name": "auth", + "type": "284" + }, + { + "name": "vencrypt", + "default": null, + "type": "285" + } + ], + "meta-type": "object" + }, + { + "name": "284", + "meta-type": "enum", + "values": [ + "none", + "vnc", + "ra2", + "ra2ne", + "tight", + "ultra", + "tls", + "vencrypt", + "sasl" + ] + }, + { + "name": "285", + "meta-type": "enum", + "values": [ + "plain", + "tls-none", + "x509-none", + "tls-vnc", + "x509-vnc", + "tls-plain", + "x509-plain", + "tls-sasl", + "x509-sasl" + ] + }, + { + "name": "286", + "members": [ + { + "name": "host", + "type": "str" + }, + { + "name": "service", + "type": "str" + }, + { + "name": "family", + "type": "281" + }, + { + "name": "websocket", + "type": "bool" + }, + { + "name": "auth", + "default": null, + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "287", + "members": [ + { + "name": "host", + "type": "str" + }, + { + "name": "service", + "type": "str" + }, + { + "name": "family", + "type": "281" + }, + { + "name": "websocket", + "type": "bool" + } + ], + "meta-type": "object" + }, + { + "name": "[288]", + "element-type": "288", + "meta-type": "array" + }, + { + "name": "288", + "tag": "type", + "variants": [ + { + "case": "number", + "type": "387" + }, + { + "case": "qcode", + "type": "388" + } + ], + "members": [ + { + "name": "type", + "type": "386" + } + ], + "meta-type": "object" + }, + { + "name": "[289]", + "element-type": "289", + "meta-type": "array" + }, + { + "name": "289", + "tag": "type", + "variants": [ + { + "case": "key", + "type": "390" + }, + { + "case": "btn", + "type": "391" + }, + { + "case": "rel", + "type": "392" + }, + { + "case": "abs", + "type": "392" + } + ], + "members": [ + { + "name": "type", + "type": "389" + } + ], + "meta-type": "object" + }, + { + "name": "290", + "meta-type": "enum", + "values": [ + "none", + "setup", + "cancelling", + "cancelled", + "active", + "postcopy-active", + "completed", + "failed", + "colo", + "pre-switchover", + "device" + ] + }, + { + "name": "291", + "members": [ + { + "name": "transferred", + "type": "int" + }, + { + "name": "remaining", + "type": "int" + }, + { + "name": "total", + "type": "int" + }, + { + "name": "duplicate", + "type": "int" + }, + { + "name": "skipped", + "type": "int" + }, + { + "name": "normal", + "type": "int" + }, + { + "name": "normal-bytes", + "type": "int" + }, + { + "name": "dirty-pages-rate", + "type": "int" + }, + { + "name": "mbps", + "type": "number" + }, + { + "name": "dirty-sync-count", + "type": "int" + }, + { + "name": "postcopy-requests", + "type": "int" + }, + { + "name": "page-size", + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "292", + "members": [ + { + "name": "cache-size", + "type": "int" + }, + { + "name": "bytes", + "type": "int" + }, + { + "name": "pages", + "type": "int" + }, + { + "name": "cache-miss", + "type": "int" + }, + { + "name": "cache-miss-rate", + "type": "number" + }, + { + "name": "overflow", + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "293", + "meta-type": "enum", + "values": [ + "xbzrle", + "rdma-pin-all", + "auto-converge", + "zero-blocks", + "compress", + "events", + "postcopy-ram", + "x-colo", + "release-ram", + "block", + "return-path", + "pause-before-switchover", + "x-multifd", + "dirty-bitmaps" + ] + }, + { + "name": "number", + "json-type": "number", + "meta-type": "builtin" + }, + { + "name": "[294]", + "element-type": "294", + "meta-type": "array" + }, + { + "name": "294", + "tag": "type", + "variants": [ + { + "case": "abort", + "type": "394" + }, + { + "case": "block-dirty-bitmap-add", + "type": "395" + }, + { + "case": "block-dirty-bitmap-clear", + "type": "396" + }, + { + "case": "blockdev-backup", + "type": "397" + }, + { + "case": "blockdev-snapshot", + "type": "398" + }, + { + "case": "blockdev-snapshot-internal-sync", + "type": "399" + }, + { + "case": "blockdev-snapshot-sync", + "type": "400" + }, + { + "case": "drive-backup", + "type": "401" + } + ], + "members": [ + { + "name": "type", + "type": "393" + } + ], + "meta-type": "object" + }, + { + "name": "295", + "members": [ + { + "name": "completion-mode", + "default": null, + "type": "402" + } + ], + "meta-type": "object" + }, + { + "name": "296", + "meta-type": "enum", + "values": [ + "unavailable", + "disabled", + "enabled" + ] + }, + { + "name": "297", + "meta-type": "enum", + "values": [ + "builtin", + "enum", + "array", + "object", + "alternate", + "command", + "event" + ] + }, + { + "name": "298", + "members": [ + { + "name": "json-type", + "type": "403" + } + ], + "meta-type": "object" + }, + { + "name": "299", + "members": [ + { + "name": "values", + "type": "[str]" + } + ], + "meta-type": "object" + }, + { + "name": "300", + "members": [ + { + "name": "element-type", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "301", + "members": [ + { + "name": "members", + "type": "[404]" + }, + { + "name": "tag", + "default": null, + "type": "str" + }, + { + "name": "variants", + "default": null, + "type": "[405]" + } + ], + "meta-type": "object" + }, + { + "name": "302", + "members": [ + { + "name": "members", + "type": "[406]" + } + ], + "meta-type": "object" + }, + { + "name": "303", + "members": [ + { + "name": "arg-type", + "type": "str" + }, + { + "name": "ret-type", + "type": "str" + }, + { + "name": "allow-oob", + "type": "bool" + } + ], + "meta-type": "object" + }, + { + "name": "304", + "members": [ + { + "name": "arg-type", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "[305]", + "element-type": "305", + "meta-type": "array" + }, + { + "name": "305", + "meta-type": "enum", + "values": [ + "oob" + ] + }, + { + "name": "306", + "members": [ + { + "name": "major", + "type": "int" + }, + { + "name": "minor", + "type": "int" + }, + { + "name": "micro", + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "307", + "members": [ + { + "name": "node-id", + "default": null, + "type": "int" + }, + { + "name": "socket-id", + "default": null, + "type": "int" + }, + { + "name": "core-id", + "default": null, + "type": "int" + }, + { + "name": "thread-id", + "default": null, + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "308", + "meta-type": "enum", + "values": [ + "x86", + "sparc", + "ppc", + "mips", + "tricore", + "s390", + "riscv", + "other" + ] + }, + { + "name": "309", + "members": [ + { + "name": "pc", + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "310", + "members": [ + { + "name": "pc", + "type": "int" + }, + { + "name": "npc", + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "311", + "members": [ + { + "name": "nip", + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "312", + "members": [ + { + "name": "PC", + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "313", + "members": [ + { + "name": "PC", + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "314", + "members": [ + { + "name": "cpu-state", + "type": "407" + } + ], + "meta-type": "object" + }, + { + "name": "315", + "members": [ + { + "name": "pc", + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "316", + "members": [ + ], + "meta-type": "object" + }, + { + "name": "[317]", + "element-type": "317", + "meta-type": "array" + }, + { + "name": "317", + "members": [ + { + "name": "bus", + "type": "int" + }, + { + "name": "slot", + "type": "int" + }, + { + "name": "function", + "type": "int" + }, + { + "name": "class_info", + "type": "408" + }, + { + "name": "id", + "type": "409" + }, + { + "name": "irq", + "default": null, + "type": "int" + }, + { + "name": "qdev_id", + "type": "str" + }, + { + "name": "pci_bridge", + "default": null, + "type": "410" + }, + { + "name": "regions", + "type": "[411]" + } + ], + "meta-type": "object" + }, + { + "name": "318", + "meta-type": "enum", + "values": [ + "elf", + "kdump-zlib", + "kdump-lzo", + "kdump-snappy" + ] + }, + { + "name": "319", + "meta-type": "enum", + "values": [ + "none", + "active", + "completed", + "failed" + ] + }, + { + "name": "[318]", + "element-type": "318", + "meta-type": "array" + }, + { + "name": "320", + "meta-type": "enum", + "values": [ + "static", + "full" + ] + }, + { + "name": "321", + "members": [ + { + "name": "name", + "type": "str" + }, + { + "name": "props", + "default": null, + "type": "any" + } + ], + "meta-type": "object" + }, + { + "name": "322", + "meta-type": "enum", + "values": [ + "incompatible", + "identical", + "superset", + "subset" + ] + }, + { + "name": "[323]", + "element-type": "323", + "meta-type": "array" + }, + { + "name": "323", + "members": [ + { + "name": "fd", + "type": "int" + }, + { + "name": "opaque", + "default": null, + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "[324]", + "element-type": "324", + "meta-type": "array" + }, + { + "name": "324", + "members": [ + { + "name": "name", + "type": "str" + }, + { + "name": "type", + "type": "412" + }, + { + "name": "help", + "default": null, + "type": "str" + }, + { + "name": "default", + "default": null, + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "325", + "meta-type": "enum", + "values": [ + "default", + "preferred", + "bind", + "interleave" + ] + }, + { + "name": "326", + "meta-type": "enum", + "values": [ + "dimm", + "nvdimm" + ] + }, + { + "name": "327", + "members": [ + { + "name": "data", + "type": "413" + } + ], + "meta-type": "object" + }, + { + "name": "328", + "meta-type": "enum", + "values": [ + "DIMM", + "CPU" + ] + }, + { + "name": "329", + "meta-type": "enum", + "values": [ + "uninit", + "launch-update", + "launch-secret", + "running", + "send-update", + "receive-update" + ] + }, + { + "name": "330", + "meta-type": "enum", + "values": [ + "queue-full" + ] + }, + { + "name": "331", + "meta-type": "enum", + "values": [ + "hyper-v", + "s390" + ] + }, + { + "name": "332", + "members": [ + { + "name": "arg1", + "type": "int" + }, + { + "name": "arg2", + "type": "int" + }, + { + "name": "arg3", + "type": "int" + }, + { + "name": "arg4", + "type": "int" + }, + { + "name": "arg5", + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "333", + "members": [ + { + "name": "core", + "type": "int" + }, + { + "name": "psw-mask", + "type": "int" + }, + { + "name": "psw-addr", + "type": "int" + }, + { + "name": "reason", + "type": "414" + } + ], + "meta-type": "object" + }, + { + "name": "334", + "meta-type": "enum", + "values": [ + "active", + "disabled", + "frozen", + "locked" + ] + }, + { + "name": "[335]", + "element-type": "335", + "meta-type": "array" + }, + { + "name": "335", + "members": [ + { + "name": "interval_length", + "type": "int" + }, + { + "name": "min_rd_latency_ns", + "type": "int" + }, + { + "name": "max_rd_latency_ns", + "type": "int" + }, + { + "name": "avg_rd_latency_ns", + "type": "int" + }, + { + "name": "min_wr_latency_ns", + "type": "int" + }, + { + "name": "max_wr_latency_ns", + "type": "int" + }, + { + "name": "avg_wr_latency_ns", + "type": "int" + }, + { + "name": "min_flush_latency_ns", + "type": "int" + }, + { + "name": "max_flush_latency_ns", + "type": "int" + }, + { + "name": "avg_flush_latency_ns", + "type": "int" + }, + { + "name": "avg_rd_queue_depth", + "type": "number" + }, + { + "name": "avg_wr_queue_depth", + "type": "number" + } + ], + "meta-type": "object" + }, + { + "name": "336", + "members": [ + { + "name": "boundaries", + "type": "[int]" + }, + { + "name": "bins", + "type": "[int]" + } + ], + "meta-type": "object" + }, + { + "name": "[56]", + "element-type": "56", + "meta-type": "array" + }, + { + "name": "337", + "tag": "type", + "variants": [ + { + "case": "qcow2", + "type": "416" + }, + { + "case": "vmdk", + "type": "417" + }, + { + "case": "luks", + "type": "418" + } + ], + "members": [ + { + "name": "type", + "type": "415" + } + ], + "meta-type": "object" + }, + { + "name": "338", + "members": [ + { + "type": "35" + }, + { + "type": "str" + } + ], + "meta-type": "alternate" + }, + { + "name": "[339]", + "element-type": "339", + "meta-type": "array" + }, + { + "name": "339", + "members": [ + { + "name": "event", + "type": "419" + }, + { + "name": "state", + "default": null, + "type": "int" + }, + { + "name": "errno", + "default": null, + "type": "int" + }, + { + "name": "sector", + "default": null, + "type": "int" + }, + { + "name": "once", + "default": null, + "type": "bool" + }, + { + "name": "immediately", + "default": null, + "type": "bool" + } + ], + "meta-type": "object" + }, + { + "name": "[340]", + "element-type": "340", + "meta-type": "array" + }, + { + "name": "340", + "members": [ + { + "name": "event", + "type": "419" + }, + { + "name": "state", + "default": null, + "type": "int" + }, + { + "name": "new_state", + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "341", + "meta-type": "enum", + "values": [ + "auto", + "on", + "off" + ] + }, + { + "name": "342", + "meta-type": "enum", + "values": [ + "threads", + "native" + ] + }, + { + "name": "[343]", + "element-type": "343", + "meta-type": "array" + }, + { + "name": "343", + "tag": "type", + "variants": [ + { + "case": "inet", + "type": "354" + }, + { + "case": "unix", + "type": "421" + }, + { + "case": "vsock", + "type": "422" + }, + { + "case": "fd", + "type": "423" + } + ], + "members": [ + { + "name": "type", + "type": "420" + } + ], + "meta-type": "object" + }, + { + "name": "344", + "meta-type": "enum", + "values": [ + "tcp", + "iser" + ] + }, + { + "name": "345", + "meta-type": "enum", + "values": [ + "crc32c", + "none", + "crc32c-none", + "none-crc32c" + ] + }, + { + "name": "346", + "members": [ + { + "name": "type", + "type": "424" + }, + { + "name": "host", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "347", + "members": [ + { + "type": "35" + }, + { + "type": "str" + }, + { + "type": "null" + } + ], + "meta-type": "alternate" + }, + { + "name": "348", + "members": [ + { + "type": "425" + }, + { + "type": "426" + } + ], + "meta-type": "alternate" + }, + { + "name": "349", + "tag": "format", + "variants": [ + { + "case": "aes", + "type": "428" + }, + { + "case": "luks", + "type": "429" + } + ], + "members": [ + { + "name": "format", + "type": "427" + } + ], + "meta-type": "object" + }, + { + "name": "350", + "tag": "format", + "variants": [ + { + "case": "aes", + "type": "428" + } + ], + "members": [ + { + "name": "format", + "type": "430" + } + ], + "meta-type": "object" + }, + { + "name": "[338]", + "element-type": "338", + "meta-type": "array" + }, + { + "name": "351", + "meta-type": "enum", + "values": [ + "quorum", + "fifo" + ] + }, + { + "name": "[352]", + "element-type": "352", + "meta-type": "array" + }, + { + "name": "352", + "members": [ + { + "name": "host", + "type": "str" + }, + { + "name": "port", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "353", + "meta-type": "enum", + "values": [ + "primary", + "secondary" + ] + }, + { + "name": "354", + "members": [ + { + "name": "host", + "type": "str" + }, + { + "name": "port", + "type": "str" + }, + { + "name": "numeric", + "default": null, + "type": "bool" + }, + { + "name": "to", + "default": null, + "type": "int" + }, + { + "name": "ipv4", + "default": null, + "type": "bool" + }, + { + "name": "ipv6", + "default": null, + "type": "bool" + } + ], + "meta-type": "object" + }, + { + "name": "355", + "tag": "mode", + "variants": [ + { + "case": "none", + "type": "432" + }, + { + "case": "hash", + "type": "433" + }, + { + "case": "known_hosts", + "type": "432" + } + ], + "members": [ + { + "name": "mode", + "type": "431" + } + ], + "meta-type": "object" + }, + { + "name": "356", + "meta-type": "enum", + "values": [ + "off", + "metadata", + "falloc", + "full" + ] + }, + { + "name": "357", + "meta-type": "enum", + "values": [ + "aes-128", + "aes-192", + "aes-256", + "des-rfb", + "3des", + "cast5-128", + "serpent-128", + "serpent-192", + "serpent-256", + "twofish-128", + "twofish-192", + "twofish-256" + ] + }, + { + "name": "358", + "meta-type": "enum", + "values": [ + "ecb", + "cbc", + "xts", + "ctr" + ] + }, + { + "name": "359", + "meta-type": "enum", + "values": [ + "plain", + "plain64", + "essiv" + ] + }, + { + "name": "360", + "meta-type": "enum", + "values": [ + "md5", + "sha1", + "sha224", + "sha256", + "sha384", + "sha512", + "ripemd160" + ] + }, + { + "name": "361", + "tag": "format", + "variants": [ + { + "case": "qcow", + "type": "428" + }, + { + "case": "luks", + "type": "435" + } + ], + "members": [ + { + "name": "format", + "type": "434" + } + ], + "meta-type": "object" + }, + { + "name": "362", + "meta-type": "enum", + "values": [ + "v2", + "v3" + ] + }, + { + "name": "363", + "tag": "type", + "variants": [ + { + "case": "full", + "type": "437" + }, + { + "case": "erasure-coded", + "type": "438" + } + ], + "members": [ + { + "name": "type", + "type": "436" + } + ], + "meta-type": "object" + }, + { + "name": "364", + "meta-type": "enum", + "values": [ + "dynamic", + "fixed" + ] + }, + { + "name": "365", + "meta-type": "enum", + "values": [ + "dynamic", + "fixed" + ] + }, + { + "name": "null", + "json-type": "null", + "meta-type": "builtin" + }, + { + "name": "366", + "meta-type": "enum", + "values": [ + "inet", + "unix", + "vsock", + "fd" + ] + }, + { + "name": "367", + "members": [ + { + "name": "data", + "type": "354" + } + ], + "meta-type": "object" + }, + { + "name": "368", + "members": [ + { + "name": "data", + "type": "421" + } + ], + "meta-type": "object" + }, + { + "name": "369", + "members": [ + { + "name": "data", + "type": "422" + } + ], + "meta-type": "object" + }, + { + "name": "370", + "members": [ + { + "name": "data", + "type": "423" + } + ], + "meta-type": "object" + }, + { + "name": "371", + "meta-type": "enum", + "values": [ + "file", + "serial", + "parallel", + "pipe", + "socket", + "udp", + "pty", + "null", + "mux", + "msmouse", + "wctablet", + "braille", + "testdev", + "stdio", + "console", + "spicevmc", + "spiceport", + "vc", + "ringbuf", + "memory" + ] + }, + { + "name": "372", + "members": [ + { + "name": "data", + "type": "439" + } + ], + "meta-type": "object" + }, + { + "name": "373", + "members": [ + { + "name": "data", + "type": "440" + } + ], + "meta-type": "object" + }, + { + "name": "374", + "members": [ + { + "name": "data", + "type": "441" + } + ], + "meta-type": "object" + }, + { + "name": "375", + "members": [ + { + "name": "data", + "type": "442" + } + ], + "meta-type": "object" + }, + { + "name": "376", + "members": [ + { + "name": "data", + "type": "443" + } + ], + "meta-type": "object" + }, + { + "name": "377", + "members": [ + { + "name": "data", + "type": "444" + } + ], + "meta-type": "object" + }, + { + "name": "378", + "members": [ + { + "name": "data", + "type": "445" + } + ], + "meta-type": "object" + }, + { + "name": "379", + "members": [ + { + "name": "data", + "type": "446" + } + ], + "meta-type": "object" + }, + { + "name": "380", + "members": [ + { + "name": "data", + "type": "447" + } + ], + "meta-type": "object" + }, + { + "name": "381", + "members": [ + { + "name": "data", + "type": "448" + } + ], + "meta-type": "object" + }, + { + "name": "382", + "members": [ + { + "name": "data", + "type": "449" + } + ], + "meta-type": "object" + }, + { + "name": "383", + "meta-type": "enum", + "values": [ + "passthrough", + "emulator" + ] + }, + { + "name": "384", + "members": [ + { + "name": "data", + "type": "450" + } + ], + "meta-type": "object" + }, + { + "name": "385", + "members": [ + { + "name": "data", + "type": "451" + } + ], + "meta-type": "object" + }, + { + "name": "386", + "meta-type": "enum", + "values": [ + "number", + "qcode" + ] + }, + { + "name": "387", + "members": [ + { + "name": "data", + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "388", + "members": [ + { + "name": "data", + "type": "452" + } + ], + "meta-type": "object" + }, + { + "name": "389", + "meta-type": "enum", + "values": [ + "key", + "btn", + "rel", + "abs" + ] + }, + { + "name": "390", + "members": [ + { + "name": "data", + "type": "453" + } + ], + "meta-type": "object" + }, + { + "name": "391", + "members": [ + { + "name": "data", + "type": "454" + } + ], + "meta-type": "object" + }, + { + "name": "392", + "members": [ + { + "name": "data", + "type": "455" + } + ], + "meta-type": "object" + }, + { + "name": "393", + "meta-type": "enum", + "values": [ + "abort", + "block-dirty-bitmap-add", + "block-dirty-bitmap-clear", + "blockdev-backup", + "blockdev-snapshot", + "blockdev-snapshot-internal-sync", + "blockdev-snapshot-sync", + "drive-backup" + ] + }, + { + "name": "394", + "members": [ + { + "name": "data", + "type": "456" + } + ], + "meta-type": "object" + }, + { + "name": "395", + "members": [ + { + "name": "data", + "type": "22" + } + ], + "meta-type": "object" + }, + { + "name": "396", + "members": [ + { + "name": "data", + "type": "23" + } + ], + "meta-type": "object" + }, + { + "name": "397", + "members": [ + { + "name": "data", + "type": "19" + } + ], + "meta-type": "object" + }, + { + "name": "398", + "members": [ + { + "name": "data", + "type": "15" + } + ], + "meta-type": "object" + }, + { + "name": "399", + "members": [ + { + "name": "data", + "type": "54" + } + ], + "meta-type": "object" + }, + { + "name": "400", + "members": [ + { + "name": "data", + "type": "14" + } + ], + "meta-type": "object" + }, + { + "name": "401", + "members": [ + { + "name": "data", + "type": "18" + } + ], + "meta-type": "object" + }, + { + "name": "402", + "meta-type": "enum", + "values": [ + "individual", + "grouped" + ] + }, + { + "name": "403", + "meta-type": "enum", + "values": [ + "string", + "number", + "int", + "boolean", + "null", + "object", + "array", + "value" + ] + }, + { + "name": "[404]", + "element-type": "404", + "meta-type": "array" + }, + { + "name": "404", + "members": [ + { + "name": "name", + "type": "str" + }, + { + "name": "type", + "type": "str" + }, + { + "name": "default", + "default": null, + "type": "any" + } + ], + "meta-type": "object" + }, + { + "name": "[405]", + "element-type": "405", + "meta-type": "array" + }, + { + "name": "405", + "members": [ + { + "name": "case", + "type": "str" + }, + { + "name": "type", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "[406]", + "element-type": "406", + "meta-type": "array" + }, + { + "name": "406", + "members": [ + { + "name": "type", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "407", + "meta-type": "enum", + "values": [ + "uninitialized", + "stopped", + "check-stop", + "operating", + "load" + ] + }, + { + "name": "408", + "members": [ + { + "name": "desc", + "default": null, + "type": "str" + }, + { + "name": "class", + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "409", + "members": [ + { + "name": "device", + "type": "int" + }, + { + "name": "vendor", + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "410", + "members": [ + { + "name": "bus", + "type": "457" + }, + { + "name": "devices", + "default": null, + "type": "[317]" + } + ], + "meta-type": "object" + }, + { + "name": "[411]", + "element-type": "411", + "meta-type": "array" + }, + { + "name": "411", + "members": [ + { + "name": "bar", + "type": "int" + }, + { + "name": "type", + "type": "str" + }, + { + "name": "address", + "type": "int" + }, + { + "name": "size", + "type": "int" + }, + { + "name": "prefetch", + "default": null, + "type": "bool" + }, + { + "name": "mem_type_64", + "default": null, + "type": "bool" + } + ], + "meta-type": "object" + }, + { + "name": "412", + "meta-type": "enum", + "values": [ + "string", + "boolean", + "number", + "size" + ] + }, + { + "name": "413", + "members": [ + { + "name": "id", + "default": null, + "type": "str" + }, + { + "name": "addr", + "type": "int" + }, + { + "name": "size", + "type": "int" + }, + { + "name": "slot", + "type": "int" + }, + { + "name": "node", + "type": "int" + }, + { + "name": "memdev", + "type": "str" + }, + { + "name": "hotplugged", + "type": "bool" + }, + { + "name": "hotpluggable", + "type": "bool" + } + ], + "meta-type": "object" + }, + { + "name": "414", + "meta-type": "enum", + "values": [ + "unknown", + "disabled-wait", + "extint-loop", + "pgmint-loop", + "opint-loop" + ] + }, + { + "name": "415", + "meta-type": "enum", + "values": [ + "qcow2", + "vmdk", + "luks" + ] + }, + { + "name": "416", + "members": [ + { + "name": "data", + "type": "458" + } + ], + "meta-type": "object" + }, + { + "name": "417", + "members": [ + { + "name": "data", + "type": "459" + } + ], + "meta-type": "object" + }, + { + "name": "418", + "members": [ + { + "name": "data", + "type": "460" + } + ], + "meta-type": "object" + }, + { + "name": "419", + "meta-type": "enum", + "values": [ + "l1_update", + "l1_grow_alloc_table", + "l1_grow_write_table", + "l1_grow_activate_table", + "l2_load", + "l2_update", + "l2_update_compressed", + "l2_alloc_cow_read", + "l2_alloc_write", + "read_aio", + "read_backing_aio", + "read_compressed", + "write_aio", + "write_compressed", + "vmstate_load", + "vmstate_save", + "cow_read", + "cow_write", + "reftable_load", + "reftable_grow", + "reftable_update", + "refblock_load", + "refblock_update", + "refblock_update_part", + "refblock_alloc", + "refblock_alloc_hookup", + "refblock_alloc_write", + "refblock_alloc_write_blocks", + "refblock_alloc_write_table", + "refblock_alloc_switch_table", + "cluster_alloc", + "cluster_alloc_bytes", + "cluster_free", + "flush_to_os", + "flush_to_disk", + "pwritev_rmw_head", + "pwritev_rmw_after_head", + "pwritev_rmw_tail", + "pwritev_rmw_after_tail", + "pwritev", + "pwritev_zero", + "pwritev_done", + "empty_image_prepare", + "l1_shrink_write_table", + "l1_shrink_free_l2_clusters", + "cor_write" + ] + }, + { + "name": "420", + "meta-type": "enum", + "values": [ + "inet", + "unix", + "vsock", + "fd" + ] + }, + { + "name": "421", + "members": [ + { + "name": "path", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "422", + "members": [ + { + "name": "cid", + "type": "str" + }, + { + "name": "port", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "423", + "members": [ + { + "name": "str", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "424", + "meta-type": "enum", + "values": [ + "inet" + ] + }, + { + "name": "425", + "members": [ + { + "name": "template", + "default": null, + "type": "426" + }, + { + "name": "main-header", + "default": null, + "type": "bool" + }, + { + "name": "active-l1", + "default": null, + "type": "bool" + }, + { + "name": "active-l2", + "default": null, + "type": "bool" + }, + { + "name": "refcount-table", + "default": null, + "type": "bool" + }, + { + "name": "refcount-block", + "default": null, + "type": "bool" + }, + { + "name": "snapshot-table", + "default": null, + "type": "bool" + }, + { + "name": "inactive-l1", + "default": null, + "type": "bool" + }, + { + "name": "inactive-l2", + "default": null, + "type": "bool" + } + ], + "meta-type": "object" + }, + { + "name": "426", + "meta-type": "enum", + "values": [ + "none", + "constant", + "cached", + "all" + ] + }, + { + "name": "427", + "meta-type": "enum", + "values": [ + "aes", + "luks" + ] + }, + { + "name": "428", + "members": [ + { + "name": "key-secret", + "default": null, + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "429", + "members": [ + { + "name": "key-secret", + "default": null, + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "430", + "meta-type": "enum", + "values": [ + "aes" + ] + }, + { + "name": "431", + "meta-type": "enum", + "values": [ + "none", + "hash", + "known_hosts" + ] + }, + { + "name": "432", + "members": [ + ], + "meta-type": "object" + }, + { + "name": "433", + "members": [ + { + "name": "type", + "type": "461" + }, + { + "name": "hash", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "434", + "meta-type": "enum", + "values": [ + "qcow", + "luks" + ] + }, + { + "name": "435", + "members": [ + { + "name": "key-secret", + "default": null, + "type": "str" + }, + { + "name": "cipher-alg", + "default": null, + "type": "357" + }, + { + "name": "cipher-mode", + "default": null, + "type": "358" + }, + { + "name": "ivgen-alg", + "default": null, + "type": "359" + }, + { + "name": "ivgen-hash-alg", + "default": null, + "type": "360" + }, + { + "name": "hash-alg", + "default": null, + "type": "360" + }, + { + "name": "iter-time", + "default": null, + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "436", + "meta-type": "enum", + "values": [ + "full", + "erasure-coded" + ] + }, + { + "name": "437", + "members": [ + { + "name": "copies", + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "438", + "members": [ + { + "name": "data-strips", + "type": "int" + }, + { + "name": "parity-strips", + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "439", + "members": [ + { + "name": "logfile", + "default": null, + "type": "str" + }, + { + "name": "logappend", + "default": null, + "type": "bool" + }, + { + "name": "in", + "default": null, + "type": "str" + }, + { + "name": "out", + "type": "str" + }, + { + "name": "append", + "default": null, + "type": "bool" + } + ], + "meta-type": "object" + }, + { + "name": "440", + "members": [ + { + "name": "logfile", + "default": null, + "type": "str" + }, + { + "name": "logappend", + "default": null, + "type": "bool" + }, + { + "name": "device", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "441", + "members": [ + { + "name": "logfile", + "default": null, + "type": "str" + }, + { + "name": "logappend", + "default": null, + "type": "bool" + }, + { + "name": "addr", + "type": "265" + }, + { + "name": "tls-creds", + "default": null, + "type": "str" + }, + { + "name": "server", + "default": null, + "type": "bool" + }, + { + "name": "wait", + "default": null, + "type": "bool" + }, + { + "name": "nodelay", + "default": null, + "type": "bool" + }, + { + "name": "telnet", + "default": null, + "type": "bool" + }, + { + "name": "tn3270", + "default": null, + "type": "bool" + }, + { + "name": "reconnect", + "default": null, + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "442", + "members": [ + { + "name": "logfile", + "default": null, + "type": "str" + }, + { + "name": "logappend", + "default": null, + "type": "bool" + }, + { + "name": "remote", + "type": "265" + }, + { + "name": "local", + "default": null, + "type": "265" + } + ], + "meta-type": "object" + }, + { + "name": "443", + "members": [ + { + "name": "logfile", + "default": null, + "type": "str" + }, + { + "name": "logappend", + "default": null, + "type": "bool" + } + ], + "meta-type": "object" + }, + { + "name": "444", + "members": [ + { + "name": "logfile", + "default": null, + "type": "str" + }, + { + "name": "logappend", + "default": null, + "type": "bool" + }, + { + "name": "chardev", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "445", + "members": [ + { + "name": "logfile", + "default": null, + "type": "str" + }, + { + "name": "logappend", + "default": null, + "type": "bool" + }, + { + "name": "signal", + "default": null, + "type": "bool" + } + ], + "meta-type": "object" + }, + { + "name": "446", + "members": [ + { + "name": "logfile", + "default": null, + "type": "str" + }, + { + "name": "logappend", + "default": null, + "type": "bool" + }, + { + "name": "type", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "447", + "members": [ + { + "name": "logfile", + "default": null, + "type": "str" + }, + { + "name": "logappend", + "default": null, + "type": "bool" + }, + { + "name": "fqdn", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "448", + "members": [ + { + "name": "logfile", + "default": null, + "type": "str" + }, + { + "name": "logappend", + "default": null, + "type": "bool" + }, + { + "name": "width", + "default": null, + "type": "int" + }, + { + "name": "height", + "default": null, + "type": "int" + }, + { + "name": "cols", + "default": null, + "type": "int" + }, + { + "name": "rows", + "default": null, + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "449", + "members": [ + { + "name": "logfile", + "default": null, + "type": "str" + }, + { + "name": "logappend", + "default": null, + "type": "bool" + }, + { + "name": "size", + "default": null, + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "450", + "members": [ + { + "name": "path", + "default": null, + "type": "str" + }, + { + "name": "cancel-path", + "default": null, + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "451", + "members": [ + { + "name": "chardev", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "452", + "meta-type": "enum", + "values": [ + "unmapped", + "shift", + "shift_r", + "alt", + "alt_r", + "ctrl", + "ctrl_r", + "menu", + "esc", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "0", + "minus", + "equal", + "backspace", + "tab", + "q", + "w", + "e", + "r", + "t", + "y", + "u", + "i", + "o", + "p", + "bracket_left", + "bracket_right", + "ret", + "a", + "s", + "d", + "f", + "g", + "h", + "j", + "k", + "l", + "semicolon", + "apostrophe", + "grave_accent", + "backslash", + "z", + "x", + "c", + "v", + "b", + "n", + "m", + "comma", + "dot", + "slash", + "asterisk", + "spc", + "caps_lock", + "f1", + "f2", + "f3", + "f4", + "f5", + "f6", + "f7", + "f8", + "f9", + "f10", + "num_lock", + "scroll_lock", + "kp_divide", + "kp_multiply", + "kp_subtract", + "kp_add", + "kp_enter", + "kp_decimal", + "sysrq", + "kp_0", + "kp_1", + "kp_2", + "kp_3", + "kp_4", + "kp_5", + "kp_6", + "kp_7", + "kp_8", + "kp_9", + "less", + "f11", + "f12", + "print", + "home", + "pgup", + "pgdn", + "end", + "left", + "up", + "down", + "right", + "insert", + "delete", + "stop", + "again", + "props", + "undo", + "front", + "copy", + "open", + "paste", + "find", + "cut", + "lf", + "help", + "meta_l", + "meta_r", + "compose", + "pause", + "ro", + "hiragana", + "henkan", + "yen", + "muhenkan", + "katakanahiragana", + "kp_comma", + "kp_equals", + "power", + "sleep", + "wake", + "audionext", + "audioprev", + "audiostop", + "audioplay", + "audiomute", + "volumeup", + "volumedown", + "mediaselect", + "mail", + "calculator", + "computer", + "ac_home", + "ac_back", + "ac_forward", + "ac_refresh", + "ac_bookmarks" + ] + }, + { + "name": "453", + "members": [ + { + "name": "key", + "type": "288" + }, + { + "name": "down", + "type": "bool" + } + ], + "meta-type": "object" + }, + { + "name": "454", + "members": [ + { + "name": "button", + "type": "462" + }, + { + "name": "down", + "type": "bool" + } + ], + "meta-type": "object" + }, + { + "name": "455", + "members": [ + { + "name": "axis", + "type": "463" + }, + { + "name": "value", + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "456", + "members": [ + ], + "meta-type": "object" + }, + { + "name": "457", + "members": [ + { + "name": "number", + "type": "int" + }, + { + "name": "secondary", + "type": "int" + }, + { + "name": "subordinate", + "type": "int" + }, + { + "name": "io_range", + "type": "464" + }, + { + "name": "memory_range", + "type": "464" + }, + { + "name": "prefetchable_range", + "type": "464" + } + ], + "meta-type": "object" + }, + { + "name": "458", + "members": [ + { + "name": "compat", + "type": "str" + }, + { + "name": "lazy-refcounts", + "default": null, + "type": "bool" + }, + { + "name": "corrupt", + "default": null, + "type": "bool" + }, + { + "name": "refcount-bits", + "type": "int" + }, + { + "name": "encrypt", + "default": null, + "type": "465" + } + ], + "meta-type": "object" + }, + { + "name": "459", + "members": [ + { + "name": "create-type", + "type": "str" + }, + { + "name": "cid", + "type": "int" + }, + { + "name": "parent-cid", + "type": "int" + }, + { + "name": "extents", + "type": "[213]" + } + ], + "meta-type": "object" + }, + { + "name": "460", + "members": [ + { + "name": "cipher-alg", + "type": "357" + }, + { + "name": "cipher-mode", + "type": "358" + }, + { + "name": "ivgen-alg", + "type": "359" + }, + { + "name": "ivgen-hash-alg", + "default": null, + "type": "360" + }, + { + "name": "hash-alg", + "type": "360" + }, + { + "name": "payload-offset", + "type": "int" + }, + { + "name": "master-key-iters", + "type": "int" + }, + { + "name": "uuid", + "type": "str" + }, + { + "name": "slots", + "type": "[466]" + } + ], + "meta-type": "object" + }, + { + "name": "461", + "meta-type": "enum", + "values": [ + "md5", + "sha1" + ] + }, + { + "name": "462", + "meta-type": "enum", + "values": [ + "left", + "middle", + "right", + "wheel-up", + "wheel-down", + "side", + "extra" + ] + }, + { + "name": "463", + "meta-type": "enum", + "values": [ + "x", + "y" + ] + }, + { + "name": "464", + "members": [ + { + "name": "base", + "type": "int" + }, + { + "name": "limit", + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "465", + "tag": "format", + "variants": [ + { + "case": "aes", + "type": "467" + }, + { + "case": "luks", + "type": "460" + } + ], + "members": [ + { + "name": "format", + "type": "427" + } + ], + "meta-type": "object" + }, + { + "name": "[213]", + "element-type": "213", + "meta-type": "array" + }, + { + "name": "[466]", + "element-type": "466", + "meta-type": "array" + }, + { + "name": "466", + "members": [ + { + "name": "active", + "type": "bool" + }, + { + "name": "iters", + "default": null, + "type": "int" + }, + { + "name": "stripes", + "default": null, + "type": "int" + }, + { + "name": "key-offset", + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "467", + "members": [ + ], + "meta-type": "object" + } +] --=20 2.16.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri May 3 15:32:30 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1521743609437466.61841597590944; Thu, 22 Mar 2018 11:33:29 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1D69461D22; Thu, 22 Mar 2018 18:33:28 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E6C747B52F; Thu, 22 Mar 2018 18:33:27 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id A88C44CAA3; Thu, 22 Mar 2018 18:33:27 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w2MIVxxp015658 for ; Thu, 22 Mar 2018 14:31:59 -0400 Received: by smtp.corp.redhat.com (Postfix) id 66B688442D; Thu, 22 Mar 2018 18:31:59 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id E444584433; Thu, 22 Mar 2018 18:31:58 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Thu, 22 Mar 2018 19:31:45 +0100 Message-Id: <7dd1c18774b0bb49ce93e24ead7b2e4d57973aa4.1521743167.git.pkrempa@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH 08/11] tests: qemu: Add infrastructure for QAPI schema testing X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Thu, 22 Mar 2018 18:33:28 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Add a function which will allow to test whether a JSON object conforms to the QAPI schema. This greatly helps when developing formatters for new JSON objects and will help make sure that the code will not break in cases which have unit tests but were actually not function-tested (mostly various disk access protocols). Signed-off-by: Peter Krempa --- tests/Makefile.am | 2 + tests/qemumonitorjsontest.c | 108 ++++++++- tests/testutilsqemuschema.c | 536 ++++++++++++++++++++++++++++++++++++++++= ++++ tests/testutilsqemuschema.h | 30 +++ 4 files changed, 675 insertions(+), 1 deletion(-) create mode 100644 tests/testutilsqemuschema.c create mode 100644 tests/testutilsqemuschema.h diff --git a/tests/Makefile.am b/tests/Makefile.am index fe8847386e..cf254f65c3 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -616,6 +616,7 @@ qemumonitorjsontest_SOURCES =3D \ qemumonitorjsontest.c \ testutils.c testutils.h \ testutilsqemu.c testutilsqemu.h \ + testutilsqemuschema.c testutilsqemuschema.h \ $(NULL) qemumonitorjsontest_LDADD =3D libqemumonitortestutils.la \ $(qemu_LDADDS) $(LDADDS) @@ -694,6 +695,7 @@ else ! WITH_QEMU EXTRA_DIST +=3D qemuxml2argvtest.c qemuxml2xmltest.c qemuargv2xmltest.c \ qemuhelptest.c domainsnapshotxml2xmltest.c \ qemumonitortest.c testutilsqemu.c testutilsqemu.h \ + testutilsqemuschema.c testutilsqemuschema.h \ qemumonitorjsontest.c qemuhotplugtest.c \ qemuagenttest.c qemucapabilitiestest.c \ qemucaps2xmltest.c qemucommandutiltest.c \ diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index 908ec3a3c8..394e5dc446 100644 --- a/tests/qemumonitorjsontest.c +++ b/tests/qemumonitorjsontest.c @@ -21,10 +21,12 @@ #include "testutils.h" #include "testutilsqemu.h" +#include "testutilsqemuschema.h" #include "qemumonitortestutils.h" #include "qemu/qemu_domain.h" #include "qemu/qemu_block.h" #include "qemu/qemu_monitor_json.h" +#include "qemu/qemu_qapi.h" #include "virthread.h" #include "virerror.h" #include "virstring.h" @@ -2828,12 +2830,60 @@ testBlockNodeNameDetect(const void *opaque) } +struct testQAPISchemaData { + virHashTablePtr schema; + const char *name; + const char *query; + const char *json; + bool success; +}; + + +static int +testQAPISchema(const void *opaque) +{ + const struct testQAPISchemaData *data =3D opaque; + virBuffer debug =3D VIR_BUFFER_INITIALIZER; + virJSONValuePtr schemaroot; + virJSONValuePtr json =3D NULL; + int ret =3D -1; + + if (virQEMUQapiSchemaPathGet(data->query, data->schema, &schemaroot) <= 0) + goto cleanup; + + if (!(json =3D virJSONValueFromString(data->json))) + goto cleanup; + + if ((testQEMUSchemaValidate(json, schemaroot, data->schema, &debug) = =3D=3D 0) !=3D data->success) { + if (!data->success) + VIR_TEST_VERBOSE("\nschema validation should have failed\n"); + } else { + ret =3D 0; + } + + if (virTestGetDebug() || + (ret < 0 && virTestGetVerbose())) { + char *debugstr =3D virBufferContentAndReset(&debug); + fprintf(stderr, "\n%s\n", debugstr); + VIR_FREE(debugstr); + } + + + cleanup: + virBufferFreeAndReset(&debug); + virJSONValueFree(json); + return ret; +} + + static int mymain(void) { int ret =3D 0; virQEMUDriver driver; testQemuMonitorJSONSimpleFuncData simpleFunc; + struct testQAPISchemaData qapiData; + char *metaschema =3D NULL; #if !WITH_YAJL fputs("libvirt not compiled with yajl, skipping this test\n", stderr); @@ -2982,8 +3032,64 @@ mymain(void) #undef DO_TEST_BLOCK_NODE_DETECT - qemuTestDriverFree(&driver); +#define DO_TEST_QAPI_SCHEMA(nme, rootquery, scc, jsonstr) \ + do { \ + qapiData.name =3D nme; \ + qapiData.query =3D rootquery; \ + qapiData.success =3D scc; \ + qapiData.json =3D jsonstr; \ + if (virTestRun("qapi schema " nme, testQAPISchema, &qapiData) < 0)\ + ret =3D -1; \ + } while (0) + + if (!(qapiData.schema =3D testQEMUSchemaLoad())) { + VIR_TEST_VERBOSE("failed to load qapi schema\n"); + ret =3D -1; + goto cleanup; + } + DO_TEST_QAPI_SCHEMA("string", "trace-event-get-state/arg-type", true, + "{\"name\":\"test\"}"); + DO_TEST_QAPI_SCHEMA("all attrs", "trace-event-get-state/arg-type", tru= e, + "{\"name\":\"test\", \"vcpu\":123}"); + DO_TEST_QAPI_SCHEMA("attr type mismatch", "trace-event-get-state/arg-t= ype", false, + "{\"name\":123}"); + DO_TEST_QAPI_SCHEMA("missing mandatory attr", "trace-event-get-state/a= rg-type", false, + "{\"vcpu\":123}"); + DO_TEST_QAPI_SCHEMA("attr name not present", "trace-event-get-state/ar= g-type", false, + "{\"name\":\"test\", \"blah\":123}"); + DO_TEST_QAPI_SCHEMA("variant", "blockdev-add/arg-type", true, + "{\"driver\":\"file\", \"filename\":\"ble\"}"); + DO_TEST_QAPI_SCHEMA("variant wrong", "blockdev-add/arg-type", false, + "{\"driver\":\"filefilefilefile\", \"filename\":\"= ble\"}"); + DO_TEST_QAPI_SCHEMA("variant missing mandatory", "blockdev-add/arg-typ= e", false, + "{\"driver\":\"file\", \"pr-manager\":\"ble\"}"); + DO_TEST_QAPI_SCHEMA("variant missing discriminator", "blockdev-add/arg= -type", false, + "{\"node-name\":\"dfgfdg\"}"); + DO_TEST_QAPI_SCHEMA("alternate 1", "blockdev-add/arg-type", true, + "{\"driver\":\"qcow2\"," + "\"file\": { \"driver\":\"file\", \"filename\":\"= ble\"}}"); + DO_TEST_QAPI_SCHEMA("alternate 2", "blockdev-add/arg-type", true, + "{\"driver\":\"qcow2\",\"file\": \"somepath\"}"); + DO_TEST_QAPI_SCHEMA("alternate 2", "blockdev-add/arg-type", false, + "{\"driver\":\"qcow2\",\"file\": 1234}"); + + if (!(metaschema =3D virTestLoadFilePath("qemuqapischema.json", NULL))= ) { + VIR_TEST_VERBOSE("failed to load qapi schema\n"); + ret =3D -1; + goto cleanup; + } + + DO_TEST_QAPI_SCHEMA("schema-meta", "query-qmp-schema/ret-type", true, + metaschema); + + +#undef DO_TEST_QAPI_SCHEMA + + cleanup: + VIR_FREE(metaschema); + virHashFree(qapiData.schema); + qemuTestDriverFree(&driver); return (ret =3D=3D 0) ? EXIT_SUCCESS : EXIT_FAILURE; } diff --git a/tests/testutilsqemuschema.c b/tests/testutilsqemuschema.c new file mode 100644 index 0000000000..b4c94ed3f1 --- /dev/null +++ b/tests/testutilsqemuschema.c @@ -0,0 +1,536 @@ +/* + * testutilsqemuschema.c: helper functions for QEMU QAPI schema testing + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see + * . + */ +#include +#include "testutils.h" +#include "testutilsqemuschema.h" +#include "qemu/qemu_qapi.h" + +static int +testQEMUSchemaValidateRecurse(virJSONValuePtr obj, + virJSONValuePtr root, + virHashTablePtr schema, + virBufferPtr debug); + +static int +testQEMUSchemaValidateArrayBuiltin(virJSONValuePtr obj, + virJSONValuePtr root, + virBufferPtr debug) +{ + const char *t =3D virJSONValueObjectGetString(root, "json-type"); + const char *s =3D NULL; + bool b =3D false; + int ret =3D -1; + + if (STREQ_NULLABLE(t, "value")) { + s =3D "{any}"; + ret =3D 0; + goto cleanup; + } + + switch (virJSONValueGetType(obj)) { + case VIR_JSON_TYPE_STRING: + if (STRNEQ_NULLABLE(t, "string")) + goto cleanup; + s =3D virJSONValueGetString(obj); + break; + + case VIR_JSON_TYPE_NUMBER: + if (STRNEQ_NULLABLE(t, "int") && + STRNEQ_NULLABLE(t, "number")) + goto cleanup; + s =3D "{number}"; + break; + + case VIR_JSON_TYPE_BOOLEAN: + if (STRNEQ_NULLABLE(t, "boolean")) + goto cleanup; + virJSONValueGetBoolean(obj, &b); + if (b) + s =3D "true"; + else + s =3D "false"; + break; + + case VIR_JSON_TYPE_NULL: + if (STRNEQ_NULLABLE(t, "null")) + goto cleanup; + break; + + case VIR_JSON_TYPE_OBJECT: + case VIR_JSON_TYPE_ARRAY: + goto cleanup; + } + + ret =3D 0; + + cleanup: + if (ret =3D=3D 0) + virBufferAsprintf(debug, "'%s': OK", s); + else + virBufferAsprintf(debug, "ERROR: expected type '%s', actual type %= d", + t, virJSONValueGetType(obj)); + return ret; +} + +struct testQEMUSchemaValidateObjectMemberData { + virJSONValuePtr rootmembers; + virHashTablePtr schema; + virBufferPtr debug; + bool missingMandatory; +}; + + +static virJSONValuePtr +testQEMUSchemaStealObjectMemberByName(const char *name, + virJSONValuePtr members) +{ + virJSONValuePtr member; + virJSONValuePtr ret =3D NULL; + size_t n; + size_t i; + + n =3D virJSONValueArraySize(members); + for (i =3D 0; i < n; i++) { + member =3D virJSONValueArrayGet(members, i); + + if (STREQ_NULLABLE(name, virJSONValueObjectGetString(member, "name= "))) { + ret =3D virJSONValueArraySteal(members, i); + break; + } + } + + return ret; +} + + +static int +testQEMUSchemaValidateObjectMember(const char *key, + virJSONValuePtr value, + void *opaque) +{ + struct testQEMUSchemaValidateObjectMemberData *data =3D opaque; + virJSONValuePtr keymember =3D NULL; + const char *keytype; + virJSONValuePtr keyschema =3D NULL; + int ret =3D -1; + + virBufferStrcat(data->debug, key, ": ", NULL); + + /* lookup 'member' entry for key */ + if (!(keymember =3D testQEMUSchemaStealObjectMemberByName(key, data->r= ootmembers))) { + virBufferAddLit(data->debug, "ERROR: attribute not in schema"); + goto cleanup; + } + + /* lookup schema entry for keytype */ + if (!(keytype =3D virJSONValueObjectGetString(keymember, "type")) || + !(keyschema =3D virHashLookup(data->schema, keytype))) { + virBufferAsprintf(data->debug, "ERROR: can't find schema for type = '%s'", + NULLSTR(keytype)); + ret =3D -2; + goto cleanup; + } + + /* recurse */ + ret =3D testQEMUSchemaValidateRecurse(value, keyschema, data->schema, + data->debug); + + cleanup: + virBufferAddLit(data->debug, "\n"); + virJSONValueFree(keymember); + return ret; +} + + +static int +testQEMUSchemaValidateObjectMergeVariantMember(size_t pos ATTRIBUTE_UNUSED, + virJSONValuePtr item, + void *opaque) +{ + virJSONValuePtr array =3D opaque; + virJSONValuePtr copy; + + if (!(copy =3D virJSONValueCopy(item))) + return -1; + + if (virJSONValueArrayAppend(array, copy) < 0) + return -1; + + return 1; +} + + +/** + * testQEMUSchemaValidateObjectMergeVariant: + * + * Merges schema of variant @variantname in @root into @root and removes t= he + * 'variants' array from @root. + */ +static int +testQEMUSchemaValidateObjectMergeVariant(virJSONValuePtr root, + const char *variantfield, + const char *variantname, + virHashTablePtr schema, + virBufferPtr debug) +{ + size_t n; + size_t i; + virJSONValuePtr variants =3D NULL; + virJSONValuePtr variant; + virJSONValuePtr variantschema; + virJSONValuePtr variantschemamembers; + virJSONValuePtr rootmembers; + const char *varianttype =3D NULL; + int ret =3D -1; + + if (!(variants =3D virJSONValueObjectStealArray(root, "variants"))) { + virBufferAddLit(debug, "ERROR: missing 'variants' in schema\n"); + return -2; + } + + n =3D virJSONValueArraySize(variants); + for (i =3D 0; i < n; i++) { + variant =3D virJSONValueArrayGet(variants, i); + + if (STREQ_NULLABLE(variantname, + virJSONValueObjectGetString(variant, "case"))) { + varianttype =3D virJSONValueObjectGetString(variant, "type"); + break; + } + } + + if (!varianttype) { + virBufferAsprintf(debug, "ERROR: variant '%s' for discriminator '%= s' not found\n", + variantname, variantfield); + goto cleanup; + + } + + if (!(variantschema =3D virHashLookup(schema, varianttype)) || + !(variantschemamembers =3D virJSONValueObjectGetArray(variantschem= a, "members"))) { + virBufferAsprintf(debug, + "ERROR: missing schema or schema members for var= iant '%s'(%s)\n", + variantname, varianttype); + ret =3D -2; + goto cleanup; + } + + rootmembers =3D virJSONValueObjectGetArray(root, "members"); + + if (virJSONValueArrayForeachSteal(variantschemamembers, + testQEMUSchemaValidateObjectMergeVar= iantMember, + rootmembers) < 0) { + ret =3D -2; + goto cleanup; + } + + ret =3D 0; + + cleanup: + virJSONValueFree(variants); + return ret; +} + + +static int +testQEMUSchemaValidateObjectMandatoryMember(size_t pos ATTRIBUTE_UNUSED, + virJSONValuePtr item, + void *opaque ATTRIBUTE_UNUSED) +{ + struct testQEMUSchemaValidateObjectMemberData *data =3D opaque; + + if (virJSONValueObjectHasKey(item, "default") !=3D 1) { + virBufferAsprintf(data->debug, "ERROR: missing mandatory attribute= '%s'\n", + NULLSTR(virJSONValueObjectGetString(item, "name"= ))); + data->missingMandatory =3D true; + } + + return 1; +} + + +static int +testQEMUSchemaValidateObject(virJSONValuePtr obj, + virJSONValuePtr root, + virHashTablePtr schema, + virBufferPtr debug) +{ + struct testQEMUSchemaValidateObjectMemberData data =3D { NULL, schema, + debug, false }; + virJSONValuePtr localroot =3D NULL; + const char *variantfield; + const char *variantname; + int ret =3D -1; + + if (virJSONValueGetType(obj) !=3D VIR_JSON_TYPE_OBJECT) { + virBufferAddLit(debug, "ERROR: not an object"); + return -1; + } + + virBufferAddLit(debug, "{\n"); + virBufferAdjustIndent(debug, 3); + + /* copy schema */ + if (!(localroot =3D virJSONValueCopy(root))) { + ret =3D -2; + goto cleanup; + } + + /* remove variant */ + if ((variantfield =3D virJSONValueObjectGetString(localroot, "tag"))) { + if (!(variantname =3D virJSONValueObjectGetString(obj, variantfiel= d))) { + virBufferAsprintf(debug, "ERROR: missing variant discriminator= attribute '%s'\n", + variantfield); + goto cleanup; + } + + if (testQEMUSchemaValidateObjectMergeVariant(localroot, variantfie= ld, + variantname, + schema, debug) < 0) + goto cleanup; + } + + + /* validate members */ + data.rootmembers =3D virJSONValueObjectGetArray(localroot, "members"); + if (virJSONValueObjectForeachKeyValue(obj, + testQEMUSchemaValidateObjectMemb= er, + &data) < 0) + goto cleanup; + + /* check missing mandatory values */ + if (virJSONValueArrayForeachSteal(data.rootmembers, + testQEMUSchemaValidateObjectMandator= yMember, + &data) < 0) { + ret =3D -2; + goto cleanup; + } + + if (data.missingMandatory) + goto cleanup; + + virBufferAdjustIndent(debug, -3); + virBufferAddLit(debug, "} OK"); + ret =3D 0; + + cleanup: + virJSONValueFree(localroot); + return ret; +} + + +static int +testQEMUSchemaValidateEnum(virJSONValuePtr obj, + virJSONValuePtr root, + virBufferPtr debug) +{ + const char *objstr; + virJSONValuePtr values =3D NULL; + virJSONValuePtr value; + size_t n; + size_t i; + + if (virJSONValueGetType(obj) !=3D VIR_JSON_TYPE_STRING) { + virBufferAddLit(debug, "ERROR: not a string"); + return -1; + } + + objstr =3D virJSONValueGetString(obj); + + if (!(values =3D virJSONValueObjectGetArray(root, "values"))) { + virBufferAsprintf(debug, "ERROR: missing enum values in schema '%s= '", + NULLSTR(virJSONValueObjectGetString(root, "name"= ))); + return -2; + } + + n =3D virJSONValueArraySize(values); + for (i =3D 0; i < n; i++) { + value =3D virJSONValueArrayGet(values, i); + + if (STREQ_NULLABLE(objstr, virJSONValueGetString(value))) { + virBufferAsprintf(debug, "'%s' OK", NULLSTR(objstr)); + return 0; + } + } + + virBufferAsprintf(debug, "ERROR: enum value '%s' is not in schema", + NULLSTR(objstr)); + return -1; +} + + +static int +testQEMUSchemaValidateArray(virJSONValuePtr objs, + virJSONValuePtr root, + virHashTablePtr schema, + virBufferPtr debug) +{ + const char *elemtypename =3D virJSONValueObjectGetString(root, "elemen= t-type"); + virJSONValuePtr elementschema; + virJSONValuePtr obj; + size_t n; + size_t i; + + if (virJSONValueGetType(objs) !=3D VIR_JSON_TYPE_ARRAY) { + virBufferAddLit(debug, "ERROR: not an array\n"); + return -1; + } + + if (!elemtypename || + !(elementschema =3D virHashLookup(schema, elemtypename))) { + virBufferAsprintf(debug, "ERROR: missing schema for array element = type '%s'", + NULLSTR(elemtypename)); + return -2; + } + + virBufferAddLit(debug, "[\n"); + virBufferAdjustIndent(debug, 3); + + n =3D virJSONValueArraySize(objs); + for (i =3D 0; i < n; i++) { + obj =3D virJSONValueArrayGet(objs, i); + + if (testQEMUSchemaValidateRecurse(obj, elementschema, schema, debu= g) < 0) + return -1; + virBufferAddLit(debug, ",\n"); + } + virBufferAddLit(debug, "] OK"); + virBufferAdjustIndent(debug, -3); + + return 0; +} + +static int +testQEMUSchemaValidateAlternate(virJSONValuePtr obj, + virJSONValuePtr root, + virHashTablePtr schema, + virBufferPtr debug) +{ + virJSONValuePtr members; + virJSONValuePtr member; + size_t n; + size_t i; + const char *membertype; + virJSONValuePtr memberschema; + int indent; + int rc; + + if (!(members =3D virJSONValueObjectGetArray(root, "members"))) { + virBufferAddLit(debug, "ERROR: missing 'members' for alternate sch= ema"); + return -2; + } + + virBufferAddLit(debug, "(\n"); + virBufferAdjustIndent(debug, 3); + indent =3D virBufferGetIndent(debug, false); + + n =3D virJSONValueArraySize(members); + for (i =3D 0; i < n; i++) { + membertype =3D NULL; + + /* P !=3D NP */ + virBufferAsprintf(debug, "(alternate %zu/%zu)\n", i + 1, n); + virBufferAdjustIndent(debug, 3); + + if (!(member =3D virJSONValueArrayGet(members, i)) || + !(membertype =3D virJSONValueObjectGetString(member, "type")) = || + !(memberschema =3D virHashLookup(schema, membertype))) { + virBufferAsprintf(debug, "ERROR: missing schema for alternate = type '%s'", + NULLSTR(membertype)); + return -2; + } + + rc =3D testQEMUSchemaValidateRecurse(obj, memberschema, schema, de= bug); + + virBufferAddLit(debug, "\n"); + virBufferSetIndent(debug, indent); + virBufferAsprintf(debug, "(/alternate %zu/%zu)\n", i + 1, n); + + if (rc =3D=3D 0) { + virBufferAdjustIndent(debug, -3); + virBufferAddLit(debug, ") OK"); + return 0; + } + } + + virBufferAddLit(debug, "ERROR: no alternate type was matched"); + return -1; +} + + +static int +testQEMUSchemaValidateRecurse(virJSONValuePtr obj, + virJSONValuePtr root, + virHashTablePtr schema, + virBufferPtr debug) +{ + const char *n =3D virJSONValueObjectGetString(root, "name"); + const char *t =3D virJSONValueObjectGetString(root, "meta-type"); + + if (STREQ_NULLABLE(t, "builtin")) { + return testQEMUSchemaValidateArrayBuiltin(obj, root, debug); + } else if (STREQ_NULLABLE(t, "object")) { + return testQEMUSchemaValidateObject(obj, root, schema, debug); + } else if (STREQ_NULLABLE(t, "enum")) { + return testQEMUSchemaValidateEnum(obj, root, debug); + } else if (STREQ_NULLABLE(t, "array")) { + return testQEMUSchemaValidateArray(obj, root, schema, debug); + } else if (STREQ_NULLABLE(t, "alternate")) { + return testQEMUSchemaValidateAlternate(obj, root, schema, debug); + } + + virBufferAsprintf(debug, + "qapi schema meta-type '%s' of type '%s' not handled= \n", + NULLSTR(t), NULLSTR(n)); + return -2; +} + + +/** + * testQEMUSchemaValidate: + * @obj: object to validate + * @root: schema entry to start from + * @schema: hash table containing schema entries + * @debug: a virBuffer which will be filled with debug information if prov= ided + * + * Validates whether @obj conforms to the QAPI schema passed in via @schem= a, + * starting from the node @root. Returns 0, if @obj matches @schema, -1 if= it + * does not and -2 if there is a problem with the schema or with internals. + * + * @debug is filled with information regarding the validation process + */ +int +testQEMUSchemaValidate(virJSONValuePtr obj, + virJSONValuePtr root, + virHashTablePtr schema, + virBufferPtr debug) +{ + return testQEMUSchemaValidateRecurse(obj, root, schema, debug); +} + + +virHashTablePtr +testQEMUSchemaLoad(void) +{ + virJSONValuePtr schemajson; + + if (!(schemajson =3D virTestLoadFileJSON("qemuqapischema.json", NULL))) + return NULL; + + return virQEMUQapiSchemaConvert(schemajson); +} diff --git a/tests/testutilsqemuschema.h b/tests/testutilsqemuschema.h new file mode 100644 index 0000000000..cb383db174 --- /dev/null +++ b/tests/testutilsqemuschema.h @@ -0,0 +1,30 @@ +/* + * testutilsqemuschema.h: helper functions for QEMU QAPI schema testing + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see + * . + */ + +#include "virhash.h" +#include "virjson.h" +#include "virbuffer.h" + +int +testQEMUSchemaValidate(virJSONValuePtr obj, + virJSONValuePtr root, + virHashTablePtr schema, + virBufferPtr debug); + +virHashTablePtr +testQEMUSchemaLoad(void); --=20 2.16.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri May 3 15:32:30 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1521743582606187.75290698836602; Thu, 22 Mar 2018 11:33:02 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8F3585D5E6; Thu, 22 Mar 2018 18:33:00 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4D86F82F63; Thu, 22 Mar 2018 18:33:00 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 070A6180BAD6; Thu, 22 Mar 2018 18:33:00 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w2MIW0N4015666 for ; Thu, 22 Mar 2018 14:32:00 -0400 Received: by smtp.corp.redhat.com (Postfix) id 229F38442E; Thu, 22 Mar 2018 18:32:00 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9FF2F84433; Thu, 22 Mar 2018 18:31:59 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Thu, 22 Mar 2018 19:31:46 +0100 Message-Id: <02185404159932aea64ddec782689d1ee42bc416.1521743167.git.pkrempa@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH 09/11] tests: qemumonitorjson: Fix few arguments of test cases X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Thu, 22 Mar 2018 18:33:01 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Prepare for testing of the schema of used commands by changing few arguments to values which will not be rejected. Signed-off-by: Peter Krempa --- tests/qemumonitorjsontest.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index 394e5dc446..a7fc814d4a 100644 --- a/tests/qemumonitorjsontest.c +++ b/tests/qemumonitorjsontest.c @@ -1332,11 +1332,11 @@ GEN_TEST_FUNC(qemuMonitorJSONSetMigrationDowntime, = 1) GEN_TEST_FUNC(qemuMonitorJSONMigrate, QEMU_MONITOR_MIGRATE_BACKGROUND | QEMU_MONITOR_MIGRATE_NON_SHARED_DISK | QEMU_MONITOR_MIGRATE_NON_SHARED_INC, "tcp:localhost:12345") -GEN_TEST_FUNC(qemuMonitorJSONDump, "dummy_protocol", "dummy_memory_dump_fo= rmat", +GEN_TEST_FUNC(qemuMonitorJSONDump, "dummy_protocol", "elf", true) GEN_TEST_FUNC(qemuMonitorJSONGraphicsRelocate, VIR_DOMAIN_GRAPHICS_TYPE_SP= ICE, "localhost", 12345, 12346, NULL) -GEN_TEST_FUNC(qemuMonitorJSONAddNetdev, "some_dummy_netdevstr") +GEN_TEST_FUNC(qemuMonitorJSONAddNetdev, "id=3Dnet0,type=3Dtest") GEN_TEST_FUNC(qemuMonitorJSONRemoveNetdev, "net0") GEN_TEST_FUNC(qemuMonitorJSONDelDevice, "ide0") GEN_TEST_FUNC(qemuMonitorJSONAddDevice, "some_dummy_devicestr") --=20 2.16.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri May 3 15:32:30 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 152174358643847.70100590376603; Thu, 22 Mar 2018 11:33:06 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 853EFC0587C3; Thu, 22 Mar 2018 18:33:04 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 213B36B8EE; Thu, 22 Mar 2018 18:33:04 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 97D36180BADB; Thu, 22 Mar 2018 18:33:03 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w2MIW0lM015675 for ; Thu, 22 Mar 2018 14:32:01 -0400 Received: by smtp.corp.redhat.com (Postfix) id D222D8442D; Thu, 22 Mar 2018 18:32:00 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5B4F984436; Thu, 22 Mar 2018 18:32:00 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Thu, 22 Mar 2018 19:31:47 +0100 Message-Id: <172ea5cd0acd19f71a16b44d2fca5296b30d24f7.1521743167.git.pkrempa@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH 10/11] tests: qemumonitor: Allow testing schema for fake monitor interactions X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Thu, 22 Mar 2018 18:33:05 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Add infrastructure that will allow testing schema of the commands we pass to the fake monitor object, so that we can make sure that it actually does something. Signed-off-by: Peter Krempa --- tests/Makefile.am | 2 +- tests/qemuhotplugtest.c | 3 +- tests/qemumonitortestutils.c | 85 ++++++++++++++++++++++++++++++++++++++++= ++-- tests/qemumonitortestutils.h | 7 ++-- 4 files changed, 90 insertions(+), 7 deletions(-) diff --git a/tests/Makefile.am b/tests/Makefile.am index cf254f65c3..289ef35bdd 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -555,6 +555,7 @@ endif ! WITH_LIBXL QEMUMONITORTESTUTILS_SOURCES =3D \ qemumonitortestutils.c \ qemumonitortestutils.h \ + testutilsqemuschema.h testutilsqemuschema.c \ $(NULL) if WITH_QEMU @@ -616,7 +617,6 @@ qemumonitorjsontest_SOURCES =3D \ qemumonitorjsontest.c \ testutils.c testutils.h \ testutilsqemu.c testutilsqemu.h \ - testutilsqemuschema.c testutilsqemuschema.h \ $(NULL) qemumonitorjsontest_LDADD =3D libqemumonitortestutils.la \ $(qemu_LDADDS) $(LDADDS) diff --git a/tests/qemuhotplugtest.c b/tests/qemuhotplugtest.c index d42f8e12cb..85e53653e1 100644 --- a/tests/qemuhotplugtest.c +++ b/tests/qemuhotplugtest.c @@ -283,7 +283,8 @@ testQemuHotplug(const void *data) /* Now is the best time to feed the spoofed monitor with predefined * replies. */ - if (!(test_mon =3D qemuMonitorTestNew(true, driver.xmlopt, vm, &driver= , NULL))) + if (!(test_mon =3D qemuMonitorTestNew(true, driver.xmlopt, vm, &driver, + NULL, NULL))) goto cleanup; tmp =3D test->mon; diff --git a/tests/qemumonitortestutils.c b/tests/qemumonitortestutils.c index 5e30fb067c..1232b8ebe3 100644 --- a/tests/qemumonitortestutils.c +++ b/tests/qemumonitortestutils.c @@ -25,12 +25,14 @@ #include #include "testutils.h" +#include "testutilsqemuschema.h" #include "qemumonitortestutils.h" #include "virthread.h" #include "qemu/qemu_processpriv.h" #include "qemu/qemu_monitor.h" #include "qemu/qemu_agent.h" +#include "qemu/qemu_qapi.h" #include "rpc/virnetsocket.h" #include "viralloc.h" #include "virlog.h" @@ -76,6 +78,7 @@ struct _qemuMonitorTest { qemuMonitorTestItemPtr *items; virDomainObjPtr vm; + virHashTablePtr qapischema; }; @@ -537,6 +540,67 @@ qemuMonitorTestHandlerDataFree(void *opaque) VIR_FREE(data); } + +/* Returns -1 on error, 0 if validation was successful/not necessary, 1 if + * the validation has failed, and the reply was properly constructed */ +static int +qemuMonitorTestProcessCommandDefaultValidate(qemuMonitorTestPtr test, + const char *cmdname, + virJSONValuePtr args) +{ + virBuffer debug =3D VIR_BUFFER_INITIALIZER; + virJSONValuePtr schemaroot; + virJSONValuePtr emptyargs =3D NULL; + char *schemapath =3D NULL; + int ret =3D -1; + + if (!test->qapischema || !test->json || test->agent) + return 0; + + /* 'device_add' needs to be skipped as it does not have fully defined = schema */ + if (STREQ(cmdname, "device_add")) + return 0; + + if (virAsprintf(&schemapath, "%s/arg-type", cmdname) < 0) + goto cleanup; + + if (virQEMUQapiSchemaPathGet(schemapath, test->qapischema, &schemaroot= ) < 0) { + if (qemuMonitorReportError(test, + "command '%s' not found in QAPI schema", + cmdname) =3D=3D 0) + ret =3D 1; + goto cleanup; + } + + if (!args) { + if (!(emptyargs =3D virJSONValueNewObject())) + goto cleanup; + + args =3D emptyargs; + } + + if (testQEMUSchemaValidate(args, schemaroot, test->qapischema, &debug)= < 0) { + char *debugmsg =3D virBufferContentAndReset(&debug); + if (qemuMonitorReportError(test, + "failed to validate arguments of '%s' " + "against QAPI schema: %s", + cmdname, debugmsg) =3D=3D 0) + ret =3D 1; + + VIR_FREE(debugmsg); + goto cleanup; + } + + ret =3D 0; + + cleanup: + virBufferFreeAndReset(&debug); + virJSONValueFree(emptyargs); + VIR_FREE(schemapath); + return ret; +} + + static int qemuMonitorTestProcessCommandDefault(qemuMonitorTestPtr test, qemuMonitorTestItemPtr item, @@ -544,10 +608,12 @@ qemuMonitorTestProcessCommandDefault(qemuMonitorTestP= tr test, { struct qemuMonitorTestHandlerData *data =3D item->opaque; virJSONValuePtr val =3D NULL; + virJSONValuePtr cmdargs =3D NULL; char *cmdcopy =3D NULL; const char *cmdname; char *tmp; int ret =3D -1; + int rc; if (test->agent || test->json) { if (!(val =3D virJSONValueFromString(cmdstr))) @@ -557,6 +623,8 @@ qemuMonitorTestProcessCommandDefault(qemuMonitorTestPtr= test, ret =3D qemuMonitorReportError(test, "Missing command name in = %s", cmdstr); goto cleanup; } + + cmdargs =3D virJSONValueObjectGet(val, "arguments"); } else { if (VIR_STRDUP(cmdcopy, cmdstr) < 0) return -1; @@ -572,6 +640,14 @@ qemuMonitorTestProcessCommandDefault(qemuMonitorTestPt= r test, *tmp =3D '\0'; } + if ((rc =3D qemuMonitorTestProcessCommandDefaultValidate(test, cmdname= , cmdargs)) < 0) + goto cleanup; + + if (rc =3D=3D 1) { + ret =3D 0; + goto cleanup; + } + if (data->command_name && STRNEQ(data->command_name, cmdname)) ret =3D qemuMonitorTestAddInvalidCommandResponse(test, data->comma= nd_name, cmdname); @@ -1160,7 +1236,8 @@ qemuMonitorTestNew(bool json, virDomainXMLOptionPtr xmlopt, virDomainObjPtr vm, virQEMUDriverPtr driver, - const char *greeting) + const char *greeting, + virHashTablePtr schema) { qemuMonitorTestPtr test =3D NULL; virDomainChrSourceDef src; @@ -1171,6 +1248,7 @@ qemuMonitorTestNew(bool json, goto error; test->json =3D json; + test->qapischema =3D schema; if (!(test->mon =3D qemuMonitorOpen(test->vm, &src, json, @@ -1249,7 +1327,8 @@ qemuMonitorTestNewFromFile(const char *fileName, goto error; } else { /* Create new mocked monitor with our greeting */ - if (!(test =3D qemuMonitorTestNew(true, xmlopt, NULL, NULL= , singleReply))) + if (!(test =3D qemuMonitorTestNew(true, xmlopt, NULL, NULL, + singleReply, NULL))) goto error; } @@ -1331,7 +1410,7 @@ qemuMonitorTestNewFromFileFull(const char *fileName, if (virTestLoadFile(fileName, &jsonstr) < 0) return NULL; - if (!(ret =3D qemuMonitorTestNew(true, driver->xmlopt, vm, driver, NUL= L))) + if (!(ret =3D qemuMonitorTestNew(true, driver->xmlopt, vm, driver, NUL= L, NULL))) goto cleanup; tmp =3D jsonstr; diff --git a/tests/qemumonitortestutils.h b/tests/qemumonitortestutils.h index 8b19b37e71..d3dc02933b 100644 --- a/tests/qemumonitortestutils.h +++ b/tests/qemumonitortestutils.h @@ -74,13 +74,16 @@ int qemuMonitorTestAddItemExpect(qemuMonitorTestPtr tes= t, const char *response); # define qemuMonitorTestNewSimple(json, xmlopt) \ - qemuMonitorTestNew(json, xmlopt, NULL, NULL, NULL) + qemuMonitorTestNew(json, xmlopt, NULL, NULL, NULL, NULL) +# define qemuMonitorTestNewSchema(xmlopt, schema) \ + qemuMonitorTestNew(true, xmlopt, NULL, NULL, NULL, schema) qemuMonitorTestPtr qemuMonitorTestNew(bool json, virDomainXMLOptionPtr xmlopt, virDomainObjPtr vm, virQEMUDriverPtr driver, - const char *greeting); + const char *greeting, + virHashTablePtr schema); qemuMonitorTestPtr qemuMonitorTestNewFromFile(const char *fileName, virDomainXMLOptionPtr xmlopt, --=20 2.16.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri May 3 15:32:30 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1521744218813306.315619159211; Thu, 22 Mar 2018 11:43:38 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5365A612A5; Thu, 22 Mar 2018 18:43:37 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6369B8306E; Thu, 22 Mar 2018 18:34:09 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 18D974CAA6; Thu, 22 Mar 2018 18:34:09 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w2MIW15I015713 for ; Thu, 22 Mar 2018 14:32:01 -0400 Received: by smtp.corp.redhat.com (Postfix) id 8D73484433; Thu, 22 Mar 2018 18:32:01 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id 16DA16F9E2; Thu, 22 Mar 2018 18:32:00 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Thu, 22 Mar 2018 19:31:48 +0100 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH 11/11] tests: qemumonitorjson: Do some useful testing in the 'simple' tests X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Thu, 22 Mar 2018 18:43:37 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The 'simple' monitor tests were quite useless, since the code did not even check whether the correct command was called. This patch uses the QAPI schema validator to validate that the arguments are in format according to the schema. Signed-off-by: Peter Krempa --- tests/qemumonitorjsontest.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index a7fc814d4a..97c4fb0a02 100644 --- a/tests/qemumonitorjsontest.c +++ b/tests/qemumonitorjsontest.c @@ -42,6 +42,7 @@ struct _testQemuMonitorJSONSimpleFuncData { int (* func) (qemuMonitorPtr mon); virDomainXMLOptionPtr xmlopt; const char *reply; + virHashTablePtr schema; }; const char *queryBlockReply =3D @@ -1266,7 +1267,7 @@ testQemuMonitorJSONSimpleFunc(const void *opaque) testQemuMonitorJSONSimpleFuncDataPtr data =3D (testQemuMonitorJSONSimpleFuncDataPtr) opaque; virDomainXMLOptionPtr xmlopt =3D data->xmlopt; - qemuMonitorTestPtr test =3D qemuMonitorTestNewSimple(true, xmlopt); + qemuMonitorTestPtr test =3D qemuMonitorTestNewSchema(xmlopt, data->sch= ema); const char *reply =3D data->reply; int ret =3D -1; @@ -2896,6 +2897,13 @@ mymain(void) virEventRegisterDefaultImpl(); + if (!(qapiData.schema =3D testQEMUSchemaLoad())) { + VIR_TEST_VERBOSE("failed to load qapi schema\n"); + ret =3D -1; + goto cleanup; + } + simpleFunc.schema =3D qapiData.schema; + #define DO_TEST(name) \ if (virTestRun(# name, testQemuMonitorJSON ## name, driver.xmlopt) < 0= ) \ ret =3D -1 @@ -3042,11 +3050,6 @@ mymain(void) ret =3D -1; \ } while (0) - if (!(qapiData.schema =3D testQEMUSchemaLoad())) { - VIR_TEST_VERBOSE("failed to load qapi schema\n"); - ret =3D -1; - goto cleanup; - } DO_TEST_QAPI_SCHEMA("string", "trace-event-get-state/arg-type", true, "{\"name\":\"test\"}"); --=20 2.16.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list