| 288 | } |
| 289 | |
| 290 | bool MgrMap::can_run_module(const std::string &module_name, std::string *error) const |
| 291 | { |
| 292 | for (const auto &i : available_modules) { |
| 293 | if (i.name == module_name) { |
| 294 | *error = i.error_string; |
| 295 | return i.can_run; |
| 296 | } |
| 297 | } |
| 298 | |
| 299 | std::ostringstream oss; |
| 300 | oss << "Module '" << module_name << "' does not exist"; |
| 301 | throw std::logic_error(oss.str()); |
| 302 | } |
| 303 | |
| 304 | void MgrMap::encode(ceph::buffer::list& bl, uint64_t features) const |
| 305 | { |