From 9a21ace3009f4fadf9d8e5f44494f72c39072909 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Wed, 10 Apr 2019 17:30:19 +0200 Subject: [PATCH] IcingaObject: scheduled downtime awareness This is not optimal, but that's how it works right now --- library/Director/Objects/IcingaObject.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/library/Director/Objects/IcingaObject.php b/library/Director/Objects/IcingaObject.php index 6f2b0301..073f67cb 100644 --- a/library/Director/Objects/IcingaObject.php +++ b/library/Director/Objects/IcingaObject.php @@ -2558,6 +2558,8 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer $type = 'templateChoiceHost'; } elseif ($type === 'service_template_choice') { $type = 'TemplateChoiceService'; + } elseif ($type === 'scheduled_downtime') { + $type = 'ScheduledDowntime'; } return 'Icinga\\Module\\Director\\Objects\\' . $prefix . ucfirst($type); @@ -3013,7 +3015,7 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer { $params = array(); - if ($this->isApplyRule()) { + if ($this->isApplyRule() && ! $this instanceof IcingaScheduledDowntime) { $params['id'] = $this->get('id'); } else { $params = array('name' => $this->getObjectName());