MCPcopy Create free account
hub / github.com/Icinga/icinga2 / GetByNamePair

Method GetByNamePair

lib/icinga/service.cpp:90–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88}
89
90Service::Ptr Service::GetByNamePair(const String& hostName, const String& serviceName)
91{
92 if (!hostName.IsEmpty()) {
93 Host::Ptr host = Host::GetByName(hostName);
94
95 if (!host)
96 return nullptr;
97
98 return host->GetServiceByShortName(serviceName);
99 } else {
100 return Service::GetByName(serviceName);
101 }
102}
103
104Host::Ptr Service::GetHost() const
105{

Callers

nothing calls this directly

Calls 2

GetServiceByShortNameMethod · 0.80
IsEmptyMethod · 0.45

Tested by

no test coverage detected