From 46794f44814cb8ccaa9b9330a7ca1028a36db5d4 Mon Sep 17 00:00:00 2001 From: Pavel Moravec Date: Mon, 7 Aug 2023 10:55:17 +0200 Subject: [PATCH] [ultrapath] Add new plugin for Huawei UltraPath Relevant: rhbz2187407 Resolves: #3328 Author: Nitin U. Yewale Signed-off-by: Pavel Moravec --- sos/report/plugins/ultrapath.py | 40 +++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 sos/report/plugins/ultrapath.py diff --git a/sos/report/plugins/ultrapath.py b/sos/report/plugins/ultrapath.py new file mode 100644 index 0000000000..2fd8735c91 --- /dev/null +++ b/sos/report/plugins/ultrapath.py @@ -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 :