mirror of https://github.com/Icinga/icinga2.git
service: add IsHostCheck helper
This commit is contained in:
parent
0f56513087
commit
3023686042
|
@ -314,6 +314,7 @@ int Host::GetTotalServices(void) const
|
|||
{
|
||||
return GetServices().size();
|
||||
}
|
||||
|
||||
void Host::InvalidateServicesCache(void)
|
||||
{
|
||||
{
|
||||
|
|
|
@ -200,6 +200,19 @@ String Service::GetShortName(void) const
|
|||
return m_ShortName;
|
||||
}
|
||||
|
||||
bool Service::IsHostCheck(void) const
|
||||
{
|
||||
ASSERT(!OwnsLock());
|
||||
|
||||
Service::Ptr hc = GetHost()->GetHostCheckService();
|
||||
|
||||
if (!hc)
|
||||
return false;
|
||||
|
||||
return (hc->GetName() == GetName());
|
||||
|
||||
}
|
||||
|
||||
bool Service::IsReachable(void) const
|
||||
{
|
||||
ASSERT(!OwnsLock());
|
||||
|
|
|
@ -122,6 +122,8 @@ public:
|
|||
std::set<Host::Ptr> GetParentHosts(void) const;
|
||||
std::set<Service::Ptr> GetParentServices(void) const;
|
||||
|
||||
bool IsHostCheck(void) const;
|
||||
|
||||
bool IsVolatile(void) const;
|
||||
|
||||
bool IsReachable(void) const;
|
||||
|
|
Loading…
Reference in New Issue