From: Gunnar Beutner Date: Wed, 25 Sep 2013 07:15:30 +0000 (+0200) Subject: config: Rename Host::hostgroups to Host::groups. X-Git-Tag: v0.0.3~438 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0b265c18af60e5d6bb425712ef32cad043be9a08;p=icinga2 config: Rename Host::hostgroups to Host::groups. --- diff --git a/lib/icinga/host.cpp b/lib/icinga/host.cpp index 65934d867..7fa8daf5d 100644 --- a/lib/icinga/host.cpp +++ b/lib/icinga/host.cpp @@ -93,7 +93,7 @@ String Host::GetDisplayName(void) const Array::Ptr Host::GetGroups(void) const { - return m_HostGroups; + return m_Groups; } Dictionary::Ptr Host::GetMacros(void) const @@ -661,7 +661,7 @@ void Host::InternalSerialize(const Dictionary::Ptr& bag, int attributeTypes) con if (attributeTypes & Attribute_Config) { bag->Set("display_name", m_DisplayName); - bag->Set("hostgroups", m_HostGroups); + bag->Set("groups", m_Groups); bag->Set("macros", m_Macros); bag->Set("hostdependencies", m_HostDependencies); bag->Set("servicedependencies", m_ServiceDependencies); @@ -677,7 +677,7 @@ void Host::InternalDeserialize(const Dictionary::Ptr& bag, int attributeTypes) if (attributeTypes & Attribute_Config) { m_DisplayName = bag->Get("display_name"); - m_HostGroups = bag->Get("hostgroups"); + m_Groups = bag->Get("groups"); m_Macros = bag->Get("macros"); m_HostDependencies = bag->Get("hostdependencies"); m_ServiceDependencies = bag->Get("servicedependencies"); diff --git a/lib/icinga/host.h b/lib/icinga/host.h index d5d464318..6c7250465 100644 --- a/lib/icinga/host.h +++ b/lib/icinga/host.h @@ -132,7 +132,7 @@ protected: private: String m_DisplayName; - Array::Ptr m_HostGroups; + Array::Ptr m_Groups; Dictionary::Ptr m_Macros; Array::Ptr m_HostDependencies; Array::Ptr m_ServiceDependencies; diff --git a/lib/icinga/icinga-type.conf b/lib/icinga/icinga-type.conf index 4b278953a..19170ef1a 100644 --- a/lib/icinga/icinga-type.conf +++ b/lib/icinga/icinga-type.conf @@ -19,8 +19,8 @@ type Host { %attribute string "display_name", - %attribute string "hostcheck", - %attribute array "hostgroups" { + %attribute string "check", + %attribute array "groups" { %attribute name(HostGroup) "*" }, %attribute array "hostdependencies" {