]> git.puffer.fish Git - matthieu/frr.git/commit
Don't print empty sections as they clutter the output of show-running
authorDinesh G Dutt <ddutt@cumulusnetworks.com>
Mon, 18 Jul 2016 06:08:05 +0000 (23:08 -0700)
committerDinesh G Dutt <ddutt@cumulusnetworks.com>
Tue, 19 Jul 2016 03:43:48 +0000 (20:43 -0700)
commit5be7afc8bb6dce6f6bcf77faad3a754e52812408
tree6d6813408a7725bd5c6bbacb9ee7da5a3917aabb
parent07fc159679d3d2511dd938246d41b50bf9a9c9ce
Don't print empty sections as they clutter the output of show-running

Ticket: CM-11808
Reviewed By: CCR-4971
Testing Done: Usual stuff including doing show running with multiple daemons

Interface and VRF are both sections of the config that could possibly be
empty. This unnecessarily clutters the output of show running. This patch
fixes that by not displaying empty sections of interface, and vrf.
Routemaps have a genuine empty stanza and so we cannot add routemap to this
list. Unfortunately this means a "show running-config ospfd" may have empty
route-maps if the route-maps all correspond to BGP, for example. This
is not a concern for the entire "show running-config".

The trick in fixing this is on the vtysh side rather than on the client side.
The reason for this is that its quite tricky given the number of options to
ensure that a daemon never printed a section header unless there was something
to print. On the vtysh side, however, its easy to check if a section is
empty and not print it.
vtysh/vtysh.c
vtysh/vtysh_config.c