On 04/19/2013 02:37 AM, Markus Armbruster wrote: >> Question for the libvirt guys: Is it ok for libvirt to just extend the >> existing screendump command? Can libvirt figure there is a new >> (optional) parameter? See patch #5. > > Nope, QMP can't do that. I argued for such capabilities, but the > "create a new command" philosophy prevailed. > > Go forth and multiply commands! And have fun picking command names that > aren't fugly.
Adding optional parameters to an existing command has been done before; drive-mirror gained 'granularity' and 'buf-size' in 1.4 even though the command existed in 1.3. What would make it possible to avoid an explosion of new commands is a way to introspect WHICH options are available for a given command. We don't have that yet, but if we add a command that returns the JSON representation of what the command expects, THAT would make it acceptable to add optional arguments to an existing command in a way that libvirt could query to see whether the qemu it is talking to supports the optional arguments. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature