From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=32831 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PxJYi-0005tr-Kb for qemu-devel@nongnu.org; Wed, 09 Mar 2011 08:36:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PxJYh-0003cL-Eo for qemu-devel@nongnu.org; Wed, 09 Mar 2011 08:36:12 -0500 Received: from mx1.redhat.com ([209.132.183.28]:54397) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PxJYh-0003bu-6N for qemu-devel@nongnu.org; Wed, 09 Mar 2011 08:36:11 -0500 Message-ID: <4D778246.8090504@redhat.com> Date: Wed, 09 Mar 2011 15:36:06 +0200 From: Avi Kivity MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 14/22] qapi: add query-version QMP command References: <1299460984-15849-1-git-send-email-aliguori@us.ibm.com> <1299460984-15849-15-git-send-email-aliguori@us.ibm.com> In-Reply-To: <1299460984-15849-15-git-send-email-aliguori@us.ibm.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Markus Armbruster , Luiz Capitulino , qemu-devel@nongnu.org, Adam Litke On 03/07/2011 03:22 AM, Anthony Liguori wrote: > This is used internally by QMP. It's also a pretty good example of a typical > command conversion. > > +## > +{ 'VersionInfo': {'qemu': {'major': 'int', 'minor': 'int', 'micro': 'int'}, > + 'package': 'str'} } > + > +## > +# @query-version: > +# > +# Returns the current version of QEMU. > +# > +# Returns: A @VersionInfo object describing the current version of QEMU. > +# > +# Since: 0.14.0 > +## > +[ 'query-version', {}, {}, 'VersionInfo' ] (just picking on a patch that has a bit of schema in it) Something that can be added to the schema are default values for newly added parameters. This way we can avoid an explosion of commands where adding an optional parameter suffices; should be easier for the user to pick the right command and easier for us to document and support. -- error compiling committee.c: too many arguments to function