]> git.proxmox.com Git - qemu-server.git/commit - PVE/API2/Qemu.pm
Make foreach_drive order deterministic
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Thu, 3 Mar 2016 14:45:15 +0000 (15:45 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 4 Mar 2016 05:25:48 +0000 (06:25 +0100)
commit74479ee9bbfe715d1ce48f4d31eea0befbe9e607
treebc3df14619ac10d83d66bbed6f485205211949b3
parent346130b2ba10360ac7b12d38de0d98aeb912b365
Make foreach_drive order deterministic

Previously, foreach_drive iterated over all configuration
keys (in a random order) and checked whether the current key
is a valid drive name. Instead, we now iterate over a list
of valid drive names (with deterministic order) and check
whether a drive with such a name exists in the
configuration.

Also rename the two involved methods from valid_drive_name
to is_valid_drive_name (for the check) and from disknames
to valid_drive_names (for the list of valid keys), for
consistency. These two were only used in the qemu-server
code base.
PVE/API2/Qemu.pm
PVE/QemuServer.pm