|
From: | Anthony Liguori |
Subject: | Re: [Qemu-devel] [PATCH 1/3] qapi: Allow QMP/QAPI commands to have array inputs |
Date: | Wed, 22 Feb 2012 11:56:19 -0600 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.23) Gecko/20110922 Lightning/1.0b2 Thunderbird/3.1.15 |
On 02/22/2012 11:47 AM, Eric Blake wrote:
On 02/22/2012 10:35 AM, Anthony Liguori wrote:[1] JSON schema definition: { 'type': 'SnapshotDev', 'data': {'device': 'str', 'snapshot-file': 'str', '*format': 'str' } } { 'command': 'blockdev-group-snapshot-sync', 'data': { 'dev': [ 'SnapshotDev' ] } }This will end up looking like: { "execute": "blockdev-group-snapshot-sync", "arguments": { "dev": [{"device": "ide-hd0"....}] } }Does that mean we want it to look more like: { 'command': 'blockdev-group-snapshot-sync', 'data': { 'devlist': [ 'SnapshotDev' ] } } and used like: { "execute": "blockdev-group-snapshot-sync", "arguments": { "devlist": [{ "device": "ide-hd0" ...}, { "device": "ide-hd1" ...}] } }
Yes, devlist is a better variable name.
I don't quite care what syntax we use, as long as we settle on something soon, because I'm trying to code up libvirt to generate this new monitor command, and need to know what syntax it will use.
Just FYI, I've looked at the QAPI bits so far. I would suggest getting an Ack from Kevin at least that this API is reasonable inline with what we're looking for here before you start doing libvirt support.
Personally, I loathe the idea of extending an already broken interface... I would rather we fix the original interface first before tacking on additional features.
Regards, Anthony Liguori
[Prev in Thread] | Current Thread | [Next in Thread] |