[PATCH proxmox-ve-rs 4/9] ve-config: use constructor instead of instantiating struct

Stefan Hanreich
2026-05-04T16:32:09Z

This makes it easier to add optional properties to the struct without
having to adjust this call site everytime the internal representation
changes.

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
proxmox-ve-config/src/sdn/fabric/frr.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/proxmox-ve-config/src/sdn/fabric/frr.rs b/proxmox-ve-config/src/sdn/fabric/frr.rs
index ca43cf9..fd99c3c 100644
--- a/proxmox-ve-config/src/sdn/fabric/frr.rs
+++ b/proxmox-ve-config/src/sdn/fabric/frr.rs
@@ -287,7 +287,7 @@ pub fn build_fabric(

/// Helper that builds a OSPF router with a the router_id.
fn build_ospf_router(router_id: Ipv4Addr) -> Result<OspfRouter, anyhow::Error> {
- Ok(ser::ospf::OspfRouter { router_id })
+ Ok(OspfRouter::new(router_id))
}

/// Helper that builds a OpenFabric router from a fabric_id and a [`Net`].
--
2.47.3