Skip to content

v0.13.0 — vendor-profile plumbing

Choose a tag to compare

@fastrevmd-lab fastrevmd-lab released this 17 Jul 16:55
ec00544

Vendor-profile plumbing across the workspace.

crates.io: rustnetconf 0.13.0 · rustnetconf-cli 0.3.4 · rustnetconf-yang 0.1.4 (unchanged)

Highlights

  • DevicePool honors an explicit vendor profile. DeviceConfig.vendor is now wired into connection setup — previously it was silently ignored. The field changed from Box<dyn VendorProfile> to Arc<dyn VendorProfile>; new ClientBuilder::vendor_profile_arc() and Session::set_vendor_profile_arc() support the shared-ownership path. The existing vendor_profile(Box<…>) API is unchanged. (#37)
  • New Client::unwrap_config() / Session::unwrap_config() — exposes the connected device's vendor unwrap_config; additive public API. (#38)
  • Vendor-aware CLI diffs. netconf plan/apply normalize the desired config through the connected device's vendor profile instead of a hardcoded <configuration> strip. Fixes an asymmetric, potentially wrong diff against generic (non-Junos) devices; Junos behavior unchanged. (#38)

Compatibility

  • Source-breaking (library): DeviceConfig.vendor is now Option<Arc<dyn VendorProfile>>. Wrap explicit profiles in Arc::new(...) instead of Box::new(...).
  • Internally, VendorProfile::post_facts_hook takes &self (with JunosVendor cluster state moved to interior mutability) so profiles work under Arc.

Full diff: v0.12.3...v0.13.0