Branch: refs/heads/2.2.0
Home:
https://github.com/Checkmk/checkmk
Commit: d698bf28be2d82409015a1355acb9b906f860bba
https://github.com/Checkmk/checkmk/commit/d698bf28be2d82409015a1355acb9b906…
Author: Gav <gavin.mcguigan(a)checkmk.com>
Date: 2023-07-20 (Thu, 20 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