Werk #14676: Item description in CheckParameterRuleSpecWithItem mandatory
Komponente | Setup |
Titel | Item description in CheckParameterRuleSpecWithItem mandatory |
Datum | 26.08.2022 |
Checkmk-Edition | Checkmk Raw (CRE) |
Checkmk-Version | 2.2.0b1 |
Level | Kleine Änderung |
Klasse | Bugfix |
Kompatibilität | Inkompatibel - Manuelle Interaktion könnte erforderlich sein |
This change might break existing MKPs.
When writing a new rulespec for a check with an item the item_spec could be left blank. However those are needed to properly render the rulespec and allow to enable a rulespec only for specific services of a check plugin.
Now the item_spec parameter is mandatory. The item_name, and item_help parameters have been removed, with werk #14677. Below is an example how to register a new rulespec for a check with an item.
rulespec_registry.register(
CheckParameterRulespecWithItem(
check_group_name="a_check",
item_spec=lambda: TextInput(title="fitting item name", help="inline help text"),
group=RulespecGroupCheckParametersApplications,
parameter_valuespec=_parameter_valuespec_network,
title=lambda: "A good title",
)
)