Branch: refs/heads/2.0.0
Home:
https://github.com/tribe29/checkmk
Commit: 37d591be6e82059fd410455a09569b4b5ad42ccd
https://github.com/tribe29/checkmk/commit/37d591be6e82059fd410455a09569b4b5…
Author: Thierry Trafelet <thierry.tra(a)bluewin.ch>
Date: 2022-04-14 (Thu, 14 Apr 2022)
Changed paths:
M cmk/gui/plugins/openapi/restful_objects/request_schemas.py
M tests/unit/cmk/gui/plugins/openapi/test_openapi_downtime.py
Log Message:
-----------
REST API: Fix scheduling host downtimes from read-only sites
Because:
- Werk #13080 in b85f1c2ad4c07f4e08ddeb2fe554e959257d2fea
introduced a change that should have allowed read-only sites that
are attached to a master site to set downtimes for hosts.
- The original fix did not consider the default value for
`should_exist` on fields.HostField, which is `True`. And therefore,
had no effect.
This commit changes the following:
- Fix scheduling of host downtimes from read-only sites on REST API
- Add unit test for host downtime scheduling on host without config
- Fix unit test for scheduling host downtime on non-existing host
Change-Id: Idf193cff62d1641ebbaf7d05cd1a50d415ab3011