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

48 lines
1.2 KiB
Python

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