asterust_junos/protocols/bgp/peer_options/
remove_private.rs1use crate::statement_words;
9use asterust::config::ConfigLine;
10
11#[derive(Clone, Debug, Default, PartialEq, Eq)]
13#[non_exhaustive]
14pub struct RemovePrivate {
15 pub all: bool,
16 pub replace: bool,
17 pub nearest: bool,
18 pub no_peer_loop_check: bool,
19}
20
21pub(super) fn parse_remove_private(line: &ConfigLine) -> Option<RemovePrivate> {
23 let words = statement_words(line, "remove-private")?;
24 Some(RemovePrivate {
25 all: words.contains(&"all"),
26 replace: words.contains(&"replace"),
27 nearest: words.contains(&"nearest"),
28 no_peer_loop_check: words.contains(&"no-peer-loop-check"),
29 })
30}