Blame SOURCES/sos-bz1353552-virtwho-plugin.patch

69a90f
From ba2a2016a3f3c383b265a99deff8867d0d26ea56 Mon Sep 17 00:00:00 2001
69a90f
From: "Bryn M. Reeves" <bmr@redhat.com>
69a90f
Date: Thu, 7 Jul 2016 14:51:16 +0100
69a90f
Subject: [PATCH] [virtwho] add new plugin for virt-who agent
69a90f
69a90f
Add a new plugin for the virtual guest ID reporting agent.
69a90f
69a90f
RHBZ#1353552
69a90f
69a90f
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
69a90f
---
69a90f
 sos/plugins/virtwho.py | 34 ++++++++++++++++++++++++++++++++++
69a90f
 1 file changed, 34 insertions(+)
69a90f
 create mode 100644 sos/plugins/virtwho.py
69a90f
69a90f
diff --git a/sos/plugins/virtwho.py b/sos/plugins/virtwho.py
69a90f
new file mode 100644
69a90f
index 0000000..e5f3049
69a90f
--- /dev/null
69a90f
+++ b/sos/plugins/virtwho.py
69a90f
@@ -0,0 +1,34 @@
69a90f
+# This program is free software; you can redistribute it and/or modify
69a90f
+# it under the terms of the GNU General Public License as published by
69a90f
+# the Free Software Foundation; either version 2 of the License, or
69a90f
+# (at your option) any later version.
69a90f
+
69a90f
+# This program is distributed in the hope that it will be useful,
69a90f
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
69a90f
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
69a90f
+# GNU General Public License for more details.
69a90f
+
69a90f
+# You should have received a copy of the GNU General Public License
69a90f
+# along with this program; if not, write to the Free Software
69a90f
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
69a90f
+
69a90f
+from sos.plugins import Plugin, RedHatPlugin
69a90f
+
69a90f
+
69a90f
+class VirtWho(Plugin, RedHatPlugin):
69a90f
+    """Virt-Who agent
69a90f
+    """
69a90f
+
69a90f
+    plugin_name = 'virtwho'
69a90f
+    profiles = ('virt', 'system')
69a90f
+    packages = ('virt-who',)
69a90f
+
69a90f
+    def setup(self):
69a90f
+        self.add_copy_spec("/etc/virt-who.d/*")
69a90f
+
69a90f
+    def postproc(self):
69a90f
+        self.do_path_regex_sub(r"\/etc\/virt-who\.d",
69a90f
+                               r"(.*password=)(\S*)",
69a90f
+                               r"\1********")
69a90f
+
69a90f
+# vim: set et ts=4 sw=4 :
69a90f
-- 
69a90f
2.4.11
69a90f