aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Moravec <pmoravec@redhat.com>2023-08-07 10:55:17 +0200
committerJake Hunsaker <jacob.r.hunsaker@gmail.com>2023-08-08 09:19:40 -0400
commit46794f44814cb8ccaa9b9330a7ca1028a36db5d4 (patch)
tree40958b93b071c8a04d02d708769896adf36f7e4d
parent2d3fc8f60389cab01b4b16a16a5824a85da1d1cf (diff)
downloadsos-46794f44814cb8ccaa9b9330a7ca1028a36db5d4.tar.gz
[ultrapath] Add new plugin for Huawei UltraPath
Relevant: rhbz2187407 Resolves: #3328 Author: Nitin U. Yewale <nyewale@redhat.com> Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
-rw-r--r--sos/report/plugins/ultrapath.py40
1 files changed, 40 insertions, 0 deletions
diff --git a/sos/report/plugins/ultrapath.py b/sos/report/plugins/ultrapath.py
new file mode 100644
index 00000000..2fd8735c
--- /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 :