mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 10:46:22 +00:00
bgpd: Do not print new line for EVPN CLI outputs if it's a JSON
Before: ``` $ vtysh -c 'show bgp l2vpn evpn route detail json' <<<<<<<<<<<<<<<<<<<< empty line <<<<<<<<<<<<<<<<<<<< empty line <<<<<<<<<<<<<<<<<<<< empty line <<<<<<<<<<<<<<<<<<<< empty line { ... "numPrefix":4, "numPaths":4 <<<<< four paths = four empty lines } ``` Contain as much "empty lines" before the JSON string as the number of paths displayed. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
This commit is contained in:
parent
8783ed4bb4
commit
2bf9780b26
@ -10052,7 +10052,7 @@ void route_vty_out_detail(struct vty *vty, struct bgp *bgp, struct bgp_dest *bn,
|
|||||||
vty_out(vty, " Gateway IP %s", gwip_buf);
|
vty_out(vty, " Gateway IP %s", gwip_buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (safi == SAFI_EVPN)
|
if (safi == SAFI_EVPN && !json_path)
|
||||||
vty_out(vty, "\n");
|
vty_out(vty, "\n");
|
||||||
|
|
||||||
/* Line1 display AS-path, Aggregator */
|
/* Line1 display AS-path, Aggregator */
|
||||||
@ -11545,7 +11545,6 @@ void route_vty_out_detail_header(struct vty *vty, struct bgp *bgp,
|
|||||||
has_valid_label = bgp_is_valid_label(&label);
|
has_valid_label = bgp_is_valid_label(&label);
|
||||||
|
|
||||||
if (safi == SAFI_EVPN) {
|
if (safi == SAFI_EVPN) {
|
||||||
|
|
||||||
if (!json) {
|
if (!json) {
|
||||||
vty_out(vty, "BGP routing table entry for %s%s%pFX\n",
|
vty_out(vty, "BGP routing table entry for %s%s%pFX\n",
|
||||||
prd ? prefix_rd2str(prd, buf1, sizeof(buf1))
|
prd ? prefix_rd2str(prd, buf1, sizeof(buf1))
|
||||||
|
Loading…
Reference in New Issue
Block a user