2024-01-21 12:44:04 +01:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
|
2023-12-02 13:49:10 +01:00
|
|
|
from cmk.gui.i18n import _
|
2024-01-21 12:44:04 +01:00
|
|
|
|
|
|
|
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
|
|
|
)
|
|
|
|
|
2024-01-21 12:44:04 +01:00
|
|
|
from cmk.gui.watolib.rulespecs import (
|
2023-12-02 13:49:10 +01:00
|
|
|
HostRulespec,
|
|
|
|
)
|
2024-01-21 12:44:04 +01:00
|
|
|
|
|
|
|
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(
|
2024-01-21 12:44:04 +01:00
|
|
|
group=RulespecGroupDatasourceProgramsTesting,
|
2023-12-02 13:49:10 +01:00
|
|
|
name="special_agents:hal9001",
|
|
|
|
valuespec=_params_special_agent_hal9001,
|
|
|
|
)
|
|
|
|
)
|