init first version of pbs_special_agent
build / Build Checkmk package (push) Failing after 32s
build-release / Build Release Package (push) Failing after 35s
Lint / flake8_py3 (push) Failing after 16s
pytest / pytest (push) Failing after 33s

This commit is contained in:
Simon Zeyer
2026-03-04 21:13:32 +00:00
commit c0117e6699
29 changed files with 1161 additions and 0 deletions
@@ -0,0 +1,47 @@
#!/usr/bin/env python3
# Shebang needed only for editors
from cmk.rulesets.v1.form_specs import Dictionary, DictElement, String, Password, migrate_to_password, DefaultValue
from cmk.rulesets.v1.rule_specs import SpecialAgent, Topic, Help, Title
def _formspec():
return Dictionary(
title=Title("PBS API-Token Login"),
help_text=Help("This rule is used to showcase a special agent with configuration."),
elements={
"port": DictElement(
required=True,
parameter_form=String(
title=Title("Port of the PBS API."),
prefill=DefaultValue("8007"),
),
),
"fingerprint": DictElement(
required=True,
parameter_form=String(
title=Title("Fingerprint of the PBS"),
prefill=DefaultValue(""),
),
),
"tokenid": DictElement(
required=True,
parameter_form=String(
title=Title("API Token with audit permissions."),
),
),
"secret": DictElement(
required=True,
parameter_form=Password(
title=Title("Secret for API Token."),
migrate=migrate_to_password,
),
),
}
)
rule_spec_pbs_special_agent = SpecialAgent(
topic=Topic.CLOUD,
name="pbs_special_agent",
title=Title("Proxmox PBS"),
parameter_form=_formspec
)