mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-17 10:05:15 +00:00
289aa4bc5b
Issuing simple QMP commands is pain as they need to be wrapped by the JSON wrapper: { "execute": "COMMAND" } and optionally also: { "execute": "COMMAND", "arguments":...} For simple commands without arguments we can add syntax sugar to virsh which allows simple usage of QMP and additionally prepares also for passing through of the 'arguments' section: virsh qemu-monitor-command $VM query-status is equivalent to virsh qemu-monitor-command $VM '{"execute":"query-status"}' and virsh qemu-monitor-command $VM query-named-block-nodes '{"flat":true}' or virsh qemu-monitor-command $VM query-named-block-nodes '"flat":true' is equivalent to virsh qemu-monitor-command $VM '{"execute":"query-named-block-nodes", "arguments":{"flat":true}}' Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>