summaryrefslogtreecommitdiff
path: root/lib/vty.h
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2023-02-02 10:28:19 -0500
committerDonald Sharp <sharpd@nvidia.com>2023-02-02 10:28:19 -0500
commitd7c6467ba2f55d1055babbb7fe82716ca3efdc7e (patch)
tree4a884baa25d2443017dfd7497596e171f6e20667 /lib/vty.h
parent7461589c2e41dd33306b1d5cd23689094ac66cd7 (diff)
lib, bgpd: Add ability to specify that some json output should not be pretty
Initial commit: 23b2a7ef524c9fe083b217c7f6ebaec0effc8f52 changed the json output of `show bgp <afi> <safi> json` to not have pretty print because when under a situation where there are a bunch of routes with a large scale ecmp show output was taking forever and this commit cut 2 minutes out of vtysh run time. Subusequent commit: f4ec52f7cc99f709756d9030623a20c98a086125 changed this back. When upgrading to latest version the long run time was noticed due to testing. Let's add back this functionality such that FRR can have reduced run times with vtysh when it's really needed. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'lib/vty.h')
-rw-r--r--lib/vty.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/vty.h b/lib/vty.h
index 0b3fd2443f..45349d91af 100644
--- a/lib/vty.h
+++ b/lib/vty.h
@@ -353,8 +353,12 @@ extern void vty_endframe(struct vty *, const char *);
extern bool vty_set_include(struct vty *vty, const char *regexp);
/* returns CMD_SUCCESS so you can do a one-line "return vty_json(...)"
* NULL check and json_object_free() is included.
+ *
+ * _no_pretty means do not add a bunch of newlines and dump the output
+ * as densely as possible.
*/
extern int vty_json(struct vty *vty, struct json_object *json);
+extern int vty_json_no_pretty(struct vty *vty, struct json_object *json);
/* post fd to be passed to the vtysh client
* fd is owned by the VTY code after this and will be closed when done