Anthony Liguori <anth...@codemonkey.ws> 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.