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

Method CustomVariableNamesAccessor

lib/livestatus/hoststable.cpp:1013–1032  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1011}
1012
1013Value HostsTable::CustomVariableNamesAccessor(const Value& row)
1014{
1015 Host::Ptr host = static_cast<Host::Ptr>(row);
1016
1017 if (!host)
1018 return Empty;
1019
1020 Dictionary::Ptr vars = host->GetVars();
1021
1022 ArrayData result;
1023
1024 if (vars) {
1025 ObjectLock olock(vars);
1026 for (const Dictionary::Pair& kv : vars) {
1027 result.push_back(kv.first);
1028 }
1029 }
1030
1031 return new Array(std::move(result));
1032}
1033
1034Value HostsTable::CustomVariableValuesAccessor(const Value& row)
1035{

Callers

nothing calls this directly

Calls 1

push_backMethod · 0.80

Tested by

no test coverage detected