qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] QMP: allow JSON dict arguments in qmp-shell


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH] QMP: allow JSON dict arguments in qmp-shell
Date: Wed, 29 Jan 2014 08:48:13 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

On 01/29/2014 04:17 AM, Stefan Hajnoczi wrote:
> qmp-shell hides the QMP wire protocol JSON encoding from the user.  Most
> of the time this is helpful and makes the command-line human-friendly.
> 
> Some QMP commands take a dict as an argument.  In order to express this
> we need to revert back to JSON notation.
> 
> This patch allows JSON dict arguments in qmp-shell so commands like
> blockdev-add and nbd-server-start can be invoked:
> 
>   (QEMU) blockdev-add options={"driver":"file","id":"drive1",...}
> 
> Note that spaces are not allowed since str.split() is used to break up
> the command-line arguments first.
> 
> Signed-off-by: Stefan Hajnoczi <address@hidden>
> ---
>  scripts/qmp/qmp-shell | 3 +++
>  1 file changed, 3 insertions(+)

Reviewed-by: Eric Blake <address@hidden>

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]