On 09/06/2017 10:02 AM, Eduardo Habkost wrote: > On Wed, Sep 06, 2017 at 03:00:41PM +0200, Kevin Wolf wrote: >> Am 30.08.2017 um 19:01 hat Jeff Cody geschrieben: >>> From: Jeffrey Cody <jc...@redhat.com> >>> >>> If configured without live block operations enabled, unregister the >>> live block operation commands. >>> >>> Signed-off-by: Jeff Cody <jc...@redhat.com> >> >> How sure are we that libvirt will like a qemu that advertises these >> commands in the schema, but doesn't actually provide them? > > If libvirt wants to know if a command is available, it uses > 'query-commands', not 'query-qmp-schema'. > > The only query-qmp-schema elements used by latest libvirt are > gluster-related blockdev-add options (see > libvirt/src/qemu/qemu_capabilities.c:virQEMUCapsQMPSchemaQueries]]).
Indeed, libvirt is currently just fine with the fact that query-commands introspection hides disabled commands, even if they are still leaked in query-qmp-schema. Besides, Marc-Andre's work on adding #if support to QAPI should probably also land in 2.11, at which point the hack goes away (because then we ARE properly hiding things from the schema introspection). -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature