From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NZnnh-0004qJ-HX for qemu-devel@nongnu.org; Tue, 26 Jan 2010 10:57:57 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NZnnc-0004dq-Bg for qemu-devel@nongnu.org; Tue, 26 Jan 2010 10:57:56 -0500 Received: from [199.232.76.173] (port=58373 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NZnnc-0004dP-5x for qemu-devel@nongnu.org; Tue, 26 Jan 2010 10:57:52 -0500 Received: from mail2.shareable.org ([80.68.89.115]:47927) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NZnnb-0008T1-Ow for qemu-devel@nongnu.org; Tue, 26 Jan 2010 10:57:51 -0500 Date: Tue, 26 Jan 2010 15:57:46 +0000 From: Jamie Lokier Subject: Re: [Qemu-devel] [RFC 00/11]: QMP feature negotiation support Message-ID: <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100126142912.GN5366@redhat.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" Cc: Markus Armbruster , aliguori@us.ibm.com, avi@redhat.com, qemu-devel@nongnu.org, Luiz Capitulino 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. 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? -- Jamie (ps. XML-itis: a tendancy to write tagnamevalue, when would do).