Merge pull request #4920 from ddutt/bgp-summary-upd8

Add Estd & Dropped counters to JSON output of "show bgp summary" command
This commit is contained in:
Donald Sharp 2019-09-03 08:06:22 -04:00 committed by GitHub
commit 6ae3f8420f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8392,6 +8392,10 @@ static int bgp_show_summary(struct vty *vty, struct bgp *bgp, int afi, int safi,
json_peer, "state",
lookup_msg(bgp_status_msg, peer->status,
NULL));
json_object_int_add(json_peer, "connectionsEstablished",
peer->established);
json_object_int_add(json_peer, "connectionsDropped",
peer->dropped);
}
/* Avoid creating empty peer dicts in JSON */
if (json_peer == NULL)