I’m migrating my agent plugins to the new v2.3 API and found some issues with the FileUpload (imported from cmk.rulesets.v1.form_specs)
Right after I save a rule containing a FileUpload, the gui shows:
And even worse, when then baking the agents, the baking itself finishes successfully but the gui shows:
Checking the rules.mk file shows that the uploaded file is correctly stored (as tuple: (filename, mime-type, content))
Here’s a simple example code snippet:
def _valuespec_test() -> Dictionary:
return Dictionary(
title=Title("Test"),
elements={
"testfile": DictElement(
parameter_form=FileUpload(
),
required=True,
),
},
)
rule_spec_test = AgentConfig(
name="test",
title=Title("Test"),
topic=CustomTopic(Title("Test")),
parameter_form=_valuespec_test,
)

