From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:47191) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVLG7-0005hG-Jg for qemu-devel@nongnu.org; Thu, 25 Apr 2013 08:26:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UVLG1-0003qL-T3 for qemu-devel@nongnu.org; Thu, 25 Apr 2013 08:26:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57393) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVLG1-0003oP-LA for qemu-devel@nongnu.org; Thu, 25 Apr 2013 08:26:37 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r3PCQaL4013378 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 25 Apr 2013 08:26:36 -0400 Date: Thu, 25 Apr 2013 08:26:35 -0400 From: Luiz Capitulino Message-ID: <20130425082635.5333288a@redhat.com> In-Reply-To: <517855B3.6060604@redhat.com> References: <20130424163641.3e15bd43@redhat.com> <51784913.6020209@redhat.com> <20130424172911.753616ea@redhat.com> <517855B3.6060604@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH for-1.5] qmp: add query-drive-mirror-capabilities List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: Kevin Wolf , Paolo Bonzini , qemu-devel On Wed, 24 Apr 2013 15:59:15 -0600 Eric Blake wrote: > On 04/24/2013 03:29 PM, Luiz Capitulino wrote: > >> -> { "execute": "query-command-capabilities" } > >> <- { [ { "type": "drive-mirror", > >> "data": [ "granularity", "buf-size" ] }, > >> { "type", ... } > >> ] } > >> > >> And whether a '*command' argument should be optional for filtered > >> output, vs. always unconditionally dumping all information on all > >> commands with capabilities, vs. mandatory (can only get capabilities for > >> one command at a time), all goes back to the larger question of whether > >> query-* commands should allow filtering. > > > > Not discussing filtering for now, but your proposal would superseded by > > full introspection, wouldn't it? > > Yeah, the two do seem rather similar, in that they are both providing a > form of introspection. As I see it, it boils down to WHAT is being > introspected: > > With query-command-capabilities, we are asking about capabilities, which > can always be represented as pure enum values (either the capability is > present or it is not). For DriveMirrorCapabilities we happened to map > two enum values to the name of two optional drive-mirror parameters; but > where we could introduce other capabilities that are unrelated to an > optional parameter; That's a good point, although I wonder if a command could have a new capability that's not mapped to a new argument. IOW, I'd expect most/all new capabilities to always be mapped to new arguments. In any case, I think the way to go is to add full introspection and then add query-command-capabilities afterwards if it turns out to be necessary.