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

Method ParseName

lib/icinga/service.cpp:29–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27}
28
29Dictionary::Ptr ServiceNameComposer::ParseName(const String& name) const
30{
31 std::vector<String> tokens = name.Split("!");
32
33 if (tokens.size() < 2)
34 BOOST_THROW_EXCEPTION(std::invalid_argument("Invalid Service name."));
35
36 return new Dictionary({
37 { "host_name", tokens[0] },
38 { "name", tokens[1] }
39 });
40}
41
42void Service::OnAllConfigLoaded()
43{

Callers 1

CreateObjectConfigMethod · 0.45

Calls 2

SplitMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected