mirror of
git://git.proxmox.com/git/qemu-server.git
synced 2025-03-08 04:58:26 +03:00
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@proxmox.com>