Blame SOURCES/sos-bz1785546-nvmetcli.patch

c5258f
From 83d56e2b443edc733ffc5a5286ce8392de99586e Mon Sep 17 00:00:00 2001
c5258f
From: Pavel Moravec <pmoravec@redhat.com>
c5258f
Date: Mon, 11 May 2020 14:22:18 +0200
c5258f
Subject: [PATCH] [nvmetcli] Add new plugin for NVMe Target CLI
c5258f
c5258f
Resolves: #2056
c5258f
c5258f
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
c5258f
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
c5258f
---
c5258f
 sos/plugins/nvmetcli.py | 32 ++++++++++++++++++++++++++++++++
c5258f
 1 file changed, 32 insertions(+)
c5258f
 create mode 100644 sos/plugins/nvmetcli.py
c5258f
c5258f
diff --git a/sos/plugins/nvmetcli.py b/sos/plugins/nvmetcli.py
c5258f
new file mode 100644
c5258f
index 00000000..b66a3a13
c5258f
--- /dev/null
c5258f
+++ b/sos/plugins/nvmetcli.py
c5258f
@@ -0,0 +1,32 @@
c5258f
+# Copyright (C) 2020 Red Hat, Inc., Nitin Yewale <nyewale@redhat.com>
c5258f
+
c5258f
+# This file is part of the sos project: https://github.com/sosreport/sos
c5258f
+#
c5258f
+# This copyrighted material is made available to anyone wishing to use,
c5258f
+# modify, copy, or redistribute it subject to the terms and conditions of
c5258f
+# version 2 of the GNU General Public License.
c5258f
+#
c5258f
+# See the LICENSE file in the source distribution for further information.
c5258f
+
c5258f
+from sos.plugins import Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin
c5258f
+
c5258f
+
c5258f
+class NvmetCli(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
c5258f
+
c5258f
+    short_desc = 'Collect config and system information for nvmetcli'
c5258f
+
c5258f
+    packages = ('nvmetcli', )
c5258f
+    profiles = ('storage', )
c5258f
+    plugin_name = 'nvmetcli'
c5258f
+
c5258f
+    def setup(self):
c5258f
+        self.add_cmd_output([
c5258f
+            "nvmetcli ls"
c5258f
+        ])
c5258f
+        self.add_journal(units=["nvme", "nvmet", "nvmet_rdma"])
c5258f
+        self.add_copy_spec([
c5258f
+            "/sys/kernel/config/nvmet",
c5258f
+            "/etc/nvmet/config.json",
c5258f
+        ])
c5258f
+
c5258f
+# vim: set et ts=4 sw=4 :
c5258f
-- 
c5258f
diff --git a/sos/plugins/nvmetcli.py b/sos/plugins/nvmetcli.py
c5258f
--- a/sos/plugins/nvmetcli.py
c5258f
+++ b/sos/plugins/nvmetcli.py
c5258f
@@ -12,6 +12,8 @@ from sos.plugins import Plugin, RedHatPl
c5258f
 
c5258f
 
c5258f
 class NvmetCli(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
c5258f
+    """Collect config and system information for nvmetcli
c5258f
+    """
c5258f
 
c5258f
     short_desc = 'Collect config and system information for nvmetcli'
c5258f
 
c5258f
--
c5258f
2.21.3
c5258f