Branch: refs/heads/master
Home:
https://github.com/Checkmk/checkmk
Commit: 4b114ee94fadc726818e9ef9ef269f8971ea7047
https://github.com/Checkmk/checkmk/commit/4b114ee94fadc726818e9ef9ef269f897…
Author: Gav <gavin.mcguigan(a)checkmk.com>
Date: 2023-07-14 (Fri, 14 Jul 2023)
Changed paths:
A .werks/15888
M cmk/bi/schema.py
M cmk/gui/fields/base.py
M cmk/gui/plugins/openapi/endpoints/folder_config/__init__.py
M cmk/gui/plugins/openapi/endpoints/folder_config/request_schemas.py
M cmk/gui/plugins/openapi/restful_objects/code_examples.py
M tests/unit/cmk/gui/plugins/openapi/test_openapi_folder_config.py
Log Message:
-----------
15888 FIX folder_config: update endpoint now only allows one of replace, update or
delete attributes
Previously when calling update folder, you could pass any combination of
replace all attributes
update some attributes
delete some attributes
Some of these combinations didn't make much sense and could lead to errors.
This werk simplifies this by only allowing one of the options when calling
update folder or bulk update folders.
For update_folder, previously you could do the following
C+:
{
"title": "Virtual Servers.",
"attributes": {"tag_networking": "wan"},
"update_attributes": {"tag_criticality": "prod"},
"remove_attributes": ["tag_foobar"],
}
C-:
This werk modifies this behaviour by forcing the client to select only one action.
C+:
{
"title": "Virtual Servers.",
"attributes": {"tag_networking": "wan"},
}
C-:
OR
C+:
{
"title": "Virtual Servers.",
"update_attributes": {"tag_criticality": "prod"},
}
C-:
OR
C+:
{
"title": "Virtual Servers.",
"remove_attributes": ["tag_foobar"],
}
C-:
CMK-9348
Change-Id: I01ee0e24ac8b8cf6edfdd2362ebb1f0ba1527d0d