Closed Ange-Cesari closed 9 months ago
@wojcik91 is doing some cleanup and rewrite - @wojcik91 could you comment regarding release we plan tomorrow/Monday?
Hello @wojcik91
I see that you've done some changes on the code.
Could you please give some informations, is the release complete ?
Thanks, Ange
Hi @Ange-Cesari
We've just completed the refactor and made the first actual release (v0.2.0). I've tried to clean up the existing code as much as possible and add a common Trait
which enables us to have a consistent management API between different platforms/implementations. This should make it easier to add more integrations in a sort of "plugin" approach. Personally I hope to have some free time to add a Mikrotik integration for my own homelab use :)
Going back to the original question - current API exposes two methods related to managing peers:
configure_peer(&self, peer: &Peer)
remove_peer(&self, peer_pubkey: &Key)
configure_peer
can be used to both add a completely new peer or configure an existing one. You can think of it as an UPSERT
query in SQL.
So to reconfigure a peer you should be able to just use configure_peer
with no additional steps necessary.
Hi,
I need to rewrite peers without restarting the interface (i must not disconnect other peer to add or delete one from the interface)
Is it possible with the write_peer and delete_peer ?
If so, "updating" a peer sequence should Just be :
write_peer delete_peer write_peer
Is that correct ?
Best, Ange