mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-27 07:34:15 +02:00
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();
|
return GetServices().size();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Host::InvalidateServicesCache(void)
|
void Host::InvalidateServicesCache(void)
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
|
@ -200,6 +200,19 @@ String Service::GetShortName(void) const
|
|||||||
return m_ShortName;
|
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
|
bool Service::IsReachable(void) const
|
||||||
{
|
{
|
||||||
ASSERT(!OwnsLock());
|
ASSERT(!OwnsLock());
|
||||||
|
@ -122,6 +122,8 @@ public:
|
|||||||
std::set<Host::Ptr> GetParentHosts(void) const;
|
std::set<Host::Ptr> GetParentHosts(void) const;
|
||||||
std::set<Service::Ptr> GetParentServices(void) const;
|
std::set<Service::Ptr> GetParentServices(void) const;
|
||||||
|
|
||||||
|
bool IsHostCheck(void) const;
|
||||||
|
|
||||||
bool IsVolatile(void) const;
|
bool IsVolatile(void) const;
|
||||||
|
|
||||||
bool IsReachable(void) const;
|
bool IsReachable(void) const;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user