FlappingSupport: Add legacy support

This commit is contained in:
Markus Frosch 2018-04-25 20:46:28 +02:00
parent 3521b30953
commit cceb588d24
1 changed files with 17 additions and 1 deletions

View File

@ -3,6 +3,7 @@
namespace Icinga\Module\Director\Objects\Extension;
use Icinga\Module\Director\IcingaConfig\IcingaConfigHelper as c;
use Icinga\Module\Director\IcingaConfig\IcingaLegacyConfigHelper as c1;
trait FlappingSupport
{
@ -22,7 +23,6 @@ trait FlappingSupport
*/
protected function renderFlapping_threshold_low($value)
{
// @codingStandardsIgnoreEnd
return $this->renderFlappingThreshold('flapping_threshold_low', $value);
}
@ -35,4 +35,20 @@ trait FlappingSupport
c::renderKeyValue($key, c::renderFloat($value))
);
}
protected function renderLegacyEnable_flapping($value)
{
return c1::renderKeyValue('flap_detection_enabled', c1::renderBoolean($value));
}
protected function renderLegacyFlapping_threshold_high($value)
{
return c1::renderKeyValue('high_flap_threshold', $value);
}
protected function renderLegacyFlapping_threshold_low($value)
{
// @codingStandardsIgnoreEnd
return c1::renderKeyValue('low_flap_threshold', $value);
}
}