[pve-devel] [PATCH v3 qemu-server 4/8] refactor: create QemuServer::Monitor for high-level QMP access

Thomas Lamprecht t.lamprecht at proxmox.com
Mon Nov 11 16:37:02 CET 2019


On 11/4/19 2:57 PM, Stefan Reiter wrote:
> QMP and monitor helpers are moved from QemuServer.pm.
> 
> By using only vm_running_locally instead of check_running, a cyclic
> dependency to QemuConfig is avoided. This also means that the $nocheck
> parameter serves no more purpose, and has thus been removed along with
> vm_mon_cmd_nocheck.
> 
> Care has been taken to avoid errors resulting from
> this, and occasionally a manual check for a VM's existance inserted on
> the callsite.
> 
> Methods have been renamed to avoid redundant naming:
> * vm_qmp_command -> qmp_cmd
> * vm_mon_cmd -> mon_cmd
> * vm_human_monitor_command -> hmp_cmd
> 
> mon_cmd is exported since it has many users. This patch also changes all
> non-package users of vm_qmp_command to use the mon_cmd helper. Includes
> mocking for tests.
> 
> Signed-off-by: Stefan Reiter <s.reiter at proxmox.com>
> ---
> 
> Sorry for the long patch, but almost all changes are just callers of
> mon_cmd/qmp_cmd being renamed.
> 
> 
>  PVE/API2/Qemu.pm         |  15 ++--
>  PVE/API2/Qemu/Agent.pm   |   7 +-
>  PVE/CLI/qm.pm            |  13 +--
>  PVE/QemuConfig.pm        |  15 ++--
>  PVE/QemuMigrate.pm       |  21 ++---
>  PVE/QemuServer.pm        | 184 +++++++++++++--------------------------
>  PVE/QemuServer/Agent.pm  |   3 +-
>  PVE/QemuServer/Makefile  |   1 +
>  PVE/QemuServer/Memory.pm |   9 +-
>  PVE/VZDump/QemuServer.pm |  13 +--
>  test/snapshot-test.pm    |  19 ++--
>  11 files changed, 130 insertions(+), 170 deletions(-)
> 


could it be that you forgot to actually stage the newly create Monitor
module? At least I do not see any in above diffstat or (cut) diff
itself.. ^^




More information about the pve-devel mailing list