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

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