From 63081474fa76f5ac96c4b15e233a3f5baceba5a5 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Thu, 17 Dec 2015 19:22:53 +0100 Subject: [PATCH] IcingaHost: define boolean properties --- library/Director/Objects/IcingaHost.php | 45 ++++++------------------- 1 file changed, 10 insertions(+), 35 deletions(-) diff --git a/library/Director/Objects/IcingaHost.php b/library/Director/Objects/IcingaHost.php index 5a061349..6586048b 100644 --- a/library/Director/Objects/IcingaHost.php +++ b/library/Director/Objects/IcingaHost.php @@ -47,6 +47,16 @@ class IcingaHost extends IcingaObject 'zone' => 'IcingaZone', ); + protected $booleans = array( + 'enable_notifications', + 'enable_active_checks', + 'enable_passive_checks', + 'enable_event_handler', + 'enable_flapping', + 'enable_perfdata', + 'volatile' + ); + protected $supportsCustomVars = true; protected $supportsGroups = true; @@ -94,39 +104,4 @@ class IcingaHost extends IcingaObject { return $this->getResolvedProperty('check_command_id') !== null; } - - protected function renderEnable_notifications() - { - return $this->renderBooleanProperty('enable_notifications'); - } - - protected function renderEnable_active_checks() - { - return $this->renderBooleanProperty('enable_active_checks'); - } - - protected function renderEnable_passive_checks() - { - return $this->renderBooleanProperty('enable_passive_checks'); - } - - protected function renderEnable_event_handler() - { - return $this->renderBooleanProperty('enable_event_handler'); - } - - protected function renderEnable_flapping() - { - return $this->renderBooleanProperty('enable_passive_checks'); - } - - protected function renderEnable_perfdata() - { - return $this->renderBooleanProperty('enable_perfdata'); - } - - protected function renderVolatile() - { - return $this->renderBooleanProperty('volatile'); - } }