[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 06/11] qmp: add interface query-image
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH 06/11] qmp: add interface query-image |
Date: |
Fri, 04 Jan 2013 16:48:30 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 |
On 12/29/2012 01:45 AM, Wenchao Xia wrote:
> This mirror function will return all image info including
> snapshots. Now Qemu have both query-image and query-block
> interfaces, and qemu-img share the code for image info
> retrieving with qemu emulator.
>
> Signed-off-by: Wenchao Xia <address@hidden>
> ---
> block.c | 16 ++++++++++++++++
> qapi-schema.json | 11 +++++++++++
> 2 files changed, 27 insertions(+), 0 deletions(-)
Should there be a counterpart change to qmp-commands.hx, demonstrating
the type of output expected?
>
> ##
> +# @query-image:
> +#
> +# Get a list of BlockImage for all virtual block devices.
> +#
> +# Returns: a list of @BlockImage describing each virtual block device
Here, you use BlockImage twice,
> +#
> +# Since: 1.4
> +##
> +{ 'command': 'query-image', 'returns': ['ImageInfo'] }
but here, the type is named ImageInfo.
This interface is weak - it tells me a list of filenames that are in
use, but doesn't tell me which element of the array is tied to which device.
Also, this command is singular, but returns a plural listing; elsewhere,
we have used plurals (think query-commands).
I'd rather see something like:
{ 'type': 'DeviceImageInfo',
'data': {'device': 'str', 'info': 'ImageInfo' } }
{ 'command': 'query-images', 'returns': ['DeviceImageInfo'] }
so that I can get the pairings between
[{ 'device':'virtio0', 'info':{ 'filename':'/path1', ...} },
{ 'device':'virtio1', 'info':{ 'filename':'/path2', ...} }]
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Qemu-devel] [PATCH 06/11] qmp: add interface query-image,
Eric Blake <=