| 613 | } |
| 614 | |
| 615 | swoc::Errata |
| 616 | IpAllow::YAMLLoadCategoryRoot(const YAML::Node &categories) |
| 617 | { |
| 618 | if (categories) { |
| 619 | if (!categories.IsSequence()) { |
| 620 | return swoc::Errata("{} - '{}' tag must be a sequence of maps. All IP Addresses will be blocked", this, |
| 621 | YAML_TAG_CATEGORY_ROOT); |
| 622 | } |
| 623 | for (auto const &category : categories) { |
| 624 | if (!category.IsMap()) { |
| 625 | return swoc::Errata("{} - '{}' tag must be a sequence of maps. All IP Addresses will be blocked", this, |
| 626 | YAML_TAG_CATEGORY_ROOT); |
| 627 | } |
| 628 | if (auto errata = this->YAMLLoadCategoryDefinition(category); !errata.is_ok()) { |
| 629 | return errata; |
| 630 | } |
| 631 | } |
| 632 | } |
| 633 | return {}; |
| 634 | } |
| 635 | |
| 636 | swoc::Errata |
| 637 | IpAllow::YAMLLoadCategoryDefinition(const YAML::Node &entry) |
no test coverage detected