Skip to content

Commit

Permalink
status: show routes from all the routing tables
Browse files Browse the repository at this point in the history
  • Loading branch information
daniloegea committed Aug 3, 2023
1 parent dbdfce0 commit 20540a0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion netplan_cli/cli/commands/status.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,9 @@ def pretty_print(self, data: JSON, total: int, _console_width=None, diff_state:
metric = ''
if 'metric' in obj:
metric = ' metric ' + str(obj['metric'])
table = ''
if 'table' in obj:
table = ' table ' + str(obj['table'])

extra = []
if 'protocol' in obj and obj['protocol'] != 'kernel':
Expand All @@ -301,12 +304,13 @@ def pretty_print(self, data: JSON, total: int, _console_width=None, diff_state:
type = obj['type']
extra.append(type)

pprint(('{title:>'+pad+'} {start}{to}{via}{src}{metric}{end}[muted]{extra}[/muted]').format(
pprint(('{title:>'+pad+'} {start}{to}{via}{src}{metric}{table}{end}[muted]{extra}[/muted]').format(
title='Routes:' if i == 0 else '',
to=obj['to'],
via=via,
src=src,
metric=metric,
table=table,
extra=' ('+', '.join(extra)+')' if extra else '',
start=default_start,
end=default_end))
Expand Down

0 comments on commit 20540a0

Please sign in to comment.