Author: arkurth
Date: Mon May 1 16:25:42 2017
New Revision: 1793370
URL: http://svn.apache.org/viewvc?rev=1793370&view=rev
Log:
VCL-1031
Updated Linux.pm::firewall to return a generic VCL::Module::OS::Linux::firewall
object if none of the specific (iptables, firewalld, ufw) modules could be
initialized. This allows you to call '$self->os->firewall->can(...)' without
having to check if $self->os->firewall is defined and valid first. Without
this, many warnings were generated from Lab.pm.
Modified:
vcl/trunk/managementnode/lib/VCL/Module/OS/Linux.pm
Modified: vcl/trunk/managementnode/lib/VCL/Module/OS/Linux.pm
URL:
http://svn.apache.org/viewvc/vcl/trunk/managementnode/lib/VCL/Module/OS/Linux.pm?rev=1793370&r1=1793369&r2=1793370&view=diff
==============================================================================
--- vcl/trunk/managementnode/lib/VCL/Module/OS/Linux.pm (original)
+++ vcl/trunk/managementnode/lib/VCL/Module/OS/Linux.pm Mon May 1 16:25:42 2017
@@ -337,8 +337,8 @@ sub firewall {
}
}
- notify($ERRORS{'WARNING'}, 0, "failed to create firewall object to
control $computer_node_name");
- return;
+ notify($ERRORS{'DEBUG'}, 0, "unable to initialize suitable specific
firewall module, returning generic VCL::Module::OS::Linux::firewall object");
+ return bless {}, 'VCL::Module::OS::Linux::firewall';
}
#/////////////////////////////////////////////////////////////////////////////