| 26 | REGISTER_FUNCTION(Icinga, get_time_period, &TimePeriod::GetByName, "name"); |
| 27 | |
| 28 | Service::Ptr ObjectUtils::GetService(const Value& host, const String& name) |
| 29 | { |
| 30 | Host::Ptr hostObj; |
| 31 | |
| 32 | if (host.IsObjectType<Host>()) |
| 33 | hostObj = host; |
| 34 | else |
| 35 | hostObj = Host::GetByName(host); |
| 36 | |
| 37 | if (!hostObj) |
| 38 | return nullptr; |
| 39 | |
| 40 | return hostObj->GetServiceByShortName(name); |
| 41 | } |
| 42 | |
| 43 | Array::Ptr ObjectUtils::GetServices(const Value& host) |
| 44 | { |
nothing calls this directly
no test coverage detected