| 2260 | } |
| 2261 | |
| 2262 | void ExternalCommandProcessor::EnableServicegroupSvcNotifications(double, const std::vector<String>& arguments) |
| 2263 | { |
| 2264 | ServiceGroup::Ptr sg = ServiceGroup::GetByName(arguments[0]); |
| 2265 | |
| 2266 | if (!sg) |
| 2267 | BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot enable service notifications for non-existent servicegroup '" + arguments[0] + "'")); |
| 2268 | |
| 2269 | for (const Service::Ptr& service : sg->GetMembers()) { |
| 2270 | Log(LogNotice, "ExternalCommandProcessor") |
| 2271 | << "Enabling notifications for service '" << service->GetName() << "'"; |
| 2272 | |
| 2273 | service->ModifyAttribute("enable_notifications", true); |
| 2274 | } |
| 2275 | } |
| 2276 | |
| 2277 | void ExternalCommandProcessor::DisableServicegroupHostNotifications(double, const std::vector<String>& arguments) |
| 2278 | { |
nothing calls this directly
no test coverage detected