]> granicus.if.org Git - icinga2/commitdiff
Rename Dependency 'state_filter' to 'states'.
authorMichael Friedrich <Michael.Friedrich@netways.de>
Sat, 3 May 2014 17:53:16 +0000 (19:53 +0200)
committerMichael Friedrich <Michael.Friedrich@netways.de>
Sat, 3 May 2014 17:53:16 +0000 (19:53 +0200)
Fixes #6113

doc/4.3-object-types.md
lib/icinga/icinga-type.conf
lib/icinga/notification.cpp
lib/icinga/user.cpp

index ac79ed10f5cb25e59baa0296b3a49613c582c1d9..e45f10e24ceec51f67ff23e909bbdb1f648a7c90 100644 (file)
@@ -209,7 +209,7 @@ Example:
       parent_host_name = "internet"
       parent_service_name = "ping4"
 
-      state_filter = [ OK, Warning ]
+      states = [ OK, Warning ]
 
       disable_checks = true
     }
@@ -225,7 +225,7 @@ Attributes:
   disable_checks  |**Optional.** Whether to disable checks when this dependency fails. Defaults to false.
   disable_notifications|**Optional.** Whether to disable notifications when this dependency fails. Defaults to true.
   period          |**Optional.** Time period during which this dependency is enabled.
-  state_filter    |**Optional.** A list of state filters when this dependency should be OK. Defaults to [ OK, Warning ] for services and [ Up ] for hosts.
+  states         |**Optional.** A list of state filters when this dependency should be OK. Defaults to [ OK, Warning ] for services and [ Up ] for hosts.
 
 Available state filters:
 
index 253acdc946307d32a317d3855246ee856669c837..0f00ac1ccb9eb8fa21b729dea14cd0d42c0685f8 100644 (file)
 
        %attribute %name(TimePeriod) "period",
 
-       %attribute %array "state_filter" {
+       %attribute %array "states" {
                %attribute %number "*"
        },
        %attribute %number "disable_checks",
index 1e1cb78cf5252912e9729475879cad3f333b882e..a85f4a4c8c5238a55a94a16ccbe3d13264a52102 100644 (file)
@@ -438,7 +438,7 @@ int icinga::FilterArrayToInt(const Array::Ptr& typeFilters, int defaultValue)
 
 void Notification::ValidateFilters(const String& location, const Dictionary::Ptr& attrs)
 {
-       int sfilter = FilterArrayToInt(attrs->Get("notification_state_filter"), 0);
+       int sfilter = FilterArrayToInt(attrs->Get("states"), 0);
 
        if (!attrs->Contains("service_name") && (sfilter & ~(StateFilterUp | StateFilterDown)) != 0) {
                ConfigCompilerContext::GetInstance()->AddMessage(true, "Validation failed for " +
@@ -450,7 +450,7 @@ void Notification::ValidateFilters(const String& location, const Dictionary::Ptr
                    location + ": State filter is invalid.");
        }
 
-       int tfilter = FilterArrayToInt(attrs->Get("notification_type_filter"), 0);
+       int tfilter = FilterArrayToInt(attrs->Get("types"), 0);
 
        if ((tfilter & ~(1 << NotificationDowntimeStart | 1 << NotificationDowntimeEnd | 1 << NotificationDowntimeRemoved |
            1 << NotificationCustom | 1 << NotificationAcknowledgement | 1 << NotificationProblem | 1 << NotificationRecovery |
index 71ab946b8aafd41ef4a746d9d8a5ceaa9a8ab195..36a4590aa34b1f86d5a7497fdf318e8398f212f9 100644 (file)
@@ -91,14 +91,14 @@ TimePeriod::Ptr User::GetPeriod(void) const
 
 void User::ValidateFilters(const String& location, const Dictionary::Ptr& attrs)
 {
-       int sfilter = FilterArrayToInt(attrs->Get("notification_state_filter"), 0);
+       int sfilter = FilterArrayToInt(attrs->Get("states"), 0);
 
        if ((sfilter & ~(StateFilterUp | StateFilterDown | StateFilterOK | StateFilterWarning | StateFilterCritical | StateFilterUnknown)) != 0) {
                ConfigCompilerContext::GetInstance()->AddMessage(true, "Validation failed for " +
                    location + ": State filter is invalid.");
        }
 
-       int tfilter = FilterArrayToInt(attrs->Get("notification_type_filter"), 0);
+       int tfilter = FilterArrayToInt(attrs->Get("types"), 0);
 
        if ((tfilter & ~(1 << NotificationDowntimeStart | 1 << NotificationDowntimeEnd | 1 << NotificationDowntimeRemoved |
            1 << NotificationCustom | 1 << NotificationAcknowledgement | 1 << NotificationProblem | 1 << NotificationRecovery |