Branch: refs/heads/2.2.0
Home:
https://github.com/Checkmk/checkmk
Commit: da5751df1d84e9f5be7f539959b11b84917c31ba
https://github.com/Checkmk/checkmk/commit/da5751df1d84e9f5be7f539959b11b849…
Author: Gav <gavin.mcguigan(a)checkmk.com>
Date: 2024-01-18 (Thu, 18 Jan 2024)
Changed paths:
M tests/unit/cmk/gui/plugins/openapi/test_notification_rules.py
Log Message:
-----------
notification_rules: improve tests
Change-Id: I3eafee046df2cabe08140a73b7dd637cd6055f65
Commit: 4a05bec453fbca281e55e39cc3f862eba5ec698c
https://github.com/Checkmk/checkmk/commit/4a05bec453fbca281e55e39cc3f862eba…
Author: Gav <gavin.mcguigan(a)checkmk.com>
Date: 2024-01-18 (Thu, 18 Jan 2024)
Changed paths:
A .werks/16384
M cmk/gui/fields/__init__.py
M cmk/gui/fields/custom_fields.py
M cmk/gui/plugins/openapi/endpoints/notification_rules/common_schemas.py
M cmk/utils/type_defs/__init__.py
M cmk/utils/type_defs/notify.py
M cmk/utils/type_defs/rest_api_types/notifications_rule_types.py
M tests/unit/cmk/gui/plugins/openapi/test_notification_rules.py
Log Message:
-----------
16384 FIX notification rule: allow for non builtin service levels
When configuring a notification rule via the Rest API, you could not
set the value for "match_service_levels" to anything but the default
service levels. This werk addresses this issue by now allowing any
of the service levels configured to be used. This change mean that
there is a change to the request schema. Previously, we accepeted
the service level string value, whereas now we accept the integer
value.
Previous schema
C+:
{"match_service_levels": {"state": "enabled",
"value": {"from_level": "silver", "to_level":
"gold"}}}
C-:
New schema
C+:
{"match_service_levels: {"state": "enabled", "value":
{"from_level" 10, "to_level": 20}}}
C-:
SUP-17080
Change-Id: I2661d03f48e699054b89291f2b94affa10841910
Compare:
https://github.com/Checkmk/checkmk/compare/e3742ef2992a...4a05bec453fb