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