aboutsummaryrefslogtreecommitdiffstats
path: root/sos/plugins/corosync.py
diff options
context:
space:
mode:
authorLouis Bouchard <louis.bouchard@canonical.com>2013-04-03 17:50:55 +0200
committerLouis Bouchard <louis.bouchard@canonical.com>2013-04-05 12:20:40 +0200
commitf4084bab912b41065270301c7305e65df9ddb73c (patch)
tree15936089f5510081017ee1b607ed8de7ba48968e /sos/plugins/corosync.py
parent1a989a63de99e2f9e2985d16ffa609a13555cfe5 (diff)
downloadsos-f4084bab912b41065270301c7305e65df9ddb73c.tar.gz
Enabled new Debian plugins & adapted to new format
Diffstat (limited to 'sos/plugins/corosync.py')
-rw-r--r--sos/plugins/corosync.py25
1 files changed, 22 insertions, 3 deletions
diff --git a/sos/plugins/corosync.py b/sos/plugins/corosync.py
index b02d99a6..eecbde5b 100644
--- a/sos/plugins/corosync.py
+++ b/sos/plugins/corosync.py
@@ -12,13 +12,14 @@
## 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
+from sos.plugins import Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin
-class corosync(Plugin, RedHatPlugin):
+class Corosync(Plugin):
""" corosync information
"""
- files = ('/usr/bin/corosync',)
+ plugin_name = "corosync"
+
packages = ('corosync',)
def setup(self):
@@ -34,3 +35,21 @@ class corosync(Plugin, RedHatPlugin):
self.add_cmd_output("/usr/sbin/corosync-objctl -w runtime.blackbox.dump_state=$(date +\%s)")
self.add_cmd_output("/usr/sbin/corosync-objctl -w runtime.blackbox.dump_flight_data=$(date +\%s)")
self.call_ext_prog("killall -USR2 corosync")
+
+class RedHatCorosync(Corosync, RedHatPlugin):
+ """ corosync information for RedHat based distribution
+ """
+
+ def setup(self):
+ super(RedHatCorosync, self).setup()
+
+ files = ('/usr/bin/corosync',)
+
+class DebianCorosync(Corosync, DebianPlugin, UbuntuPlugin):
+ """ corosync information for Debian and Ubuntu distributions
+ """
+
+ def setup(self):
+ super(DebianCorosync, self).setup()
+
+ files = ('/usr/sbin/corosync',)