Skip to content

Commit

Permalink
[ultrapath] Add new plugin for Huawei UltraPath
Browse files Browse the repository at this point in the history
Relevant: rhbz2187407

Resolves: sosreport#3328

Author: Nitin U. Yewale <[email protected]>
Signed-off-by: Pavel Moravec <[email protected]>
  • Loading branch information
pmoravec authored and TurboTurtle committed Aug 8, 2023
1 parent 2d3fc8f commit 46794f4
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions sos/report/plugins/ultrapath.py
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 :

0 comments on commit 46794f4

Please sign in to comment.