[pve-devel] applied: [RFC firewall 1/3] make verbose a global state

Wolfgang Bumiller w.bumiller at proxmox.com
Wed Apr 17 14:07:49 CEST 2019


applied

On Thu, Apr 11, 2019 at 03:28:34PM +0200, Thomas Lamprecht wrote:
> 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 at proxmox.com>
> ---




More information about the pve-devel mailing list