Branch: refs/heads/master
Home:
https://github.com/Checkmk/checkmk
Commit: 9404a8a0bb5d57c995a84af0346a2fcacfc36348
https://github.com/Checkmk/checkmk/commit/9404a8a0bb5d57c995a84af0346a2fcac…
Author: Gav <gavin.mcguigan(a)checkmk.com>
Date: 2024-01-22 (Mon, 22 Jan 2024)
Changed paths:
A .werks/16287.md
M cmk/gui/fields/__init__.py
M cmk/gui/fields/custom_fields.py
M cmk/gui/openapi/endpoints/notification_rules/common_schemas.py
M cmk/gui/openapi/endpoints/notification_rules/response_schemas.py
M cmk/gui/rest_api_types/notifications_rule_types.py
M cmk/utils/notify_types.py
M tests/unit/cmk/gui/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