HAL9001-CheckMK/local/share/check_mk/web/plugins/wato/hal9001_params.py

48 lines
1.2 KiB
Python
Raw Normal View History

#!/usr/bin/env python3
2023-12-02 13:49:10 +01:00
from cmk.gui.i18n import _
from cmk.gui.plugins.wato.utils import (
IndividualOrStoredPassword,
2023-12-02 13:49:10 +01:00
rulespec_registry,
)
from cmk.gui.valuespec import (
Dictionary,
Password,
2023-12-02 15:20:26 +01:00
TextAscii,
2023-12-02 13:49:10 +01:00
)
from cmk.gui.watolib.rulespecs import (
2023-12-02 13:49:10 +01:00
HostRulespec,
)
from cmk.gui.plugins.wato.special_agents.common import (
RulespecGroupDatasourceProgramsTesting,
)
2023-12-02 13:49:10 +01:00
def _params_special_agent_hal9001():
return Dictionary(
title=_("Login parameters for HAL9001 systems"),
help = _("HAL9001: Dedicated to Arthur C. Clarke"),
elements=[
2023-12-02 15:20:26 +01:00
("username", TextAscii(
title=_("Username"),
2023-12-02 13:49:10 +01:00
allow_empty=False,
help=_("Username with administrative rights, mandatory"))),
2023-12-02 15:20:26 +01:00
("password", Password(
title=_("Password"),
2023-12-02 13:49:10 +01:00
allow_empty=False,
2023-12-02 15:20:26 +01:00
help=_("Specify password of this user, mandatory"))),
2023-12-02 13:49:10 +01:00
],
optional_keys=[],
)
rulespec_registry.register(
HostRulespec(
group=RulespecGroupDatasourceProgramsTesting,
2023-12-02 13:49:10 +01:00
name="special_agents:hal9001",
valuespec=_params_special_agent_hal9001,
)
)