holo-routing / holo

Holo is a suite of routing protocols designed to support high-scale and automation-driven networks.
MIT License
274 stars 17 forks source link

Restructure IbusMsg #33

Open Paul-weqe opened 1 month ago

Paul-weqe commented 1 month ago

IbusMsg had too many items (which can only keep growing). This commit restructures the actions and categorize each item e.g Interface/RouteId and actions like add, delete, update etc...

Paul-weqe commented 1 month ago

@rwestphal tests failing with an issue from the BGP tests. Can you help with that ?

Paul-weqe commented 3 weeks ago

@rwestphal are you talking about manually implementing the From trait on the enums ?

Looking through the enum-as-inner docs and testing locally. Finding it difficult to see a way we can run let _ = ibus_tx.send(msg.into()); without implementing the trait ourselves.

rwestphal commented 3 weeks ago

@Paul-weqe You're absolutely right. The enum-as-inner crate only handles the conversion from the enum type to its variants, but not the other way around. But we can possibly use the derive-more crate to avoid implementing those conversions manually. The less code we need to write, the better.