aboutsummaryrefslogtreecommitdiffstats
path: root/sos/plugins/rhevm.py
blob: 236ead49849434e2969adc207b99df879d7bf7aa (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
from sos.plugins import Plugin, RedHatPlugin

# Class name must be the same as file name and method names must not change
class rhevm(Plugin, RedHatPlugin):
    """Nogah related information"""

    optionList = [("vdsmlogs",  'Directory containing all of the SOS logs from the RHEV hypervisor(s)', '', False)]

    def setup(self):
        # Copy rhevm config files.
        self.addCopySpec("/etc/rhevm")
        self.addCopySpec("/var/log/rhevm")
        if self.getOption("vdsmlogs"):
            self.addCopySpec(self.getOption("vdsmlogs"))

    def postproc(self):
        """
        Obfuscate passwords.
        """

        self.doRegexSub("/etc/rhevm/rhevm-config/rhevm-config.properties",
                        r"Password.type=(.*)",
                        r'Password.type=********')