check_mk-check-selinux/web/plugins/wato/selinuxbakery_bakery.py

31 lines
910 B
Python

#!/usr/bin/env python3
# -*- encoding: utf-8; py-indent-offset: 4 -*-
# 2024 Marius Pana <mp@spearhead.systems>
from cmk.gui.i18n import _
from cmk.gui.plugins.wato import (
HostRulespec,
rulespec_registry,
)
from cmk.gui.cee.plugins.wato.agent_bakery.rulespecs.utils import RulespecGroupMonitoringAgentsAgentPlugins
from cmk.gui.valuespec import (
DropdownChoice
)
def _valuespec_agent_config_selinux():
return DropdownChoice(
title=_("Deploy SELinux (Linux)"),
help=_("Hosts configured via this rule get the <tt>selinux</tt> plugin " "deployed."),
choices=[
(True, _("Deploy selinux plugin")),
(None, _("Do not deploy selinux plugin")),
],
)
rulespec_registry.register(
HostRulespec(
group=RulespecGroupMonitoringAgentsAgentPlugins,
name="agent_config:selinux",
valuespec=_valuespec_agent_config_selinux,
))