diff options
-rw-r--r-- | sos/plugins/foreman.py | 21 | ||||
-rw-r--r-- | sos/plugins/katello.py | 21 |
2 files changed, 16 insertions, 26 deletions
diff --git a/sos/plugins/foreman.py b/sos/plugins/foreman.py index 60ec34df..28ea6a24 100644 --- a/sos/plugins/foreman.py +++ b/sos/plugins/foreman.py @@ -14,23 +14,18 @@ ## along with this program; if not, write to the Free Software ## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -import sos.plugintools import os +from sos.plugins import Plugin, RedHatPlugin -class foreman(sos.plugintools.PluginBase): +class Foreman(Plugin, RedHatPlugin): """Foreman project related information """ - def defaultenabled(self): - return True - - def checkenabled(self): - self.packages = ["foreman"] - self.files = ["/usr/sbin/foreman-debug"] - return sos.plugintools.PluginBase.checkenabled(self) + plugin_name = 'foreman' + packages = ('foreman') def setup(self): - foreman_debug = "/usr/sbin/foreman-debug" - if os.path.isfile(foreman_debug): - foreman_debug_path = os.path.join(self.cInfo['dstroot'],"foreman-debug") - self.collectExtOutput("%s -a -d %s" % (foreman_debug, foreman_debug_path)) + foreman_debug_path = os.path.join( + self.get_cmd_path(),"foreman-debug") + self.add_cmd_output("%s -a -d %s" + % ("foreman-debug", foreman_debug_path)) diff --git a/sos/plugins/katello.py b/sos/plugins/katello.py index 54b30fac..19993884 100644 --- a/sos/plugins/katello.py +++ b/sos/plugins/katello.py @@ -14,23 +14,18 @@ ## along with this program; if not, write to the Free Software ## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -import sos.plugintools import os +from sos.plugins import Plugin, RedHatPlugin -class katello(sos.plugintools.PluginBase): +class Katello(Plugin, RedHatPlugin): """Katello project related information """ - def defaultenabled(self): - return True - - def checkenabled(self): - self.packages = ["katello", "katello-common", "katello-headpin"] - self.files = ["/usr/bin/katello-debug"] - return sos.plugintools.PluginBase.checkenabled(self) + plugin_name = 'katello' + packages = ('katello', 'katello-common', 'katello-headpin') def setup(self): - katello_debug = "/usr/bin/katello-debug" - if os.path.isfile(katello_debug): - katello_debug_path = os.path.join(self.cInfo['dstroot'],"katello-debug") - self.collectExtOutput("%s --notar -d %s" % (katello_debug, katello_debug_path)) + katello_debug_path = os.path.join( + self.get_cmd_path(),"katello-debug") + self.add_cmd_output("%s --notar -d %s" + % ("katello-debug", katello_debug_path)) |