Пример #1
0
    def check_kexec_package(self):
        """kexec package"""

        status = True
        package = "kexec-tools"

        if not is_package_installed(package):
            self.log.error("%s package is not installed", package)
            status = False

        return PackageCheck(self.check_kexec_package.__doc__, package, status)
Пример #2
0
    def check_kdump_package(self):
        """kdump package"""

        status = True
        package = "kdump"

        if not is_package_installed(package):
            status = False
            self.log.error("%s package is not installed", package)

        return PackageCheck(self.check_kdump_package.__doc__, package, status)
Пример #3
0
    def repair(self, plugin_obj, checks):
        """Repair package checks"""

        for check in checks:
            if not check.get_status():
                install_package(check.get_package_name())
                if is_package_installed(check.get_package_name()):
                    check.set_status(True)
                    check.set_note(Notes.FIXED)
                else:
                    check.set_note(Notes.FAIL_TO_FIX)
Пример #4
0
    def check():
        package = pkg
        package_status = is_package_installed(package)

        if package_status is None:
            self.log.warning("Unable to find %s package status", package)
        elif package_status is False:
            self.log.error("%s package is not present", package)
        else:
            self.log.info("%s package is present", package)

        return PackageCheck(package, package, package_status)