Received: from [140.186.70.92] (port=43337 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OSPqA-0007fF-0Z for qemu-devel@nongnu.org; Sat, 26 Jun 2010 03:30:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OSPq8-0007x1-Bh for qemu-devel@nongnu.org; Sat, 26 Jun 2010 03:30:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:24270) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OSPq8-0007wr-42 for qemu-devel@nongnu.org; Sat, 26 Jun 2010 03:30:12 -0400 From: Markus Armbruster Subject: Re: [Qemu-devel] [PATCH 14/19] Add a query-argv command to QMP References: <1275921752-29420-1-git-send-email-berrange@redhat.com> <1275921752-29420-15-git-send-email-berrange@redhat.com> <4C0D09B0.7000305@codemonkey.ws> Date: Sat, 26 Jun 2010 09:30:07 +0200 In-Reply-To: <4C0D09B0.7000305@codemonkey.ws> (Anthony Liguori's message of "Mon, 07 Jun 2010 10:01:04 -0500") 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 Anthony Liguori writes: > On 06/07/2010 09:42 AM, Daniel P. Berrange wrote: >> Add a new QMP command called 'query-argv' to information about the command >> line arguments supported by the QEMU binary. This is intended to remove the >> need for apps to parse '-help' output. >> > > This is just as bad as parsing -help output IMHO. > > The problem with something like this is that it discourages people > from using proper APIs to get at capabilities information. The interfaces to be used by management software should be self-documenting, i.e. the client should be able to examine the available interface over that interface. This applies to QMP. It equally applies to those parts of command line we want management software to use. Example: We don't need to provide machine-readable descriptions for all the various options to configure devices, because management software should use -device. We do need to provide a description for -device. Note: if we make device_add fully cold-plug capable, we could point management software to QMP instead. Such command-line self-documentation would also guide management software to "proper" use of the command line.