mirror of https://github.com/Icinga/icinga2.git
Fix state_filter attribute validation for Depdency objects.
Fixes #6110
This commit is contained in:
parent
c883b49480
commit
07c0c9e234
|
@ -23,6 +23,7 @@
|
|||
#include "base/dynamictype.h"
|
||||
#include "base/objectlock.h"
|
||||
#include "base/logger_fwd.h"
|
||||
#include "base/convert.h"
|
||||
#include "base/scriptfunction.h"
|
||||
#include <boost/foreach.hpp>
|
||||
|
||||
|
@ -184,11 +185,11 @@ void Dependency::ValidateFilters(const String& location, const Dictionary::Ptr&
|
|||
|
||||
if (!attrs->Contains("parent_service_name") && (sfilter & ~(StateFilterUp | StateFilterDown)) != 0) {
|
||||
ConfigCompilerContext::GetInstance()->AddMessage(true, "Validation failed for " +
|
||||
location + ": State filter is invalid.");
|
||||
location + ": State filter is invalid for host dependency.");
|
||||
}
|
||||
|
||||
if (attrs->Contains("parent_service_name") && (sfilter & ~(StateFilterOK | StateFilterWarning | StateFilterCritical | StateFilterUnknown)) != 0) {
|
||||
ConfigCompilerContext::GetInstance()->AddMessage(true, "Validation failed for " +
|
||||
location + ": State filter is invalid.");
|
||||
location + ": State filter is invalid for service dependency.");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -275,7 +275,9 @@
|
|||
|
||||
%attribute %name(TimePeriod) "period",
|
||||
|
||||
%attribute %number "state_filter",
|
||||
%attribute %array "state_filter" {
|
||||
%attribute %number "*"
|
||||
},
|
||||
%attribute %number "disable_checks",
|
||||
%attribute %number "disable_notifications"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue