aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryn M. Reeves <bmr@redhat.com>2014-06-05 22:18:53 +0100
committerBryn M. Reeves <bmr@redhat.com>2014-06-06 21:18:56 +0100
commit1ad04afba3bbfdd20bd943749388e2751b25a3f1 (patch)
tree84aacfa78d3d6706d09606e059f398e48ab8ca44
parentb8375c8feb791dbd10513e64bd318b58744f1b7d (diff)
downloadsos-1ad04afba3bbfdd20bd943749388e2751b25a3f1.tar.gz
[firewalld] new plugin
Add support for firewalld on Red Hat based distributions. Based on a patch to networking.py from Jamie Bainbridge. Fixes #292. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r--sos/plugins/firewalld.py38
1 files changed, 38 insertions, 0 deletions
diff --git a/sos/plugins/firewalld.py b/sos/plugins/firewalld.py
new file mode 100644
index 00000000..8ec9b2a4
--- /dev/null
+++ b/sos/plugins/firewalld.py
@@ -0,0 +1,38 @@
+## Copyright (C) 2014 Red Hat, Inc. Jamie Bainbridge <jbainbri@redhat.com>
+## Copyright (C) 2014 Red Hat, Inc. Bryn M. Reeves <bmr@redhat.com>
+### This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+from sos.plugins import Plugin, RedHatPlugin
+
+class FirewallD(Plugin, RedHatPlugin):
+ """FirewallD information
+ """
+
+ plugin_name = 'firewalld'
+
+ packages = ('firewalld',)
+
+ def setup(self):
+ self.add_copy_specs([
+ "/etc/firewalld/firewalld.conf",
+ "/etc/sysconfig/firewalld"
+ ])
+
+ self.add_cmd_outputs([
+ "firewall-cmd --list-all-zones",
+ "firewall-cmd --permanent --list-all-zones"
+ ])
+
+# vim: et ts=4 sw=4