Beispiel #1
0
    def update_pre_conditions(self, name, status):
        """
        Updates the preconditions state of a module

        :param name: Module name
        :param status: Module new status
        :return:
        """
        self.modules[name].pass_preconditions = status
        if self.modules[name].is_plugin:
            plugin = Registry().get('{mod}_plugin'.format(mod=name))
            if status:
                self.log_debug(
                    'Plugin {plugin} active'.format(plugin=str(plugin.name)))
                plugin.set_status()
            else:
                plugin.status = PluginStatus.Disabled