[Top][All Lists]

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

Re: [Qemu-devel] [PATCH v2 2/3] block: add block-backup QMP command

From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v2 2/3] block: add block-backup QMP command
Date: Mon, 13 May 2013 08:50:36 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130402 Thunderbird/17.0.5

On 05/13/2013 08:27 AM, Kevin Wolf wrote:
> I think long term we'll need a dynamic schema anyway. As we go forward
> with modularisation and putting things into shared libraries, we'll have
> modules that add support for commands, enum values, etc.

In other words, qapi-schema.json should have a way to declare a
dynamic-enum, where introspection on that enum will see what is made
available at runtime, rather than manually listing the enum contents
directly in the .json file.

> Providing the full list of theoretically available elements (i.e. what
> would be there, if everything was compiled and all modules were loaded)
> would probably implement the spec for the introspection interfaces by the
> letter, but just give useless information. Callers want to know what's
> really there.
> If we're going to have a query-* command for everything, then we don't
> need introspection at all. I would however prefer having the uniform
> schema introspection and building the schema at runtime instead of many
> separate query-* commands.

Indeed, having introspection of a dynamic enum results in fewer commands
overall, by making a reusable command have more power.  And maybe it's
possible to have introspection do both - with an optional boolean
parameter that distinguishes between full vs. runtime querying of any
enum type.

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]