| 395 | } |
| 396 | |
| 397 | swoc::Errata |
| 398 | IpAllow::YAMLLoadIPCategory(const YAML::Node &node, IpMap *map, IpAllow::Record const *record) |
| 399 | { |
| 400 | if (!node.IsScalar()) { |
| 401 | return swoc::Errata(ERRATA_ERROR, "{} Expected IP address category at {}, found non-literal.", this, node.Mark()); |
| 402 | } |
| 403 | std::string const &category(node.Scalar()); |
| 404 | if (auto spot = ip_category_map.find(category); spot != ip_category_map.end()) { |
| 405 | for (auto const &range : spot->second) { |
| 406 | map->fill(range.range_view(), record); |
| 407 | } |
| 408 | } else { |
| 409 | return swoc::Errata(ERRATA_ERROR, "{} {} - '{}' is not category with a defined range.", this, node.Mark(), category); |
| 410 | } |
| 411 | return {}; |
| 412 | } |
| 413 | |
| 414 | swoc::Errata |
| 415 | IpAllow::YAMLLoadEntry(const YAML::Node &entry) |
no test coverage detected