[libvirt] [PATCH v2 04/10] qemu: capabilities: Detect active block commit via QMP schema probing if possible

John Ferlan jferlan at redhat.com
Thu Aug 23 18:45:35 UTC 2018



On 08/15/2018 05:18 AM, Peter Krempa wrote:
> For versions where we can probe that the arguments are optional we can
> perform the probing by a schema query rather than sending a separate
> command to do so.
> 
> Signed-off-by: Peter Krempa <pkrempa at redhat.com>
> ---
>  src/qemu/qemu_capabilities.c                           |  8 +++++---
>  tests/qemucapabilitiesdata/caps_2.10.0.aarch64.replies | 16 ----------------
>  tests/qemucapabilitiesdata/caps_2.10.0.aarch64.xml     |  2 +-
>  tests/qemucapabilitiesdata/caps_2.10.0.ppc64.replies   | 16 ----------------
>  tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml       |  2 +-
>  tests/qemucapabilitiesdata/caps_2.10.0.s390x.replies   | 16 ----------------
>  tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml       |  2 +-
>  tests/qemucapabilitiesdata/caps_2.10.0.x86_64.replies  | 16 ----------------
>  tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml      |  2 +-
>  tests/qemucapabilitiesdata/caps_2.11.0.s390x.replies   | 16 ----------------
>  tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml       |  2 +-
>  tests/qemucapabilitiesdata/caps_2.11.0.x86_64.replies  | 16 ----------------
>  tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml      |  2 +-
>  tests/qemucapabilitiesdata/caps_2.12.0.aarch64.replies | 16 ----------------
>  tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml     |  2 +-
>  tests/qemucapabilitiesdata/caps_2.12.0.ppc64.replies   | 16 ----------------
>  tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml       |  2 +-
>  tests/qemucapabilitiesdata/caps_2.12.0.s390x.replies   | 16 ----------------
>  tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml       |  2 +-
>  tests/qemucapabilitiesdata/caps_2.12.0.x86_64.replies  | 16 ----------------
>  tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml      |  2 +-
>  tests/qemucapabilitiesdata/caps_2.5.0.x86_64.replies   | 16 ----------------
>  tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml       |  2 +-
>  tests/qemucapabilitiesdata/caps_2.6.0.aarch64.replies  | 16 ----------------
>  tests/qemucapabilitiesdata/caps_2.6.0.aarch64.xml      |  2 +-
>  tests/qemucapabilitiesdata/caps_2.6.0.ppc64.replies    | 16 ----------------
>  tests/qemucapabilitiesdata/caps_2.6.0.ppc64.xml        |  2 +-
>  tests/qemucapabilitiesdata/caps_2.6.0.x86_64.replies   | 16 ----------------
>  tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml       |  2 +-
>  tests/qemucapabilitiesdata/caps_2.7.0.s390x.replies    | 16 ----------------
>  tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml        |  2 +-
>  tests/qemucapabilitiesdata/caps_2.7.0.x86_64.replies   | 16 ----------------
>  tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml       |  2 +-
>  tests/qemucapabilitiesdata/caps_2.8.0.s390x.replies    | 16 ----------------
>  tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml        |  2 +-
>  tests/qemucapabilitiesdata/caps_2.8.0.x86_64.replies   | 16 ----------------
>  tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml       |  2 +-
>  tests/qemucapabilitiesdata/caps_2.9.0.ppc64.replies    | 16 ----------------
>  tests/qemucapabilitiesdata/caps_2.9.0.ppc64.xml        |  2 +-
>  tests/qemucapabilitiesdata/caps_2.9.0.s390x.replies    | 16 ----------------
>  tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml        |  2 +-
>  tests/qemucapabilitiesdata/caps_2.9.0.x86_64.replies   | 16 ----------------
>  tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml       |  2 +-
>  tests/qemucapabilitiesdata/caps_3.0.0.ppc64.replies    | 16 ----------------
>  tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml        |  2 +-
>  tests/qemucapabilitiesdata/caps_3.0.0.x86_64.replies   | 16 ----------------
>  tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml       |  2 +-
>  47 files changed, 28 insertions(+), 394 deletions(-)
> 

Until I looked at the history of qapi/block-core.json, the "*" didn't
make sense. Still, it seems "top" means required argument "top" while
"*top" means optional argument "top". Does that mean "theoretically
speaking" we could have used "*tls-creds" since that's listed as
optional for nbd-server-start?  Suffice to say screendump doesn't make
much sense either, although in light of this "*", perhaps it too could
be "*device"?  I dunno, just guessing and grousing.

Different problem for a different day, but documenting the syntax of the
entries in the virQEMUCapsQMPSchemaQueries would be nice.

Reviewed-by: John Ferlan <jferlan at redhat.com>

John




More information about the libvir-list mailing list