Blame SOURCES/sos-bz1568960-ovirt-provider-ovn.patch

789f54
From 523cdb9393059534f97b5b249498aca67c2c45d6 Mon Sep 17 00:00:00 2001
789f54
From: Leon Goldberg <lgoldber@redhat.com>
789f54
Date: Sun, 25 Feb 2018 17:01:11 +0200
789f54
Subject: [PATCH] [ovirt-provider-ovn] Introducing a plugin for
789f54
 ovirt-provider-ovn.
789f54
789f54
Resolves: #1227.
789f54
789f54
Signed-off-by: Leon Goldberg <leon.otium@gmail.com>
789f54
789f54
Fixed member formatting & added VIM mode line.
789f54
789f54
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
789f54
---
789f54
 sos/plugins/ovirt_provider_ovn.py | 43 +++++++++++++++++++++++++++++++++++++++
789f54
 1 file changed, 43 insertions(+)
789f54
 create mode 100644 sos/plugins/ovirt_provider_ovn.py
789f54
789f54
diff --git a/sos/plugins/ovirt_provider_ovn.py b/sos/plugins/ovirt_provider_ovn.py
789f54
new file mode 100644
789f54
index 00000000..a075509e
789f54
--- /dev/null
789f54
+++ b/sos/plugins/ovirt_provider_ovn.py
789f54
@@ -0,0 +1,43 @@
789f54
+# Copyright (C) 2018 Red Hat, Inc.,
789f54
+
789f54
+# This program is free software; you can redistribute it and/or modify
789f54
+# it under the terms of the GNU General Public License as published by
789f54
+# the Free Software Foundation; either version 2 of the License, or
789f54
+# (at your option) any later version.
789f54
+
789f54
+# This program is distributed in the hope that it will be useful,
789f54
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
789f54
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
789f54
+# GNU General Public License for more details.
789f54
+
789f54
+# You should have received a copy of the GNU General Public License along
789f54
+# with this program; if not, write to the Free Software Foundation, Inc.,
789f54
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
789f54
+from sos.plugins import Plugin, RedHatPlugin
789f54
+
789f54
+
789f54
+class OvirtProviderOvn(Plugin, RedHatPlugin):
789f54
+    """oVirt OVN Provider
789f54
+    """
789f54
+
789f54
+    packages = ('ovirt-provider-ovn',)
789f54
+    plugin_name = 'ovirt_provider_ovn'
789f54
+    profiles = ('virt',)
789f54
+
789f54
+    provider_conf = '/etc/ovirt-provider-ovn/ovirt-provider-ovn.conf'
789f54
+
789f54
+    def setup(self):
789f54
+        self.add_copy_spec(self.provider_conf)
789f54
+        self.add_copy_spec('/etc/ovirt-provider-ovn/conf.d/*')
789f54
+
789f54
+        spec = '/var/log/ovirt-provider-ovn.log'
789f54
+        if self.get_option('all_logs'):
789f54
+            spec += '*'
789f54
+        self.add_copy_spec(spec, sizelimit=self.get_option('log_size'))
789f54
+
789f54
+    def postproc(self):
789f54
+        self.do_file_sub(self.provider_conf,
789f54
+                         r'(ovirt-sso-client-secret\s*=\s*)(.*)',
789f54
+                         r'\1*************')
789f54
+
789f54
+# vim: set et ts=4 sw=4 :
789f54
-- 
789f54
2.13.6
789f54