Branch: refs/heads/master
Home:
https://github.com/tribe29/checkmk
Commit: ccb385fd5278b277d8ca3775ef5a0adc368eb453
https://github.com/tribe29/checkmk/commit/ccb385fd5278b277d8ca3775ef5a0adc3…
Author: Thierry Trafelet <thierry.tra(a)bluewin.ch>
Date: 2022-01-25 (Tue, 25 Jan 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