aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryn M. Reeves <bmr@redhat.com>2013-04-26 18:19:33 +0100
committerBryn M. Reeves <bmr@redhat.com>2013-04-26 18:19:33 +0100
commitb5a0d2b94aa3e5275e9ab5561455a91a8cc861df (patch)
tree5b5793ae7fbf728746afe31ed48a023fc608d5cb
parentd063b064542c397a9b30c3b2caa76044499536b5 (diff)
downloadsos-b5a0d2b94aa3e5275e9ab5561455a91a8cc861df.tar.gz
Remove duplicate code in system plug-in
The Red Hat and Debian/Ubuntu system plug-ins are identical. Get rid of them and have a comon System class. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r--sos/plugins/system.py21
1 files changed, 3 insertions, 18 deletions
diff --git a/sos/plugins/system.py b/sos/plugins/system.py
index d3e25c77..cc287e15 100644
--- a/sos/plugins/system.py
+++ b/sos/plugins/system.py
@@ -14,35 +14,20 @@
from sos.plugins import Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin
-class System(Plugin):
- plugin_name = "system"
-
-class RedHatSystem(System, RedHatPlugin):
+class System(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
"""core system related information
"""
- def setup(self):
- self.add_copy_specs([
- "/proc/sys",
- "/etc/syslog.conf",
- "/etc/rsyslog.conf",
- ])
- self.add_forbidden_path(
- "/proc/sys/net/ipv8/neigh/*/retrans_time")
- self.add_forbidden_path(
- "/proc/sys/net/ipv6/neigh/*/base_reachable_time")
+ plugin_name = "system"
-class DebianSystem(System, DebianPlugin, UbuntuPlugin):
- """core system related information for Debian and Ubuntu
- """
def setup(self):
self.add_copy_specs([
"/proc/sys",
"/etc/syslog.conf",
"/etc/rsyslog.conf",
+ ])
self.add_forbidden_path(
"/proc/sys/net/ipv8/neigh/*/retrans_time")
self.add_forbidden_path(
"/proc/sys/net/ipv6/neigh/*/base_reachable_time")
-