mirror of
https://github.com/Icinga/icinga2.git
synced 2026-04-22 22:59:37 -04:00
Merge ce34028653 into a810d6409b
This commit is contained in:
commit
00c3cb5689
10 changed files with 21 additions and 4 deletions
|
|
@ -33,7 +33,9 @@ public:
|
|||
class Comment : ConfigObject < CommentNameComposer
|
||||
{
|
||||
load_after Host;
|
||||
load_after HostGroup;
|
||||
load_after Service;
|
||||
load_after ServiceGroup;
|
||||
|
||||
[config, no_user_modify, protected, required, navigation(host)] name(Host) host_name {
|
||||
navigate {{{
|
||||
|
|
|
|||
|
|
@ -24,7 +24,9 @@ class Dependency : CustomVarObject < DependencyNameComposer
|
|||
activation_priority -10;
|
||||
|
||||
load_after Host;
|
||||
load_after HostGroup;
|
||||
load_after Service;
|
||||
load_after ServiceGroup;
|
||||
|
||||
[config, no_user_modify, required, navigation(child_host)] name(Host) child_host_name {
|
||||
navigate {{{
|
||||
|
|
|
|||
|
|
@ -24,7 +24,9 @@ class Downtime : ConfigObject < DowntimeNameComposer
|
|||
activation_priority -10;
|
||||
|
||||
load_after Host;
|
||||
load_after HostGroup;
|
||||
load_after Service;
|
||||
load_after ServiceGroup;
|
||||
|
||||
[config, no_user_modify, required, navigation(host)] name(Host) host_name {
|
||||
navigate {{{
|
||||
|
|
|
|||
|
|
@ -30,8 +30,6 @@ void Host::OnAllConfigLoaded()
|
|||
BOOST_THROW_EXCEPTION(std::invalid_argument("Host '" + GetName() + "' cannot be put into global zone '" + zone->GetName() + "'."));
|
||||
}
|
||||
|
||||
HostGroup::EvaluateObjectRules(this);
|
||||
|
||||
Array::Ptr groups = GetGroups();
|
||||
|
||||
if (groups) {
|
||||
|
|
@ -50,6 +48,9 @@ void Host::OnAllConfigLoaded()
|
|||
|
||||
void Host::CreateChildObjects(const Type::Ptr& childType)
|
||||
{
|
||||
if (childType == HostGroup::TypeInstance)
|
||||
HostGroup::EvaluateObjectRules(this);
|
||||
|
||||
if (childType == ScheduledDowntime::TypeInstance)
|
||||
ScheduledDowntime::EvaluateApplyRules(this);
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,8 @@ namespace icinga
|
|||
|
||||
class HostGroup : CustomVarObject
|
||||
{
|
||||
load_after Host;
|
||||
|
||||
[config] String display_name {
|
||||
get {{{
|
||||
String displayName = m_DisplayName.load();
|
||||
|
|
|
|||
|
|
@ -22,7 +22,9 @@ public:
|
|||
class Notification : CustomVarObject < NotificationNameComposer
|
||||
{
|
||||
load_after Host;
|
||||
load_after HostGroup;
|
||||
load_after Service;
|
||||
load_after ServiceGroup;
|
||||
load_after User;
|
||||
load_after UserGroup;
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,9 @@ class ScheduledDowntime : CustomVarObject < ScheduledDowntimeNameComposer
|
|||
activation_priority 20;
|
||||
|
||||
load_after Host;
|
||||
load_after HostGroup;
|
||||
load_after Service;
|
||||
load_after ServiceGroup;
|
||||
|
||||
[config, protected, no_user_modify, required, navigation(host)] name(Host) host_name {
|
||||
navigate {{{
|
||||
|
|
|
|||
|
|
@ -57,8 +57,6 @@ void Service::OnAllConfigLoaded()
|
|||
if (m_Host)
|
||||
m_Host->AddService(this);
|
||||
|
||||
ServiceGroup::EvaluateObjectRules(this);
|
||||
|
||||
Array::Ptr groups = GetGroups();
|
||||
|
||||
if (groups) {
|
||||
|
|
@ -77,6 +75,9 @@ void Service::OnAllConfigLoaded()
|
|||
|
||||
void Service::CreateChildObjects(const Type::Ptr& childType)
|
||||
{
|
||||
if (childType == ServiceGroup::TypeInstance)
|
||||
ServiceGroup::EvaluateObjectRules(this);
|
||||
|
||||
if (childType == ScheduledDowntime::TypeInstance)
|
||||
ScheduledDowntime::EvaluateApplyRules(this);
|
||||
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ class Service : Checkable < ServiceNameComposer
|
|||
load_after ApiListener;
|
||||
load_after Endpoint;
|
||||
load_after Host;
|
||||
load_after HostGroup;
|
||||
load_after Zone;
|
||||
|
||||
[config, no_user_modify, required, signal_with_old_value] array(name(ServiceGroup)) groups {
|
||||
|
|
|
|||
|
|
@ -10,6 +10,8 @@ namespace icinga
|
|||
|
||||
class ServiceGroup : CustomVarObject
|
||||
{
|
||||
load_after Service;
|
||||
|
||||
[config] String display_name {
|
||||
get {{{
|
||||
String displayName = m_DisplayName.load();
|
||||
|
|
|
|||
Loading…
Reference in a new issue