From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NZoBG-0006vX-E6 for qemu-devel@nongnu.org; Tue, 26 Jan 2010 11:22:18 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NZoBB-0006qE-C8 for qemu-devel@nongnu.org; Tue, 26 Jan 2010 11:22:17 -0500 Received: from [199.232.76.173] (port=46778 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NZoBB-0006pt-0Q for qemu-devel@nongnu.org; Tue, 26 Jan 2010 11:22:13 -0500 Received: from mx1.redhat.com ([209.132.183.28]:60377) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NZoBA-0005lF-Ep for qemu-devel@nongnu.org; Tue, 26 Jan 2010 11:22:12 -0500 Date: Tue, 26 Jan 2010 14:21:58 -0200 From: Luiz Capitulino Subject: Re: [Qemu-devel] [RFC 00/11]: QMP feature negotiation support Message-ID: <20100126142158.751fba75@doriath> In-Reply-To: <20100126155746.GA10002@shareable.org> References: <1264108180-3666-1-git-send-email-lcapitulino@redhat.com> <4B59E7C4.2050201@codemonkey.ws> <20100126095325.23011823@doriath> <20100126125754.GA9362@shareable.org> <20100126142912.GN5366@redhat.com> <20100126155746.GA10002@shareable.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jamie Lokier Cc: aliguori@us.ibm.com, avi@redhat.com, qemu-devel@nongnu.org, Markus Armbruster On Tue, 26 Jan 2010 15:57:46 +0000 Jamie Lokier wrote: > Daniel P. Berrange wrote: > > On Tue, Jan 26, 2010 at 12:57:54PM +0000, Jamie Lokier wrote: > > > Luiz Capitulino wrote: > > > > capability_enable [ "foo", "bar" ] > > > > > > > > Now, only one command is not terrible difficult, but we would > > > > have to accept an array of objects, like: > > > > > > > > [ { "name": "foo", "enabled": true }, { "name": "bar", "enabled": true } ] > > > > > > That looks like XML-itis. > > > > > > Why not { "foo": true, "bar": true }? > > > > It depends on whether we think we're going to need to add more metadata > > beyond just the enabled/disabled status. If we did want to add a further > > item against foo & bar, then having the array of hashes makes that > > extension easier becaue you add easily add more key/value pairs to > > each. > > Sure, extensibility is good, and I personally don't care which > format/function are used. Just wanted to question the padded > structure, because sometimes that style is done unintentially. > > Look at the argument leading up here - Luiz says let's use separate, > non-extensible enable/disable commands taking a list, because if it > were a single command it'd be important to make it extensible. Does > that make sense? I don't understand that reasoning. I didn't consider extensibility in my first format, but we could also have: capability_enable [ { "name": "foo" }, { "name": "bar" } ] > On that topic: In the regular monitor, commands are often extensible > because they take command-line-style options, and you can always add > more options. What about QMP - are QMP commands all future-extensible > with options in a similar way? Yes, command input is done through a json-object as does output.