Werk #14677: Remove item_name and item_help keywords from CheckParameterRulespecWithItem

Komponente Setup
Titel Remove item_name and item_help keywords from CheckParameterRulespecWithItem
Datum 29.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.

The CheckParameterRulespecWithItem class does not accept the item_name and item_help keywords any longer. Instead item_spec should be used.

Before this werk the following was valid to register a new rulespec.

    rulespec_registry.register(
        CheckParameterRulespecWithItem(
            check_group_name="a_check",
            item_name="fitting item name",
            item_help="inline help test",
            group=RulespecGroupCheckParametersApplications,
            parameter_valuespec=_parameter_valuespec_network,
            title=lambda: "A good title",
        )
    )

This should be rewritten as:

    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",
        )
    )

Zur Liste aller Werks