Skip to main content

interfaces

Function interfaces 

Source
pub fn interfaces(config: &Config) -> Vec<Interface>
Expand description

Returns every interface under the top-level interfaces block.

ยงExamples

use asterust::config::juniper;
use asterust_junos::interfaces::interfaces;

let config = juniper::parse_braces("interfaces {\n    ge-0/0/0 {\n        mtu 9192;\n    }\n}\n");
let found = interfaces(&config);
assert_eq!(found[0].name, "ge-0/0/0");
assert_eq!(found[0].mtu.as_deref(), Some("9192"));