mirror of
https://github.com/Icinga/icinga2.git
synced 2026-02-03 20:40:17 -05:00
Merge ce34028653 into 274a0e39d5
This commit is contained in:
commit
40c4df8cab
10 changed files with 21 additions and 4 deletions
|
|
@ -32,7 +32,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 {{{
|
||||
|
|
|
|||
|
|
@ -23,7 +23,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 {{{
|
||||
|
|
|
|||
|
|
@ -23,7 +23,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 {{{
|
||||
|
|
|
|||
|
|
@ -29,8 +29,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) {
|
||||
|
|
@ -49,6 +47,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);
|
||||
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@ namespace icinga
|
|||
|
||||
class HostGroup : CustomVarObject
|
||||
{
|
||||
load_after Host;
|
||||
|
||||
[config] String display_name {
|
||||
get {{{
|
||||
String displayName = m_DisplayName.load();
|
||||
|
|
|
|||
|
|
@ -21,7 +21,9 @@ public:
|
|||
class Notification : CustomVarObject < NotificationNameComposer
|
||||
{
|
||||
load_after Host;
|
||||
load_after HostGroup;
|
||||
load_after Service;
|
||||
load_after ServiceGroup;
|
||||
load_after User;
|
||||
load_after UserGroup;
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,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 {{{
|
||||
|
|
|
|||
|
|
@ -56,8 +56,6 @@ void Service::OnAllConfigLoaded()
|
|||
if (m_Host)
|
||||
m_Host->AddService(this);
|
||||
|
||||
ServiceGroup::EvaluateObjectRules(this);
|
||||
|
||||
Array::Ptr groups = GetGroups();
|
||||
|
||||
if (groups) {
|
||||
|
|
@ -76,6 +74,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);
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,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 {
|
||||
|
|
|
|||
|
|
@ -9,6 +9,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