IcingaHost: agent-related hint for legacy config

This commit is contained in:
Thomas Gelf 2016-10-09 13:27:38 +00:00
parent 89f86abdda
commit 38eaf4036b
1 changed files with 6 additions and 1 deletions

View File

@ -159,8 +159,13 @@ class IcingaHost extends IcingaObject
public function renderToConfig(IcingaConfig $config)
{
parent::renderToConfig($config);
// TODO: We might alternatively let the whole config fail in case we have
// used use_agent together with a legacy config
if (! $config->isLegacy()) {
$this->renderAgentZoneAndEndpoint($config);
}
}
public function renderAgentZoneAndEndpoint(IcingaConfig $config = null)
{