Blame SOURCES/sos-bz1600158-rhv-log-collector-analyzer.patch

c33036
From d297b2116fd864c65dba76b343f5101466c0eeb7 Mon Sep 17 00:00:00 2001
c33036
From: Douglas Schilling Landgraf <dougsland@gmail.com>
c33036
Date: Tue, 10 Jul 2018 12:03:41 -0400
c33036
Subject: [PATCH] [rhv-log-collector-analyzer] Add new plugin for RHV
c33036
c33036
This commit adds the plugin rhv-log-collector-analyzer, it will
c33036
collect:
c33036
c33036
- Output of rhv-log-collector-analyer --json
c33036
- Generated HTML file from --live
c33036
c33036
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
c33036
---
c33036
 sos/plugins/rhv_analyzer.py | 40 +++++++++++++++++++++++++++++++++++++
c33036
 1 file changed, 40 insertions(+)
c33036
 create mode 100644 sos/plugins/rhv_analyzer.py
c33036
c33036
diff --git a/sos/plugins/rhv_analyzer.py b/sos/plugins/rhv_analyzer.py
c33036
new file mode 100644
c33036
index 00000000..7c233a0b
c33036
--- /dev/null
c33036
+++ b/sos/plugins/rhv_analyzer.py
c33036
@@ -0,0 +1,40 @@
c33036
+# Copyright (C) 2018 Red Hat, Inc.
c33036
+#
c33036
+# This file is part of the sos project: https://github.com/sosreport/sos
c33036
+#
c33036
+# This copyrighted material is made available to anyone wishing to use,
c33036
+# modify, copy, or redistribute it subject to the terms and conditions of
c33036
+# version 2 of the GNU General Public License.
c33036
+#
c33036
+# See the LICENSE file in the source distribution for further information.
c33036
+
c33036
+from sos.plugins import Plugin, RedHatPlugin
c33036
+
c33036
+
c33036
+class RhvLogCollectorAnalyzer(Plugin, RedHatPlugin):
c33036
+    """RHV Log Collector Analyzer"""
c33036
+
c33036
+    packages = ('rhv-log-collector-analyzer',)
c33036
+
c33036
+    plugin_name = 'RhvLogCollectorAnalyzer'
c33036
+    profiles = ('virt',)
c33036
+
c33036
+    def setup(self):
c33036
+        tool_name = 'rhv-log-collector-analyzer'
c33036
+        report = "{dircmd}/analyzer-report.html".format(
c33036
+            dircmd=self.get_cmd_output_path()
c33036
+        )
c33036
+
c33036
+        self.add_cmd_output(
c33036
+            "{tool_name}"
c33036
+            " --live"
c33036
+            " --html={report}".format(
c33036
+                report=report, tool_name=tool_name)
c33036
+        )
c33036
+
c33036
+        self.add_cmd_output(
c33036
+            "{tool_name}"
c33036
+            " --json".format(tool_name=tool_name)
c33036
+        )
c33036
+
c33036
+# vim: expandtab tabstop=4 shiftwidth=4
c33036
-- 
c33036
2.17.1
c33036