]> git.proxmox.com Git - pve-firewall.git/commit
fix #4204: automatically update usages of group when it is renamed
authorLeo Nunner <l.nunner@proxmox.com>
Wed, 28 Sep 2022 09:11:44 +0000 (11:11 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 4 Oct 2022 11:02:04 +0000 (13:02 +0200)
commit6198a78f13b4382da987c9010d8ee3643602920a
tree61de1c1fa3b2b087ba65f9d980c4a2cb2f14d86e
parent0b8ac6616f4cb618d1d703aaa542ecb98560090b
fix #4204: automatically update usages of group when it is renamed

When renaming a group, the usages didn't get updated automatically. To
get around problems with atomicity, the old rule is first cloned with the
new name, the usages are updated and only when updating has finished, the
old rule is deleted.

The subroutines that lock/update host configs had to be changed so that
it's possible to lock any config, not just the one of the current host.

Signed-off-by: Leo Nunner <l.nunner@proxmox.com>
src/PVE/API2/Firewall/Groups.pm
src/PVE/API2/Firewall/Host.pm
src/PVE/API2/Firewall/Rules.pm
src/PVE/Firewall.pm