diff options
author | Jose Castillo <jcastillo@redhat.com> | 2014-08-18 10:57:36 +0200 |
---|---|---|
committer | Adam Stokes <adam.stokes@ubuntu.com> | 2014-08-18 11:07:41 -0400 |
commit | 5b97687d0cdd04c510727730d75648c0e74e8a97 (patch) | |
tree | 3f194edc86c001bed7b00c28eb3f1add546ba2cf | |
parent | 9fd7a3f5905d68e0aa016b5e8713c35cc374602a (diff) | |
download | sos-5b97687d0cdd04c510727730d75648c0e74e8a97.tar.gz |
[fcoe] Add plugin to get information about FCoE.
This plugin gets the configuration files present in the
directory /etc/fcoe and the output of two commands:
- 'fcoeadmin -i' shows information about all FCoE instances, and
- 'fcoeadmin -s' shows information about all discovered
Fibre Channel Forwarders (FCFs).
Attempts to fix issue #369
Version 2: Added a line to check if the package fcoe-utils is
installed as suggested by Adam Stokes.
Signed-off-by: Jose Castillo <jcastillo@redhat.com>
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
-rw-r--r-- | sos/plugins/fcoe.py | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/sos/plugins/fcoe.py b/sos/plugins/fcoe.py new file mode 100644 index 00000000..ad6ecc31 --- /dev/null +++ b/sos/plugins/fcoe.py @@ -0,0 +1,38 @@ +# 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 fcoe(Plugin, RedHatPlugin): + """fcoe related information + """ + + plugin_name = 'fcoe' + packages = ('fcoe-utils',) + + def setup(self): + # Here we capture the information about all + # FCoE instances with the -i option, and + # information about all discovered FCFs + # with the -f option + self.add_cmd_outputs([ + "fcoeadm -i", + "fcoeadm -f" + ]) + # Here we grab information about the + # interfaces's config files + self.add_copy_spec("/etc/fcoe") + +# vim: et ts=4 sw=4 |