summaryrefslogtreecommitdiffstats
path: root/bgpd
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2023-02-02 16:40:07 +0100
committerDonald Sharp <sharpd@nvidia.com>2023-02-02 16:42:21 +0100
commit2d4460de6f363533c77eae55bb590a19376b26fd (patch)
tree2a8c2ed8e9ba17ef27b5d4b4269095ead3bb230a /bgpd
parentlib, bgpd: Add ability to specify that some json output should not be pretty (diff)
downloadfrr-2d4460de6f363533c77eae55bb590a19376b26fd.tar.xz
frr-2d4460de6f363533c77eae55bb590a19376b26fd.zip
bgpd: Convert evpn output to not pretty print json
Commit: 3cdb03fba7b40240fb38469a12b7b05a11043e09 changed the vty_json output to not be pretty printing. The previous commit in the tree added vty_json_no_pretty let's use that instead Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'bgpd')
-rw-r--r--bgpd/bgp_evpn_vty.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/bgpd/bgp_evpn_vty.c b/bgpd/bgp_evpn_vty.c
index 3c7fb4cb1..0b5f81ccb 100644
--- a/bgpd/bgp_evpn_vty.c
+++ b/bgpd/bgp_evpn_vty.c
@@ -4807,14 +4807,13 @@ DEFUN(show_bgp_l2vpn_evpn_route,
evpn_show_all_routes(vty, bgp, type, json, detail);
- if (uj) {
- if (detail) {
- vty_out(vty, "%s\n", json_object_to_json_string(json));
- json_object_free(json);
- } else {
- vty_json(vty, json);
- }
- }
+ /*
+ * This is an extremely expensive operation at scale
+ * and as such we need to save as much time as is
+ * possible.
+ */
+ if (uj)
+ vty_json_no_pretty(vty, json);
return CMD_SUCCESS;
}