Merge pull request #14076 from chiragshah6/fdev1

zebra: non pretty json format for rib and evpn operational commands
This commit is contained in:
Donatas Abraitis 2023-07-22 10:30:05 +03:00 committed by GitHub
commit 9e32b73634
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 3 deletions

View file

@ -962,8 +962,12 @@ static void do_show_route_helper(struct vty *vty, struct zebra_vrf *zvrf,
}
}
/*
* This is an extremely expensive operation at scale
* and non-pretty reduces memory footprint significantly.
*/
if (use_json)
vty_json(vty, json);
vty_json_no_pretty(vty, json);
}
static void do_show_ip_route_all(struct vty *vty, struct zebra_vrf *zvrf,

View file

@ -3229,7 +3229,11 @@ void zebra_vxlan_print_macs_vni(struct vty *vty, struct zebra_vrf *zvrf,
if (use_json) {
json_object_object_add(json, "macs", json_mac);
vty_json(vty, json);
/*
* This is an extremely expensive operation at scale
* and non-pretty reduces memory footprint significantly.
*/
vty_json_no_pretty(vty, json);
}
}
@ -4014,8 +4018,12 @@ void zebra_vxlan_print_vnis_detail(struct vty *vty, struct zebra_vrf *zvrf,
void *))zl3vni_print_hash_detail,
&zes);
/*
* This is an extremely expensive operation at scale
* and non-pretty reduces memory footprint significantly.
*/
if (use_json)
vty_json(vty, json_array);
vty_json_no_pretty(vty, json_array);
}
/*