IcingaConfig: do not re-deploy external objects

This commit is contained in:
Thomas Gelf 2015-12-01 14:47:10 +01:00
parent ccf3092b5d
commit 9413c8cdbd
2 changed files with 9 additions and 1 deletions

View File

@ -310,7 +310,9 @@ throw $e;
$file = null; $file = null;
foreach ($objects as $object) { foreach ($objects as $object) {
if ($object->isTemplate()) { if ($object->isExternal()) {
continue;
} elseif ($object->isTemplate()) {
$filename = strtolower($type) . '_templates'; $filename = strtolower($type) . '_templates';
$zone = 'master'; $zone = 'master';
} else { } else {

View File

@ -494,6 +494,12 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
&& $this->object_type === 'template'; && $this->object_type === 'template';
} }
public function isExternal()
{
return $this->hasProperty('object_type')
&& $this->object_type === 'external_object';
}
public function isApplyRule() public function isApplyRule()
{ {
return $this->hasProperty('object_type') return $this->hasProperty('object_type')