diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2015-05-20 03:04:17 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2015-05-20 03:04:17 +0200 |
commit | 14151a32739c156446a840e5b73aa21c57af2446 (patch) | |
tree | b30b3b1062d26951d8106452f573d84732e92ba1 /bgpd/bgp_vty.c | |
parent | The retry of BGP connection after expiry of connect retry timer was (diff) | |
download | frr-14151a32739c156446a840e5b73aa21c57af2446.tar.xz frr-14151a32739c156446a840e5b73aa21c57af2446.zip |
Fix some minor bugs with json output in bgp show commands
Diffstat (limited to 'bgpd/bgp_vty.c')
-rw-r--r-- | bgpd/bgp_vty.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index 1361c781e..7852371fc 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -8533,6 +8533,9 @@ bgp_show_summary (struct vty *vty, struct bgp *bgp, int afi, int safi, json_int = json_object_new_int(peer->obuf->count); json_object_object_add(json_peer, "outq", json_int); + json_int = json_object_new_int(0); + json_object_object_add(json_peer, "inq", json_int); + json_string = json_object_new_string(peer_uptime (peer->uptime, timebuf, BGP_UPTIME_LEN)); json_object_object_add(json_peer, "uptime", json_string); @@ -8608,6 +8611,13 @@ bgp_show_summary (struct vty *vty, struct bgp *bgp, int afi, int safi, if (use_json) { json_object_object_add(json, "peers", json_peers); + + json_int = json_object_new_int(count); + json_object_object_add(json, "total-peers", json_int); + + json_int = json_object_new_int(dn_count); + json_object_object_add(json, "dynamic-peers", json_int); + vty_out (vty, "%s%s", json_object_to_json_string(json), VTY_NEWLINE); // Recursively free all json structures |