Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

show ip route fixes #2

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions show/bgp_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,9 @@ def merge_to_combined_route(combined_route, route, new_info_l):
additional_nh_l.append(copy.deepcopy(nh))

if len(additional_nh_l) > 0:
combined_route[route][j]['internalNextHopNum'] + len(additional_nh_l)
combined_route[route][j]['internalNextHopNum'] += len(additional_nh_l)
if combined_route[route][j]['internalNextHopActiveNum'] > 0 and new_info['internalNextHopActiveNum'] > 0:
combined_route[route][j]['internalNextHopActiveNum'] + len(additional_nh_l)
combined_route[route][j]['internalNextHopActiveNum'] += len(additional_nh_l)
combined_route[route][j]['nexthops'] += additional_nh_l
# the nexhops merged, no need to add the new_info
skip_this_new_info = True
Expand Down Expand Up @@ -393,7 +393,8 @@ def show_routes(args, namespace, display, verbose, ipver):

# Multi-asic show ip route with additional parms are handled by going to FRR directly and get those outputs from each namespace
if found_other_parms:
print("{}:".format(ns))
if ns:
print("{}:".format(ns))
print(output)
continue

Expand Down