diff options
author | Bryn M. Reeves <bmr@redhat.com> | 2012-12-06 17:45:53 +0000 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2012-12-06 17:45:53 +0000 |
commit | aab9f1f06304a03190787bbb8ef1f7e2871a8572 (patch) | |
tree | 42cae3f9be2bf224d0852c66b158cff3447f6e5b | |
parent | 94983b9685b7a9bc17d5fa97ceed823e621f9644 (diff) | |
download | sos-aab9f1f06304a03190787bbb8ef1f7e2871a8572.tar.gz |
Move Debian iSCSI target plugin to iscsitarget module
The Debian iSCSI class implements iscsi target data collection.
Move it to the iscsitarget module where it belongs.
This needs further work to add an iSCSI initiator implementation
for Debian and Ubuntu. That should be very straightforward but
needs a system for testing.
-rw-r--r-- | sos/plugins/iscsi.py | 14 | ||||
-rw-r--r-- | sos/plugins/iscsitarget.py | 27 |
2 files changed, 25 insertions, 16 deletions
diff --git a/sos/plugins/iscsi.py b/sos/plugins/iscsi.py index 08e82db4..3c7c1bfd 100644 --- a/sos/plugins/iscsi.py +++ b/sos/plugins/iscsi.py @@ -1,3 +1,4 @@ +## Copyright (C) 2007-2012 Red Hat, Inc., Ben Turner <bturner@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 @@ -30,16 +31,3 @@ class RedHatIscsi(iscsi, RedHatPlugin): "/etc/iscsi/initiatorname.iscsi", "/var/lib/iscsi"]) -class DebianIscsi(iscsi, DebianPlugin, UbuntuPlugin): - """iscsi-initiator related information Debian based distributions - """ - - packages = ('iscsitarget',) - - def setup(self): - super(DebianIscsi, self).setup() - self.addCopySpecs([ - "/etc/iet", - "/etc/sysctl.d/30-iscsitarget.conf", - "/etc/default/iscsitarget" - ]) diff --git a/sos/plugins/iscsitarget.py b/sos/plugins/iscsitarget.py index 0c787751..eadff90d 100644 --- a/sos/plugins/iscsitarget.py +++ b/sos/plugins/iscsitarget.py @@ -1,4 +1,5 @@ -## Copyright (C) 2007-2010 Red Hat, Inc., Ben Turner <bturner@redhat.com> +## Copyright (C) 2007-2012 Red Hat, Inc., Ben Turner <bturner@redhat.com> +## Copyright (C) 2012 Adam Stokes <adam.stokes@canonical.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 @@ -14,14 +15,34 @@ ## 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 iscsitarget(Plugin, RedHatPlugin): +class iscsitarget(Plugin): """iscsi-target related information """ + plugin_name = "iscsitarget" + +class RedHatIscsiTarget(Plugin, RedHatPlugin): + """iscsi-target related information for Red Hat distributions + """ + packages = ('scsi-target-utils',) def setup(self): self.addCopySpec("/etc/tgt/targets.conf") self.collectExtOutput("tgtadm --lld iscsi --op show --mode target") + +class DebianIscsiTarget(iscsitarget, DebianPlugin, UbuntuPlugin): + """iscsi-target related information for Debian based distributions + """ + + packages = ('iscsitarget',) + + def setup(self): + super(DebianIscsi, self).setup() + self.addCopySpecs([ + "/etc/iet", + "/etc/sysctl.d/30-iscsitarget.conf", + "/etc/default/iscsitarget" + ]) |