]> git.proxmox.com Git - pve-firewall.git/commit
make verbose a global state
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 11 Apr 2019 13:28:34 +0000 (15:28 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Wed, 17 Apr 2019 11:01:45 +0000 (13:01 +0200)
commit40af93c4067341115877fc082a900be215122f0a
tree9ab3d24cd6268fa9030e45d1813c3b3a16e278ce
parentbaba607ab07d35d44bbe4bc0805117a08eb7db8c
make verbose a global state

This is part of the project 'stop the parameter rabbit hole madness'
and tries to make reading the firewall code a little bit easier.

Here we remove passing $verbose from 44 method signatures, while it
was used in 4 of those methods, a ration of 1/11 is simply not
acceptable for such a thing as a verbosity flag..

Remove it, and just make it a global variable with a setter for now.

Verbose is not modified in any API call, only in a Service
environment callablle by CLI, so we are save to do so.

If we decide to add some sort of firewall instance (i.e., a blessed
$self "object") with some state we could also move it there, but
making it global now doesn't hurt.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PVE/Firewall.pm
src/PVE/Service/pve_firewall.pm