Branch: refs/heads/2.0.0
Home:
https://github.com/tribe29/checkmk
Commit: 74eaad69facc5524fc62172e97c871905ff8ccac
https://github.com/tribe29/checkmk/commit/74eaad69facc5524fc62172e97c871905…
Author: Christoph Rauch <christoph.rauch(a)tribe29.com>
Date: 2022-04-07 (Thu, 07 Apr 2022)
Changed paths:
M cmk/gui/fields/__init__.py
M cmk/gui/fields/attributes.py
M cmk/gui/fields/base.py
M cmk/gui/fields/definitions.py
M tests/unit/cmk/gui/plugins/openapi/test_openapi_host_config.py
Log Message:
-----------
fields: MultiNested now supports merging
MultiNested represents a Union of two or more
Schemas. The problem of the previous approach
was that it could only represent
"Either one or the other"
but it couldn't represent an object which had
the sum of all the keys of all objects and could
validate these keys on the sub-schemas.
This is useful in situations where e.g. some
attributes are defined statically, while others
are defined by user-data. Then you have multiple
schemas validating keys from the same object.
To achieve this, we first copy the input, then
try to decode it, then remove all sucessfully
converted keys and try again with the next sub-schema.
If no sub-schema yields any data, the operation is an error.
If one of the sub-schemas yields something, it's a success.
More than one sub-schema may yield data for an object.
This approach needs to be activated by setting "merged=True"
on instantiation of MultiNested. The default behaviour is
backwards compatible.
Change-Id: Ifbbb89a5079815f1b5d93b0e7dab034dd11026b6
Commit: 52f007f68a3a032760b355e6eb82e6002e5d1ca1
https://github.com/tribe29/checkmk/commit/52f007f68a3a032760b355e6eb82e6002…
Author: Christoph Rauch <christoph.rauch(a)tribe29.com>
Date: 2022-04-07 (Thu, 07 Apr 2022)
Changed paths:
A .werks/13085
M cmk/gui/fields/definitions.py
M cmk/gui/fields/utils.py
M cmk/gui/plugins/openapi/restful_objects/response_schemas.py
M cmk/gui/plugins/wato/builtin_attributes.py
M cmk/gui/watolib/host_attributes.py
Log Message:
-----------
13085 FIX REST API: fix missing host/folder attributes
When editing hosts or folders through the REST API there could be a case when
certain fields were not in the list of editable attributes. If a user attempted
to set this field, it would be treated as a "custom attribute" with a
potentially
different data type. This would then lead to errors.
This werk fixes the disappearing attributes (e.g. locked_by, locked_attributes).
This werk also prevents internal attribute names to be used in "custom
attributes".
There is no futher action to be taken by the user. It's in effect immediately.
Change-Id: Ifef3073b880fe7c7ba5331b9ce29604b488e1b25
Commit: 6157490506cae89f9bc49bcecba7a4cd5f02a293
https://github.com/tribe29/checkmk/commit/6157490506cae89f9bc49bcecba7a4cd5…
Author: Christoph Rauch <christoph.rauch(a)tribe29.com>
Date: 2022-04-07 (Thu, 07 Apr 2022)
Changed paths:
A .werks/13642
M cmk/gui/fields/__init__.py
M cmk/gui/fields/attributes.py
M cmk/gui/fields/mixins.py
M cmk/gui/plugins/wato/builtin_attributes.py
M tests/unit/cmk/gui/plugins/openapi/test_openapi_host_config.py
Log Message:
-----------
13642 FIX REST API: Fix representation of locked_by host attribute
The locked_by host attribute was represented as string by the REST API while it
is actually a more complex data structure. The scheme is now representing the
data structure in the correct way.
Change-Id: I73c16776730038d66354e230b23d68adfce48d0f
Compare:
https://github.com/tribe29/checkmk/compare/c58fe73b8ea6...6157490506ca