]> git.proxmox.com Git - pve-storage.git/commit - PVE/Storage/LVMPlugin.pm
add Storage::get_bandwidth_limit helper
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 30 Jan 2018 10:46:19 +0000 (11:46 +0100)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Wed, 31 Jan 2018 11:25:32 +0000 (12:25 +0100)
commit9edb99a5a763f03e031ffdce151c739d6ffaca0c
tree3936c8bac0716f3f51420f13ff648a80eb96c020
parentd2bf0b494530031d07187f35d0cba0a601a7af20
add Storage::get_bandwidth_limit helper

Takes an operation, an optional requested bandwidth
limit override, and a list of storages involved in the
operation and lowers the requested bandwidth against global
and storage-specific limits unless the user has permissions
to change those.
This means:
 * Global limits apply to all users without Sys.Modify on /
   (as they can change datacenter.cfg options via the API).
 * Storage specific limits apply to users without
   Datastore.Allocate access on /storage/X for any involved
   storage X.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
15 files changed:
PVE/Storage.pm
PVE/Storage/DRBDPlugin.pm
PVE/Storage/DirPlugin.pm
PVE/Storage/GlusterfsPlugin.pm
PVE/Storage/ISCSIDirectPlugin.pm
PVE/Storage/ISCSIPlugin.pm
PVE/Storage/LVMPlugin.pm
PVE/Storage/LvmThinPlugin.pm
PVE/Storage/NFSPlugin.pm
PVE/Storage/RBDPlugin.pm
PVE/Storage/SheepdogPlugin.pm
PVE/Storage/ZFSPlugin.pm
PVE/Storage/ZFSPoolPlugin.pm
test/Makefile
test/run_bwlimit_tests.pl [new file with mode: 0755]