Blame SOURCES/sos-bz1785546-nvmetcli.patch

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