]> git.proxmox.com Git - pve-manager.git/commit - PVE/API2/Nodes.pm
refactor get_start_stop_list
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 24 Feb 2017 09:47:02 +0000 (10:47 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 2 Mar 2017 09:43:37 +0000 (10:43 +0100)
commitb72cdbb752c8e8b693a0a3ee1928fe95255d5d3e
tree16ac4fc96766e92a4d89c0c5cd8e1b4189d43476
parentb9628aa501640db376c6d788d1f683e58703b18c
refactor get_start_stop_list

we used get_start_stop_list for assembling a list of VMIDs for
stopall, startall and migrateall.

While get_start_stop_list did already some filtering we did some
more in the specific startall and stopall calls.
Add a new private helper which does all the filtering and just
assemble the startup order in the get_start_stop_list method.

Move the template and ha managed filtering in the new
get_filtered_vmlist method, this allows us to remove the filtering
from the API calls them self and we do not load the vms config twice
(it was cached, but nonetheless unnecessary)

get_filtered_vmlist is also intended to be used by migrateall in a
next patch

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
PVE/API2/Nodes.pm