def get_elements(self): checks = check_mk_local_automation("get-check-information") elements = { cn: "%s - %s" % (cn, c["title"]) for (cn, c) in checks.items() if c.get("group") == self._checkgroup } return elements
def get_mismatch_reasons(self, host_folder, hostname, svc_desc_or_item, svc_desc, only_host_conditions): match_service_conditions = self.ruleset.rulespec.is_for_services if only_host_conditions: match_service_conditions = False rule_dict = self.to_config() rule_dict["condition"][ "host_folder"] = self.folder.path_for_rule_matching() result = check_mk_local_automation("get-rule-mismatch-reason", [ repr([ hostname, svc_desc_or_item, svc_desc, only_host_conditions, match_service_conditions, rule_dict, self.ruleset.item_type(), self.ruleset.rulespec.is_binary_ruleset, ]) ]) if result is None: return yield result
def default_globals(self): # TODO: Cleanup from cmk.gui.watolib.automations import check_mk_local_automation return check_mk_local_automation("get-configuration", [], self._get_global_config_var_names())
def activate(self): # TODO: Cleanup from cmk.gui.watolib.automations import check_mk_local_automation return check_mk_local_automation(config.wato_activation_method)