ApiActions: Remove child downtimes recursively#10345
Conversation
66b2186 to
56b6f09
Compare
Not only performing the same action but also using the very same code, hence the diff is so small. So this just makes use of the existing parent-tracking mechanism for downtimes. It's probably noteworthy (for the changelog for example) that this will only work for new downtimes.
icinga2/lib/icinga/scheduleddowntime.cpp Lines 304 to 305 in b4baf1c Did you intentionally leave that as-is? Maybe due to the following? icinga2/lib/icinga/downtime.cpp Lines 372 to 375 in b4baf1c |
No. This is the only the place where downtimes owned by a icinga2/lib/icinga/scheduleddowntime.cpp Lines 325 to 326 in b4baf1c |
Services downtimes scheduled via the `all_services` flag get already removed automatically when removing their parent downtimes (introduced with #8913). Now, this commit makes it possible to perform the same actions for all child downtimes, i.e. not only for those of service objects, but for all child objects represented in the dependency tree.
56b6f09 to
3d761c0
Compare
Services downtimes scheduled via the
all_servicesflag get already removed automatically when removing their parent downtimes (introduced with #8913). Now, this commit makes it possible to perform the same actions for all child downtimes, i.e. not only for those of service objects, but for all child objects represented in the dependency tree.Config
Tests
Before:
After:
fixes #10333