Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NZQ0j-0002ez-Cb for qemu-devel@nongnu.org; Mon, 25 Jan 2010 09:33:49 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NZQ0e-0002c8-LB for qemu-devel@nongnu.org; Mon, 25 Jan 2010 09:33:48 -0500 Received: from [199.232.76.173] (port=46298 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NZQ0e-0002c0-Fn for qemu-devel@nongnu.org; Mon, 25 Jan 2010 09:33:44 -0500 Received: from mx1.redhat.com ([209.132.183.28]:1678) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NZQ0e-0003Vk-6z for qemu-devel@nongnu.org; Mon, 25 Jan 2010 09:33:44 -0500 From: Markus Armbruster Subject: Re: [Qemu-devel] [RFC 00/11]: QMP feature negotiation support References: <1264108180-3666-1-git-send-email-lcapitulino@redhat.com> <4B59E7C4.2050201@codemonkey.ws> Date: Mon, 25 Jan 2010 15:33:40 +0100 In-Reply-To: <4B59E7C4.2050201@codemonkey.ws> (Anthony Liguori's message of "Fri, 22 Jan 2010 12:00:36 -0600") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org, aliguori@us.ibm.com, avi@redhat.com, Luiz Capitulino Anthony Liguori writes: > On 01/21/2010 03:09 PM, Luiz Capitulino wrote: >> """ >> {"QMP": {"capabilities": ["async messages"]}} >> >> { "execute": "query-qmp-mode" } >> {"return": {"mode": "handshake"}} >> >> { "execute": "change", "arguments": { "device": "vnc", "target": "password", "arg": "1234" } } >> {"error": {"class": "QMPInvalidModeCommad", "desc": "The issued command is invalid in this mode", "data": {}}} >> >> { "execute": "async_msg_enable", "arguments": { "name": "STOP" } } >> {"return": {}} >> > > Maybe: > > enable-capability "async messages" > disable-capability "async messages" > > I think that's a bit more obvious and it means that a client doesn't > have to maintain a mapping of features -> enable functions. It's also > strange to use an enable command to disable something. Agree on both counts. But why two commands? Why not simply "capability NAME VALUE"? Works even for non-boolean capabilities. I'm not predicting we'll need such capabilities.