IcingaObjectGroup: unify group object logic

This commit is contained in:
Thomas Gelf 2016-03-09 20:53:57 +01:00
parent d3130d0494
commit d8a3fb68bd
4 changed files with 19 additions and 34 deletions

View File

@ -2,17 +2,7 @@
namespace Icinga\Module\Director\Objects;
class IcingaHostGroup extends IcingaObject
class IcingaHostGroup extends IcingaObjectGroup
{
protected $table = 'icinga_hostgroup';
protected $supportsImports = true;
protected $defaultProperties = array(
'id' => null,
'object_name' => null,
'object_type' => null,
'disabled' => 'n',
'display_name' => null,
);
}

View File

@ -0,0 +1,16 @@
<?php
namespace Icinga\Module\Director\Objects;
abstract class IcingaObjectGroup extends IcingaObject
{
protected $supportsImports = true;
protected $defaultProperties = array(
'id' => null,
'object_name' => null,
'object_type' => null,
'disabled' => 'n',
'display_name' => null,
);
}

View File

@ -2,17 +2,7 @@
namespace Icinga\Module\Director\Objects;
class IcingaServiceGroup extends IcingaObject
class IcingaServiceGroup extends IcingaObjectGroup
{
protected $table = 'icinga_servicegroup';
protected $supportsImports = true;
protected $defaultProperties = array(
'id' => null,
'object_name' => null,
'object_type' => null,
'disabled' => 'n',
'display_name' => null,
);
}

View File

@ -2,18 +2,7 @@
namespace Icinga\Module\Director\Objects;
class IcingaUserGroup extends IcingaObject
class IcingaUserGroup extends IcingaObjectGroup
{
protected $table = 'icinga_usergroup';
protected $supportsImports = true;
protected $defaultProperties = array(
'id' => null,
'object_name' => null,
'object_type' => null,
'disabled' => 'n',
'display_name' => null,
'zone_id' => null,
);
}