napalm icon indicating copy to clipboard operation
napalm copied to clipboard

get routes neighbour

Open omershtivi opened this issue 6 years ago • 6 comments

add a getter Instead of the previous pull request of get_received_routes change to get_routes_neighbour, the method will receive the following args: protocol (BGP, or any other supported protocol) direction (in/out) neighbour

The getter will return: list of learned routes as dict (can add more info later, like LP, AS-path, etc')

omershtivi avatar Jul 06 '18 20:07 omershtivi

The name itself seems awkward. Instead of get_routes_neighbor, maybe it would be better to use get_adj_rib_in and get_adj_rib_out or something similar?

ipv6freely avatar Jul 10 '18 18:07 ipv6freely

maybe get_adj_rib?

I want to have the direction in the method

omershtivi avatar Jul 11 '18 06:07 omershtivi

We are generally trying to avoid adding new getters and instead think we should probably focus on napalm-yang for new getters. That being said, I am open to discussions on enabling this (somehow in the napalm community repositories). If there is a way this could reasonable be accomplished.

ktbyers avatar Aug 20 '18 01:08 ktbyers

Hi @ktbyers Wish I understood the Napalm-Yang couldn't get my head around it.

Anyway my latest though was to get the feature into get_routes and maybe add two args for neighbour and neighbour_direction instead of adding a new getter

omershtivi avatar Aug 20 '18 04:08 omershtivi

That would be an API change, @omershtivi - which I wouldn't disagree with. Would you be happy to address these in a PR?

mirceaulinic avatar Nov 01 '18 10:11 mirceaulinic

I have a working implementation on junos. Just needs a bit of cleanup and then I'll submit a PR

ggiesen avatar Sep 17 '19 01:09 ggiesen