MKP 2.4.0, added password store for app password, some changes for compatibility with NC 28
This commit is contained in:
@@ -1,10 +1,13 @@
|
||||
from cmk.gui.i18n import _
|
||||
from cmk.gui.plugins.wato import (
|
||||
CheckParameterRulespecWithItem,
|
||||
rulespec_registry,
|
||||
RulespecGroupCheckParametersOperatingSystem,
|
||||
)
|
||||
#!/usr/bin/env python3
|
||||
|
||||
from cmk.gui.i18n import _
|
||||
from cmk.gui.plugins.wato.special_agents.common import RulespecGroupDatasourceProgramsApps
|
||||
from cmk.gui.plugins.wato.utils import (
|
||||
HostRulespec,
|
||||
Rulespec,
|
||||
IndividualOrStoredPassword,
|
||||
rulespec_registry,
|
||||
)
|
||||
from cmk.gui.valuespec import (
|
||||
Dictionary,
|
||||
ListChoice,
|
||||
@@ -13,11 +16,8 @@ from cmk.gui.valuespec import (
|
||||
Password,
|
||||
)
|
||||
|
||||
from cmk.gui.plugins.wato import (
|
||||
HostRulespec,
|
||||
)
|
||||
|
||||
from cmk.gui.plugins.wato.datasource_programs import RulespecGroupDatasourceProgramsCustom
|
||||
def _factory_default_special_agent_nextcloud():
|
||||
return Rulespec.FACTORY_DEFAULT_UNUSED
|
||||
|
||||
def _valuespec_special_agent_nextcloud():
|
||||
return Dictionary(
|
||||
@@ -33,7 +33,7 @@ def _valuespec_special_agent_nextcloud():
|
||||
("password", Password(title=_("Password"),
|
||||
allow_empty=True,
|
||||
help=_("Specify password OR token, not both, token recommended"))),
|
||||
("token", Password(title=_("Token"),
|
||||
("token", IndividualOrStoredPassword(title=_("App Password"),
|
||||
allow_empty=True,
|
||||
help=_("Specify password OR token, not both, token recommended"))),
|
||||
("port", TextAscii(title=_("Port"),
|
||||
@@ -52,8 +52,9 @@ def _valuespec_special_agent_nextcloud():
|
||||
|
||||
rulespec_registry.register(
|
||||
HostRulespec(
|
||||
group=RulespecGroupDatasourceProgramsCustom,
|
||||
name="special_agents:nextcloud",
|
||||
valuespec=_valuespec_special_agent_nextcloud,
|
||||
factory_default = _factory_default_special_agent_nextcloud(),
|
||||
group = RulespecGroupDatasourceProgramsApps,
|
||||
name = "special_agents:nextcloud",
|
||||
valuespec = _valuespec_special_agent_nextcloud,
|
||||
)
|
||||
)
|
||||
Reference in New Issue
Block a user