asterust_junos/policy_options/
as_path_group.rs1use super::as_path::{parse_as_path, AsPath};
9use crate::active_children;
10use asterust::config::ConfigLine;
11
12#[derive(Clone, Debug, PartialEq, Eq)]
14#[non_exhaustive]
15pub struct AsPathGroup {
16 pub name: String,
17 pub as_paths: Vec<AsPath>,
18}
19
20pub(super) fn parse_as_path_group(name: &str, group: &ConfigLine) -> AsPathGroup {
21 AsPathGroup {
22 name: name.to_string(),
23 as_paths: active_children(group).filter_map(parse_as_path).collect(),
24 }
25}