From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:59095) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S0GQU-0004FW-Da for qemu-devel@nongnu.org; Wed, 22 Feb 2012 12:56:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S0GQT-0008Sd-1W for qemu-devel@nongnu.org; Wed, 22 Feb 2012 12:56:26 -0500 Received: from mail-pw0-f45.google.com ([209.85.160.45]:54451) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S0GQS-0008SW-SX for qemu-devel@nongnu.org; Wed, 22 Feb 2012 12:56:25 -0500 Received: by pbbro12 with SMTP id ro12so503705pbb.4 for ; Wed, 22 Feb 2012 09:56:23 -0800 (PST) Message-ID: <4F452C43.1030907@codemonkey.ws> Date: Wed, 22 Feb 2012 11:56:19 -0600 From: Anthony Liguori MIME-Version: 1.0 References: <4F450170.5070806@codemonkey.ws> <4F4513FE.4070100@redhat.com> <4F45275E.4000304@codemonkey.ws> <4F452A38.2060204@redhat.com> In-Reply-To: <4F452A38.2060204@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/3] qapi: Allow QMP/QAPI commands to have array inputs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: Kevin Wolf , Markus Armbruster , jcody@redhat.com, qemu-devel@nongnu.org, Luiz Capitulino 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