From: Eric Blake <eblake@redhat.com>
To: marcandre.lureau@redhat.com, qemu-devel@nongnu.org
Cc: armbru@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2 02/12] qapi-schema: add 'device_add'
Date: Thu, 21 Jul 2016 14:44:11 -0600 [thread overview]
Message-ID: <5791341B.3040903@redhat.com> (raw)
In-Reply-To: <20160721140030.28383-3-marcandre.lureau@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1892 bytes --]
On 07/21/2016 08:00 AM, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> Even though device_add is not fully qapi'fied, we may add it to the json
> schema with 'gen': false, so registration and documentation can be
> generated.
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
> qapi-schema.json | 29 +++++++++++++++++++++++++++++
> 1 file changed, 29 insertions(+)
> +++ b/qapi-schema.json
> @@ -2200,6 +2200,35 @@
> ##
> { 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
>
> +##
> +# @device_add:
> +#
> +# @driver: the name of the new device's driver
> +# @bus: #optional the device's parent bus (device tree path)
> +# @id: the device's ID, must be unique
> +# @props: #optional a dictionary of properties to be passed to the backend
> +#
> +# Add a device.
> +#
> +# Notes:
> +# 1. For detailed information about this command, please refer to the
> +# 'docs/qdev-device-use.txt' file.
> +#
> +# 2. It's possible to list device properties by running QEMU with the
> +# "-device DEVICE,help" command-line argument, where DEVICE is the
> +# device's name
> +#
> +# Example:
> +#
> +# -> { "execute": "device_add",
> +# "arguments": { "driver": "e1000", "id": "net1" } }
Is it worth an example that includes 'bus' and/or 'props'?
> +# <- { "return": {} }
> +#
> +# Since: 0.13
> +##
> +{ 'command': 'device_add',
> + 'data': {'driver': 'str', 'id': 'str'}, 'gen': false }
The documentation mentions fields not listed here, but the 'gen':false
explains why. We may yet get device_add QAPIfied for 2.8, but there's
nothing wrong with documenting things now.
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
next prev parent reply other threads:[~2016-07-21 20:44 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-21 14:00 [Qemu-devel] [PATCH v2 00/12] qapi: remove the 'middle' mode marcandre.lureau
2016-07-21 14:00 ` [Qemu-devel] [PATCH v2 01/12] qapi-schema: use generated marshaller for 'qmp_capabilities' marcandre.lureau
2016-08-05 10:52 ` Markus Armbruster
2016-07-21 14:00 ` [Qemu-devel] [PATCH v2 02/12] qapi-schema: add 'device_add' marcandre.lureau
2016-07-21 20:44 ` Eric Blake [this message]
2016-07-22 7:13 ` Marc-André Lureau
2016-08-05 12:10 ` Markus Armbruster
2016-07-21 14:00 ` [Qemu-devel] [PATCH v2 03/12] monitor: register gen:false commands manually marcandre.lureau
2016-07-21 20:50 ` Eric Blake
2016-07-21 14:00 ` [Qemu-devel] [PATCH v2 04/12] monitor: remove usage of generated marshal functions marcandre.lureau
2016-08-05 12:17 ` Markus Armbruster
2016-08-05 12:22 ` Marc-André Lureau
2016-08-05 13:43 ` Markus Armbruster
2016-07-21 14:00 ` [Qemu-devel] [PATCH v2 05/12] monitor: register the qapi generated commands marcandre.lureau
2016-07-21 20:56 ` Eric Blake
2016-08-05 12:42 ` Markus Armbruster
2016-08-08 10:10 ` Paolo Bonzini
2016-07-21 14:00 ` [Qemu-devel] [PATCH v2 06/12] monitor: remove mhandler.cmd_new marcandre.lureau
2016-07-21 21:02 ` Eric Blake
2016-07-22 7:20 ` Marc-André Lureau
2016-08-05 12:52 ` Markus Armbruster
2016-08-05 13:00 ` Marc-André Lureau
2016-08-05 13:44 ` Markus Armbruster
2016-07-21 14:00 ` [Qemu-devel] [PATCH v2 07/12] monitor: implement 'qmp_query_commands' without qmp_cmds marcandre.lureau
2016-07-21 22:51 ` Eric Blake
2016-08-05 13:25 ` Markus Armbruster
2016-07-21 14:00 ` [Qemu-devel] [PATCH v2 08/12] build-sys: remove qmp-commands-old.h marcandre.lureau
2016-07-21 22:52 ` Eric Blake
2016-07-21 14:00 ` [Qemu-devel] [PATCH v2 09/12] qapi: remove the "middle" mode marcandre.lureau
2016-07-21 22:55 ` Eric Blake
2016-07-22 7:35 ` Marc-André Lureau
2016-08-05 13:31 ` Markus Armbruster
2016-07-21 14:00 ` [Qemu-devel] [PATCH v2 10/12] monitor: use qmp_dispatch() marcandre.lureau
2016-08-05 14:43 ` Markus Armbruster
2016-07-21 14:00 ` [Qemu-devel] [PATCH v2 11/12] qmp: update qmp_query_spice fallback marcandre.lureau
2016-08-05 13:40 ` Markus Armbruster
2016-08-05 13:43 ` Marc-André Lureau
2016-08-05 14:38 ` Markus Armbruster
2016-07-21 14:00 ` [Qemu-devel] [PATCH v2 12/12] Drop qmp-commands.hx marcandre.lureau
2016-08-05 14:56 ` Markus Armbruster
2016-08-05 18:32 ` Marc-André Lureau
2016-08-09 13:08 ` Markus Armbruster
2016-08-09 14:50 ` Marc-André Lureau
2016-08-09 16:32 ` Markus Armbruster
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5791341B.3040903@redhat.com \
--to=eblake@redhat.com \
--cc=armbru@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.