Expand description
Typed views of common JunOS config statements, extracted from a tree parsed by
asterust::config::juniper (brace-delimited show configuration output).
JunOS nests everything under a few top-level blocks (interfaces, protocols,
routing-options, routing-instances, policy-options, firewall, system), so each module
exposes a free function that reads the relevant block from a asterust::config::Config rather
than a per-block constructor. JunosDevice bundles a parsed config with all of them as
getters.
The module tree mirrors the configuration hierarchy: system { radius-server ... } is
system::radius_server and protocols { bgp { ... } } is protocols::bgp. A statement with
many children of its own gets a folder, so system::services::ssh models the ssh statement
of system services.
Statements deactivated with inactive: are skipped. | display set output is not supported.
Each module documents its configuration path and links to the matching pages of the Junos CLI Reference.
§Examples
use asterust_junos::JunosDevice;
let device = JunosDevice::parse("interfaces {\n lo0 {\n unit 0;\n }\n}\n");
assert_eq!(device.interfaces()[0].name, "lo0");§See also
Re-exports§
pub use device::JunosDevice;
Modules§
- device
- Bundles one parsed Junos configuration with every supported view as a getter.
- firewall
firewallfirewall { ... }.- interfaces
interfacesinterfaces { ... }.- policy_
options policy-optionspolicy-options { ... }.- protocols
protocolsprotocols { ... }.- routing_
instances routing-instancesrouting-instances { ... }.- routing_
options routing-optionsrouting-options { ... }.- system
systemsystem { ... }.