From: Eric Blake <eblake@redhat.com>
To: Don Slutz <dslutz@verizon.com>, qemu-devel@nongnu.org
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
"Markus Armbruster" <armbru@redhat.com>,
"Luiz Capitulino" <lcapitulino@redhat.com>,
"Anthony Liguori" <aliguori@amazon.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Andreas Färber" <afaerber@suse.de>,
"Richard Henderson" <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PATCH v5 4/7] vmport_rpc: Add QMP access to vmport_rpc object.
Date: Tue, 05 May 2015 07:02:05 -0600 [thread overview]
Message-ID: <5548BF4D.9090301@redhat.com> (raw)
In-Reply-To: <1430418035-8510-5-git-send-email-dslutz@verizon.com>
[-- Attachment #1: Type: text/plain, Size: 2612 bytes --]
On 04/30/2015 12:20 PM, Don Slutz wrote:
> This adds one new inject command:
>
> inject-vmport-action
>
> And three guest info commands:
>
> vmport-guestinfo-set
> vmport-guestinfo-get
> query-vmport-guestinfo
>
> More details in qmp-commands.hx
>
> Signed-off-by: Don Slutz <dslutz@verizon.com>
> ---
> +++ b/qapi-schema.json
> @@ -1295,6 +1295,96 @@
> { 'command': 'inject-nmi' }
>
> +##
> +# @vmport-guestinfo-get:
> +#
> +# Get a VMWare Tools guestinfo value for a key
> +#
> +# @key: the key to get
> +#
> +# @format: #optional data encoding (default 'utf8').
> +# - base64: the value is returned in base64 encoding.
> +# - utf8: the value is interpreted as UTF-8.
> +#
> +# Returns: value for the guest info key
> +#
> +# Since: 2.4
> +##
> +{ 'command': 'vmport-guestinfo-get',
> + 'data': {'key': 'str', '*format': 'DataFormat'},
> + 'returns': 'str' }
Returning a non-dictionary is not extensible. Once my qapi nested
struct series is applied, you'd have to modify the whitelist to allow
this command. Better would be to return things in a dictionary, as in:
{ 'command': 'vmport-guestinfo-get',
'data': {'key': 'str', '*format': 'DataFormat'},
'returns': {'data':'str'} }
> +
> +##
> +# @VmportGuestInfo:
> +#
> +# Information about a single VMWare Tools guestinfo
> +#
> +# @key: The known key
> +#
> +# Since: 2.4
> +##
> +{ 'type': 'VmportGuestInfo', 'data': {'key': 'str'} }
Also, once my series is in, you'll need to s/type/struct/
> +++ b/qmp-commands.hx
> @@ -490,6 +490,126 @@ Note: inject-nmi fails when the guest doesn't support injecting.
> EQMP
>
> {
> + .name = "inject-vmport-action",
> + .args_type = "action:s",
> + .mhandler.cmd_new = qmp_marshal_input_inject_vmport_action,
> + },
> +
> +SQMP
> +inject-vmport-action
> +----------
Cosmetic, but the majority of the file matches the length of the -----
to the command it is underlining.
> +
> +-> { "execute": "vmport-guestinfo-get",
> + "arguments": { "key": "foo",
> + "format": "utf8" } }
> +<- {"return": "abcdefgh"}
Again, I don't like the notion of returning a non-dictionary without
good cause.
> +-> { "execute": "query-vmport-guestinfo" }
> +<- {
> + "return": [
> + {
> + "key": "ip",
> + },
Invalid JSON - no trailing commas allowed in the objects.
--
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:[~2015-05-05 13:02 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-30 18:20 [Qemu-devel] [PATCH v5 0/7] Add limited support of VMware's hyper-call rpc Don Slutz
2015-04-30 18:20 ` [Qemu-devel] [PATCH v5 1/7] vmport.c: Fix vmport_cmd_ram_size Don Slutz
2015-04-30 18:20 ` [Qemu-devel] [PATCH v5 2/7] vmport_rpc: Add the object vmport_rpc Don Slutz
2015-04-30 18:20 ` [Qemu-devel] [PATCH v5 3/7] vmport_rpc: Add limited support of VMware's hyper-call rpc Don Slutz
2015-04-30 18:20 ` [Qemu-devel] [PATCH v5 4/7] vmport_rpc: Add QMP access to vmport_rpc object Don Slutz
2015-05-05 13:02 ` Eric Blake [this message]
2015-05-12 18:45 ` Don Slutz
2015-04-30 18:20 ` [Qemu-devel] [PATCH v5 5/7] vmport_rpc: Add migration Don Slutz
2015-04-30 18:20 ` [Qemu-devel] [PATCH v5 6/7] vmport: Add VMware all ring hack Don Slutz
2015-04-30 18:20 ` [Qemu-devel] [PATCH v5 7/7] MAINTAINERS: add VMware port Don Slutz
2015-05-05 10:49 ` [Qemu-devel] [PATCH v5 0/7] Add limited support of VMware's hyper-call rpc Paolo Bonzini
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=5548BF4D.9090301@redhat.com \
--to=eblake@redhat.com \
--cc=afaerber@suse.de \
--cc=aliguori@amazon.com \
--cc=armbru@redhat.com \
--cc=dslutz@verizon.com \
--cc=lcapitulino@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).