MCPcopy Create free account
hub / github.com/apache/trafficserver / YAMLLoadCategoryRoot

Method YAMLLoadCategoryRoot

src/proxy/IPAllow.cc:615–634  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

613}
614
615swoc::Errata
616IpAllow::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
636swoc::Errata
637IpAllow::YAMLLoadCategoryDefinition(const YAML::Node &entry)

Callers 2

YAMLBuildTableMethod · 0.95
YAMLBuildCategoriesMethod · 0.95

Calls 3

ErrataClass · 0.85
is_okMethod · 0.45

Tested by

no test coverage detected