mirror of https://github.com/Icinga/icinga2.git
config: Rename host_name to host.
This commit is contained in:
parent
414d8c80bc
commit
03c047f4a7
|
@ -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);
|
||||
|
||||
|
|
|
@ -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" {
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
|
|
@ -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>())
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue