-
Notifications
You must be signed in to change notification settings - Fork 543
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ultrapath] Add new plugin for Huawei UltraPath
Relevant: rhbz2187407 Resolves: #3328 Author: Nitin U. Yewale <[email protected]> Signed-off-by: Pavel Moravec <[email protected]>
- Loading branch information
1 parent
2d3fc8f
commit 46794f4
Showing
1 changed file
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# This file is part of the sos project: https://github.com/sosreport/sos | ||
# | ||
# This copyrighted material is made available to anyone wishing to use, | ||
# modify, copy, or redistribute it subject to the terms and conditions of | ||
# version 2 of the GNU General Public License. | ||
# | ||
# See the LICENSE file in the source distribution for further information. | ||
|
||
from sos.report.plugins import Plugin, RedHatPlugin | ||
|
||
|
||
class UltraPath(Plugin, RedHatPlugin): | ||
|
||
short_desc = 'HUAWEI UltraPath' | ||
|
||
plugin_name = 'ultrapath' | ||
profiles = ('storage', 'hardware') | ||
packages = ('UltraPath',) | ||
kernel_mods = ('nxup', 'nxupext_a') | ||
|
||
def setup(self): | ||
""" Huawei UltraPath specific information - commands | ||
""" | ||
self.add_cmd_output([ | ||
"upadm show version", | ||
"upadm show connectarray", | ||
"upadm show option", | ||
"upadm show upconfig", | ||
"upadm show diskarray", | ||
"upadmin show vlun", | ||
]) | ||
|
||
result = self.collect_cmd_output('upadm show path') | ||
if result['status'] == 0: | ||
for line in result['output'].splitlines(): | ||
if line.startswith("Array ID :"): | ||
self.add_cmd_output("upadm show lun array=%s" % | ||
line.split(':')[1].strip()) | ||
|
||
# vim: set et ts=4 sw=4 : |