]> granicus.if.org Git - icinga2/commitdiff
config: Rename host_name to host.
authorGunnar Beutner <gunnar.beutner@netways.de>
Wed, 25 Sep 2013 07:19:25 +0000 (09:19 +0200)
committerGunnar Beutner <gunnar.beutner@netways.de>
Wed, 25 Sep 2013 07:19:25 +0000 (09:19 +0200)
lib/icinga/host.cpp
lib/icinga/icinga-type.conf
lib/icinga/notification.cpp
lib/icinga/service-notification.cpp
lib/icinga/service.cpp

index 5a46315ef5dee2c130c4828e5ab9669752702bfc..3861149441f78b5dc89da2fb9928fe0023bc725a 100644 (file)
@@ -208,7 +208,7 @@ void Host::UpdateSlaveServices(void)
                ConfigItemBuilder::Ptr builder = boost::make_shared<ConfigItemBuilder>(di);
                builder->SetType("Service");
                builder->SetName(name);
-               builder->AddExpression("host_name", OperatorSet, GetName());
+               builder->AddExpression("host", OperatorSet, GetName());
                builder->AddExpression("display_name", OperatorSet, svcname);
                builder->AddExpression("short_name", OperatorSet, svcname);
 
index 0ae3803b44ddeddbef882e1d6fd29a70dd9ed02d..c819a34c3a6c0494620c82876dbebb74d137fab8 100644 (file)
@@ -58,8 +58,8 @@ type IcingaApplication {
 }
 
 type Service {
-       %require "host_name",
-       %attribute string "host_name",
+       %require "host",
+       %attribute string "host",
 
        %attribute string "short_name",
 
@@ -86,7 +86,8 @@ type Service {
        %attribute array "host_dependencies" {
                %attribute name(Host) "*"
        },
-       %attribute array "service_dependencies" {
+       %attribute array "service_
+       dependencies" {
                %attribute dictionary "*" {
                        %require "host",
                        %attribute name(Host) "host",
@@ -115,8 +116,8 @@ type ServiceGroup {
 }
 
 type Notification {
-       %require "host_name",
-       %attribute name(Host) "host_name",
+       %require "host",
+       %attribute name(Host) "host",
        %attribute string "service",
 
        %attribute dictionary "macros" {
index f018265b18085c09c264b570ba291f017cbbbec4..586ba6c4a805df79179990db269dd2d5a6963dbf 100644 (file)
@@ -389,7 +389,7 @@ void Notification::InternalSerialize(const Dictionary::Ptr& bag, int attributeTy
                bag->Set("times", m_Times);
                bag->Set("notification_type_filter", m_NotificationTypeFilter);
                bag->Set("notification_state_filter", m_NotificationStateFilter);
-               bag->Set("host_name", m_HostName);
+               bag->Set("host", m_HostName);
                bag->Set("export_macros", m_ExportMacros);
                bag->Set("service", m_Service);
        }
@@ -415,7 +415,7 @@ void Notification::InternalDeserialize(const Dictionary::Ptr& bag, int attribute
                m_Times = bag->Get("times");
                m_NotificationTypeFilter = bag->Get("notification_type_filter");
                m_NotificationStateFilter = bag->Get("notification_state_filter");
-               m_HostName = bag->Get("host_name");
+               m_HostName = bag->Get("host");
                m_ExportMacros = bag->Get("export_macros");
                m_Service = bag->Get("service");
        }
index 74ba4e6f6a0e3beba85ba070049820ac371c4f74..0b91b0232dd8db56baef55be0c11210a119acaf9 100644 (file)
@@ -132,7 +132,7 @@ void Service::UpdateSlaveNotifications(void)
                ConfigItemBuilder::Ptr builder = boost::make_shared<ConfigItemBuilder>(di);
                builder->SetType("Notification");
                builder->SetName(name);
-               builder->AddExpression("host_name", OperatorSet, GetHost()->GetName());
+               builder->AddExpression("host", OperatorSet, GetHost()->GetName());
                builder->AddExpression("service", OperatorSet, GetShortName());
 
                if (!nfcdesc.IsObjectType<Dictionary>())
index 2a5eda8a5b4c0173fe45abdea4f26de2e292c6a8..33493fc738ecff75c3a0920a750fbdbb6538c200 100644 (file)
@@ -423,7 +423,7 @@ void Service::InternalSerialize(const Dictionary::Ptr& bag, int attributeTypes)
                bag->Set("event_command", m_EventCommand);
                bag->Set("volatile", m_Volatile);
                bag->Set("short_name", m_ShortName);
-               bag->Set("host_name", m_HostName);
+               bag->Set("host", m_HostName);
                bag->Set("flapping_threshold", m_FlappingThreshold);
                bag->Set("notifications", m_NotificationDescriptions);
        }
@@ -481,7 +481,7 @@ void Service::InternalDeserialize(const Dictionary::Ptr& bag, int attributeTypes
                m_EventCommand = bag->Get("event_command");
                m_Volatile = bag->Get("volatile");
                m_ShortName = bag->Get("short_name");
-               m_HostName = bag->Get("host_name");
+               m_HostName = bag->Get("host");
                m_FlappingThreshold = bag->Get("flapping_threshold");
                m_NotificationDescriptions = bag->Get("notifications");
        }