From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:40712) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UV7ii-0000N3-Se for qemu-devel@nongnu.org; Wed, 24 Apr 2013 17:59:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UV7ig-0005jy-5K for qemu-devel@nongnu.org; Wed, 24 Apr 2013 17:59:20 -0400 Received: from mx1.redhat.com ([209.132.183.28]:12751) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UV7if-0005ja-Ss for qemu-devel@nongnu.org; Wed, 24 Apr 2013 17:59:18 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r3OLxGo9014305 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 24 Apr 2013 17:59:16 -0400 Message-ID: <517855B3.6060604@redhat.com> Date: Wed, 24 Apr 2013 15:59:15 -0600 From: Eric Blake MIME-Version: 1.0 References: <20130424163641.3e15bd43@redhat.com> <51784913.6020209@redhat.com> <20130424172911.753616ea@redhat.com> In-Reply-To: <20130424172911.753616ea@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="----enig2XKAATPTHFSDNIGMAPMIW" 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: Luiz Capitulino Cc: Kevin Wolf , Paolo Bonzini , qemu-devel This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2XKAATPTHFSDNIGMAPMIW Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 f= or >> one command at a time), all goes back to the larger question of whethe= r >> query-* commands should allow filtering. >=20 > 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; also, we aren't polluting the output with parameters that don't really reflect capability additions, so even if we don't provide filtering, the output of a query-command-capabilities will be relatively small compared to the number of total QMP commands. With full-blown command introspection, we would want to be asking for a JSON representation more details about each parameter, in a struct that looks something like { 'name':'str', 'type':'', 'optional':'boolean', '*default':'', '*documentation':'str' }. If we don't provide filtering, then this JSON output might be quite large, because it covers all QMP commands, >=20 > Anyways, I also agree it's a good idea to defer this to 1.6 so we can > revisit this topic later. That relieves some pressure :) --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org ------enig2XKAATPTHFSDNIGMAPMIW Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJReFWzAAoJEKeha0olJ0NqOioH/0c0GCL+ABBvR6kkr7tw4IEq ZoO9LcQ6bG+y5j//IQOUKdo8Cb4mLg3eizKfREnTdsbnoMqCOuwOJmRiDnYWO9vc fY/+M0pcvTFBhTEyeIVl8tNNn2viNjOBZA1NTCjohRGPtnArp6+X/mxyAVq+j2VO XCS7geixtu44vwqEI86+aFbzLK0YwcCQeEgup9MdF06P9fJX6wDD9XYsAPN5IWRs Fq5vOf2uAoPMBxCProZzatJRvDXBmsOTJrk3Mt8ippBtV6Y684wnFfzErU1wiTHq bTt8JUK4c8xWFcypD7gc7NWsMgoIDBLm7qjBEzJUwo29bSkETmUXCl2XWxpFJXk= =FH5a -----END PGP SIGNATURE----- ------enig2XKAATPTHFSDNIGMAPMIW--