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

66 lines
1.5 KiB
Python

from cmk.gui.i18n import _
from cmk.gui.plugins.wato import (
CheckParameterRulespecWithItem,
rulespec_registry,
RulespecGroupCheckParametersOperatingSystem,
)
from cmk.gui.valuespec import (
Age,
Alternative,
CascadingDropdown,
Checkbox,
Dictionary,
DictionaryElements,
DropdownChoice,
FixedValue,
Float,
HostAddress,
Hostname,
HTTPUrl,
ID,
Integer,
ListChoice,
ListOf,
ListOfStrings,
MonitoringState,
NetworkPort,
Password,
RegExp,
TextAscii,
TextInput,
Transform,
Tuple,
)
from cmk.gui.plugins.wato import (
HostRulespec,
IndividualOrStoredPassword,
)
from cmk.gui.plugins.wato.datasource_programs import RulespecGroupDatasourceProgramsCustom
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=RulespecGroupDatasourceProgramsCustom,
name="special_agents:hal9001",
valuespec=_params_special_agent_hal9001,
)
)