|
From: | Anthony Liguori |
Subject: | Re: [Qemu-devel] Proposal for extensions of block job commands in QEMU 1.2 |
Date: | Mon, 21 May 2012 09:40:41 -0500 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120329 Thunderbird/11.0.1 |
On 05/21/2012 09:26 AM, Paolo Bonzini wrote:
Il 21/05/2012 16:19, Anthony Liguori ha scritto:I'm not against it in principle, just in practice. Today, checking whether a command exists is: commands = qmp.query_commands() if 'block-stream' in commands: # has block-stream I have a hard time envisioning how schema introspection can be reasonably implemented in a client.schema = qmp.query_command_schema('block-stream')
What would schema return? Did you mean: if schema['arguments'].has_key('on_error'): What about adding a parameter to a structure?BTW, the other problem with adding arguments like this is that it makes a stable C API impossible.
Regards, Anthony Liguori
if 'on-error' in schema: # has on-error Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |