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

Method CheckMatches

lib/config/applyrule.cpp:154–181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

152}
153
154void ApplyRule::CheckMatches(bool silent)
155{
156 for (auto& perSourceType : m_Rules) {
157 for (auto& perTargetType : perSourceType.second.Regular) {
158 for (auto& rule : perTargetType.second) {
159 CheckMatches(rule, perSourceType.first, silent);
160 }
161 }
162
163 std::unordered_set<ApplyRule*> targeted;
164
165 for (auto& perHost : perSourceType.second.Targeted) {
166 for (auto& rule : perHost.second.ForHost) {
167 targeted.emplace(rule.get());
168 }
169
170 for (auto& perService : perHost.second.ForServices) {
171 for (auto& rule : perService.second) {
172 targeted.emplace(rule.get());
173 }
174 }
175 }
176
177 for (auto rule : targeted) {
178 CheckMatches(rule, perSourceType.first, silent);
179 }
180 }
181}
182
183void ApplyRule::CheckMatches(const ApplyRule::Ptr& rule, Type* sourceType, bool silent)
184{

Callers

nothing calls this directly

Calls 6

LogClass · 0.85
emplaceMethod · 0.80
HasMatchesMethod · 0.80
getMethod · 0.45
GetNameMethod · 0.45
GetDebugInfoMethod · 0.45

Tested by

no test coverage detected