]> git.proxmox.com Git - qemu-server.git/commit - PVE/CLI/qm.pm
replace remaining vm_destroy call-sites with destroy_vm
authorDominic Jäger <d.jaeger@proxmox.com>
Mon, 28 Oct 2019 11:47:32 +0000 (12:47 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 29 Oct 2019 18:11:02 +0000 (19:11 +0100)
commitb406ab6342f26bd147c50046057be6892f6314a1
treef8ef1625de71cb46ad7aafe214c3223ad44e4ec9
parent93981fa79992a0ec1a216924807d182ecd68804e
replace remaining vm_destroy call-sites with destroy_vm

This function has been used in one place only into which we inlined its
functionality. Removing it avoids confusion between vm_destroy and vm_destroy.

The whole $importfn is executed in a lock_config_full.
As a consequence, for the inlined code:
1. lock_config is redundant
2. it is not possible that the VM has been started (check_running) in the
    meanwhile
Additionally, it is not possible that the "lock" property has been written into
the VM's config file (check_lock) in the meanwhile

Add warning after eval so that it does not go unnoticed if it ever comes into
action.

Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
PVE/CLI/qm.pm
PVE/QemuServer.pm