aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCédric Jeanneret <cjeanner@redhat.com>2020-02-28 09:43:28 +0100
committerJake Hunsaker <jhunsake@redhat.com>2020-03-18 10:19:36 -0400
commit9c139a39a1df408d6a6167c5ba6b1624143b53b1 (patch)
tree580d3f802d7ceaf067a580c0200e8d8634409abb
parent4e30286c2563829b37f95a78584e3c768ed0c5f4 (diff)
downloadsos-9c139a39a1df408d6a6167c5ba6b1624143b53b1.tar.gz
[Plugin] New Validation Framework plugin
The Validation Framework provides an overview of deployed services. For now, this Framework is linked to OpenStack and TripleO[1], but since it might be used by other products, it's probably better to get a generic name. Resolves: #1970 Signed-off-by: Cédric Jeanneret <cjeanner@redhat.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
-rw-r--r--sos/plugins/validation_framework.py40
1 files changed, 40 insertions, 0 deletions
diff --git a/sos/plugins/validation_framework.py b/sos/plugins/validation_framework.py
new file mode 100644
index 00000000..6332bbb5
--- /dev/null
+++ b/sos/plugins/validation_framework.py
@@ -0,0 +1,40 @@
+# Copyright (C) 2020 Red Hat, Inc., Cedric Jeanneret <cjeanner@redhat.com>
+
+# This file is part of the sos project: https://github.com/sosreport/sos
+#
+# This copyrighted material is made available to anyone wishing to use,
+# modify, copy, or redistribute it subject to the terms and conditions of
+# version 2 of the GNU General Public License.
+#
+# See the LICENSE file in the source distribution for further information.
+
+from sos.plugins import Plugin, RedHatPlugin
+
+
+# Notes:
+# - The Validation Framework is, for now, linked to openstack and tripleo
+# - Since the intent is to open it to other product (we can validate anything)
+# this plugin has a generic name.
+# - The Framework is targeted at Red Hat products, at least for now.
+class ValidationFramework(Plugin, RedHatPlugin):
+ """Fetch run logs provided by the Validation Framework
+ """
+
+ plugin_name = 'validation_framework'
+ profiles = ('openstack', 'openstack_controller', 'openstack_compute')
+ packages = ('tripleo-validations',)
+
+ def setup(self):
+ self.add_copy_spec('/var/log/validations/')
+
+ def postproc(self):
+ # Use a generic match in order to clean things up.
+ # It is not expected to get any secrets in here, but we'd better
+ # ensure it's clean.
+ secrets = r'(".*(key|password|pass|secret|database_connection))' \
+ r'([":\s]+)(.*[^"])([",]+)'
+
+ self.do_path_regex_sub('/var/log/validations/',
+ secrets, r'\1\3*********\5')
+
+# vim: set et ts=4 sw=4 :