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