Branch: refs/heads/2.2.0
Home:
https://github.com/Checkmk/checkmk
Commit: 4704975d4f01d0ed08bc8cee3f0d389dbd856988
https://github.com/Checkmk/checkmk/commit/4704975d4f01d0ed08bc8cee3f0d389db…
Author: Gav <gavin.mcguigan(a)checkmk.com>
Date: 2024-01-23 (Tue, 23 Jan 2024)
Changed paths:
A .werks/16287
M cmk/gui/fields/__init__.py
M cmk/gui/fields/custom_fields.py
M cmk/gui/plugins/openapi/endpoints/notification_rules/__init__.py
M cmk/gui/plugins/openapi/endpoints/notification_rules/common_schemas.py
M cmk/gui/plugins/openapi/endpoints/notification_rules/request_example.py
M cmk/gui/plugins/openapi/endpoints/notification_rules/response_schemas.py
A cmk/gui/rest_api_types/notifications_rule_types.py
A cmk/gui/rest_api_types/notifications_types.py
M cmk/gui/watolib/notifications.py
M cmk/utils/type_defs/__init__.py
M cmk/utils/type_defs/notify.py
R cmk/utils/type_defs/rest_api_types/notifications_rule_types.py
R cmk/utils/type_defs/rest_api_types/notifications_types.py
M tests/testlib/rest_api_client.py
M tests/unit/cmk/gui/plugins/openapi/test_notification_rules.py
Log Message:
-----------
16287 FIX rule_notification: match_hosttag now accepts custom tag ids
Previously, when creating or updating a notification rule,
the match_host_tag field would only allow for builtin tag ids.
With this werk we now accept any configured host tag id.
The schema has also changed in order to make this possible.
This means that instead of a field representing each tag,
you now have to pass a list of either aux tag ids or a list of
tag group tag ids along with an operator which determines if
the tag id should match or not.
e.g.
```
{
"match_host_tags": {
"state": "enabled",
"value": [
{
"tag_type": "aux_tag",
"tag_id": "snmp",
"operator": "is_set",
},
{
"tag_type": "tag_group",
"tag_group_id": "criticality",
"operator": "is",
"tag_id": "prod",
},
{
"tag_type": "tag_group",
"tag_group_id": "networking",
"operator": "is_not",
"tag_id": "lan",
}
],
},
}
```
SUP-16941
Change-Id: Ic9c64b7741ac4d54c763c2504c1256ebc99aae94