-
-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
While trying to write tests best path selection in rotonda-store - which requires From<Vec<u8>> and Into<Vec<u8>> for types to be stored - I need a way to create OwnedPathAttributes from scratch (so not from an existing PDUs). One way could be to create an empty PaMap and try to convert that into a PathAttributes.
I though a (convoluted) way could be:
OwnedPathAttributes::from((
PduParseInfo::modern(),
UpdateBuilder::<Vec<u8>>, Ipv4UnicastNlri>::from_attributes_builder(pa_map)
.into_pdu_iter(&SessionConfig::modern())
.next()
.unwrap()
.unwrap()
.octets()
.to_vec(),
));
This is incorrect, however.
Having an From<..> impl for this, would allow OrdRoute to take &OwnedPathAttributes as argument, instead of &PaMap. This would be handy, since Rotonda itself stores OwnedPathAttributes as its meta type in the store.
Metadata
Metadata
Assignees
Labels
No labels