mirror of https://github.com/Icinga/icinga2.git
cluster: Make the feature checks more robust.
This commit is contained in:
parent
2d991703d6
commit
8c7d50eef3
|
@ -1182,12 +1182,22 @@ void ClusterComponent::UpdateAuthority(void)
|
|||
|
||||
bool ClusterComponent::SupportsChecks(void)
|
||||
{
|
||||
return DynamicType::GetByName("CheckerComponent");
|
||||
DynamicType::Ptr type = DynamicType::GetByName("CheckerComponent");
|
||||
|
||||
if (!type)
|
||||
return false;
|
||||
|
||||
return !type->GetObjects().empty();
|
||||
}
|
||||
|
||||
bool ClusterComponent::SupportsNotifications(void)
|
||||
{
|
||||
return DynamicType::GetByName("NotificationComponent");
|
||||
DynamicType::Ptr type = DynamicType::GetByName("NotificationComponent");
|
||||
|
||||
if (!type)
|
||||
return false;
|
||||
|
||||
return !type->GetObjects().empty();
|
||||
}
|
||||
|
||||
void ClusterComponent::InternalSerialize(const Dictionary::Ptr& bag, int attributeTypes) const
|
||||
|
|
Loading…
Reference in New Issue