Skip to content

Commit

Permalink
Merge pull request #1421 from Tristou27/iosxr_fix_1310
Browse files Browse the repository at this point in the history
add outgoing_interface in get_route_to for isoxr
  • Loading branch information
mirceaulinic authored Apr 30, 2021
2 parents 5977b14 + e984d98 commit b2ee14f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion napalm/iosxr/iosxr.py
Original file line number Diff line number Diff line change
Expand Up @@ -1857,10 +1857,17 @@ def get_route_to(self, destination="", protocol="", longer=False):
for route_entry in route.xpath("RoutePath/Entry"):
# get all possible entries
next_hop = napalm.base.helpers.find_txt(route_entry, "Address")
outgoing_interface = napalm.base.helpers.find_txt(
route_entry, "InterfaceName"
)
single_route_details = {}
single_route_details.update(route_details)
single_route_details.update(
{"current_active": first_route, "next_hop": next_hop}
{
"current_active": first_route,
"next_hop": next_hop,
"outgoing_interface": outgoing_interface,
}
)
routes[destination].append(single_route_details)
first_route = False
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"1.0.4.0/24": [{"protocol": "bgp", "outgoing_interface": "", "age": 1804805, "current_active": true, "routing_table": "default", "last_active": false, "protocol_attributes": {}, "next_hop": "37.49.232.13", "selected_next_hop": false, "inactive_reason": "", "preference": 12}]}
{"1.0.4.0/24": [{"protocol": "bgp", "outgoing_interface": "None", "age": 1804805, "current_active": true, "routing_table": "default", "last_active": false, "protocol_attributes": {}, "next_hop": "37.49.232.13", "selected_next_hop": false, "inactive_reason": "", "preference": 12}]}

0 comments on commit b2ee14f

Please sign in to comment.