| 2211 | } |
| 2212 | |
| 2213 | void ExternalCommandProcessor::DisableHostgroupHostNotifications(double, const std::vector<String>& arguments) |
| 2214 | { |
| 2215 | HostGroup::Ptr hg = HostGroup::GetByName(arguments[0]); |
| 2216 | |
| 2217 | if (!hg) |
| 2218 | BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot disable host notifications for non-existent hostgroup '" + arguments[0] + "'")); |
| 2219 | |
| 2220 | for (const Host::Ptr& host : hg->GetMembers()) { |
| 2221 | Log(LogNotice, "ExternalCommandProcessor") |
| 2222 | << "Disabling notifications for host '" << host->GetName() << "'"; |
| 2223 | |
| 2224 | host->ModifyAttribute("enable_notifications", false); |
| 2225 | } |
| 2226 | } |
| 2227 | |
| 2228 | void ExternalCommandProcessor::DisableHostgroupSvcNotifications(double, const std::vector<String>& arguments) |
| 2229 | { |
nothing calls this directly
no test coverage detected