mirror of https://github.com/Icinga/icinga2.git
Clean up some parts of the code
This commit is contained in:
parent
c4d448efe5
commit
65bec9e904
|
@ -419,8 +419,7 @@ void DbConnection::ValidateFailoverTimeout(const String& location, const Diction
|
|||
if (!attrs->Contains("failover_timeout"))
|
||||
return;
|
||||
|
||||
Value failover_timeout = attrs->Get("failover_timeout");
|
||||
if (failover_timeout < 60) {
|
||||
if (attrs->Get("failover_timeout") < 60) {
|
||||
ConfigCompilerContext::GetInstance()->AddMessage(true, "Validation failed for " +
|
||||
location + ": Failover timeout minimum is 60s.");
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ void HostGroup::RegisterObjectRuleHandler(void)
|
|||
ObjectRule::RegisterType("HostGroup", &HostGroup::EvaluateObjectRules);
|
||||
}
|
||||
|
||||
bool HostGroup::EvaluateObjectRuleOne(const Host::Ptr host, const ObjectRule& rule)
|
||||
bool HostGroup::EvaluateObjectRuleOne(const Host::Ptr& host, const ObjectRule& rule)
|
||||
{
|
||||
DebugInfo di = rule.GetDebugInfo();
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ public:
|
|||
void AddMember(const Host::Ptr& host);
|
||||
void RemoveMember(const Host::Ptr& host);
|
||||
|
||||
bool ResolveGroupMembership(Host::Ptr const& host, bool add = true, int rstack = 0);
|
||||
bool ResolveGroupMembership(const Host::Ptr& host, bool add = true, int rstack = 0);
|
||||
|
||||
static void RegisterObjectRuleHandler(void);
|
||||
|
||||
|
@ -52,7 +52,7 @@ private:
|
|||
mutable boost::mutex m_HostGroupMutex;
|
||||
std::set<Host::Ptr> m_Members;
|
||||
|
||||
static bool EvaluateObjectRuleOne(const Host::Ptr host, const ObjectRule& rule);
|
||||
static bool EvaluateObjectRuleOne(const Host::Ptr& host, const ObjectRule& rule);
|
||||
static void EvaluateObjectRule(const ObjectRule& rule);
|
||||
static void EvaluateObjectRules(const std::vector<ObjectRule>& rules);
|
||||
};
|
||||
|
|
|
@ -37,7 +37,7 @@ void ServiceGroup::RegisterObjectRuleHandler(void)
|
|||
ObjectRule::RegisterType("ServiceGroup", &ServiceGroup::EvaluateObjectRules);
|
||||
}
|
||||
|
||||
bool ServiceGroup::EvaluateObjectRuleOne(const Service::Ptr service, const ObjectRule& rule)
|
||||
bool ServiceGroup::EvaluateObjectRuleOne(const Service::Ptr& service, const ObjectRule& rule)
|
||||
{
|
||||
DebugInfo di = rule.GetDebugInfo();
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ public:
|
|||
void AddMember(const Service::Ptr& service);
|
||||
void RemoveMember(const Service::Ptr& service);
|
||||
|
||||
bool ResolveGroupMembership(Service::Ptr const& service, bool add = true, int rstack = 0);
|
||||
bool ResolveGroupMembership(const Service::Ptr& service, bool add = true, int rstack = 0);
|
||||
|
||||
static void RegisterObjectRuleHandler(void);
|
||||
|
||||
|
@ -52,7 +52,7 @@ private:
|
|||
mutable boost::mutex m_ServiceGroupMutex;
|
||||
std::set<Service::Ptr> m_Members;
|
||||
|
||||
static bool EvaluateObjectRuleOne(const Service::Ptr service, const ObjectRule& rule);
|
||||
static bool EvaluateObjectRuleOne(const Service::Ptr& service, const ObjectRule& rule);
|
||||
static void EvaluateObjectRule(const ObjectRule& rule);
|
||||
static void EvaluateObjectRules(const std::vector<ObjectRule>& rules);
|
||||
};
|
||||
|
|
|
@ -37,7 +37,7 @@ void UserGroup::RegisterObjectRuleHandler(void)
|
|||
ObjectRule::RegisterType("UserGroup", &UserGroup::EvaluateObjectRules);
|
||||
}
|
||||
|
||||
bool UserGroup::EvaluateObjectRuleOne(const User::Ptr user, const ObjectRule& rule)
|
||||
bool UserGroup::EvaluateObjectRuleOne(const User::Ptr& user, const ObjectRule& rule)
|
||||
{
|
||||
DebugInfo di = rule.GetDebugInfo();
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ public:
|
|||
void AddMember(const User::Ptr& user);
|
||||
void RemoveMember(const User::Ptr& user);
|
||||
|
||||
bool ResolveGroupMembership(User::Ptr const& user, bool add = true, int rstack = 0);
|
||||
bool ResolveGroupMembership(const User::Ptr& user, bool add = true, int rstack = 0);
|
||||
|
||||
static void RegisterObjectRuleHandler(void);
|
||||
|
||||
|
@ -52,7 +52,7 @@ private:
|
|||
mutable boost::mutex m_UserGroupMutex;
|
||||
std::set<User::Ptr> m_Members;
|
||||
|
||||
static bool EvaluateObjectRuleOne(const User::Ptr user, const ObjectRule& rule);
|
||||
static bool EvaluateObjectRuleOne(const User::Ptr& user, const ObjectRule& rule);
|
||||
static void EvaluateObjectRule(const ObjectRule& rule);
|
||||
static void EvaluateObjectRules(const std::vector<ObjectRule>& rules);
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue