diff options
| author | Ashwini Reddy <ashred@nvidia.com> | 2022-11-07 11:53:48 -0800 | 
|---|---|---|
| committer | Chirag Shah <chirag@nvidia.com> | 2022-11-23 19:04:00 -0800 | 
| commit | fa5a9276d1e0e69e4ab690d12dc38aed14f2d6bd (patch) | |
| tree | c9ab64b552a67ee052c5d6ad46ace5154978364b /bgpd/bgp_updgrp.h | |
| parent | a86afb3e0e12a8f29b49e71e9aa9f23ea7de6d51 (diff) | |
bgpd: JSON support for show ip bgp vrf all update-group
Ticket:#3229030
Testing Done: UT
Changes:
 - JSON support for the update group command.
Testing:
torc-11# show ip bgp vrf all ipv6 update-groups json
torc-12# show bgp vrf all update-groups json
{
  "default":{
    "2":{
      "groupCreateTime":{
        "epoch":1669225617,
        "epochString":"Wed Nov 23 17:46:57 2022\n"
      },
      "afi":"IPv6",
      "safi":"unicast",
      "outRouteMap":"MY_ORIGIN_ASPATH_ONLY",
      "minRouteAdvInt":0,
      "subGroup":[
        {
          "subGroupId":2,
          "groupCreateTime":{
            "epoch":1669225617,
            "epochString":"Wed Nov 23 17:46:57 2022\n"
          },
          "statistics":{
            "joinEvents":2,
            "pruneEvents":0,
            "mergeEvents":0,
            "splitEvents":0,
            "switchEvents":0,
            "peerRefreshEvents":0,
            "mergeCheckEvents":2
          },
          "coalesceTime":1100,
          "version":12,
          "packetQueueInfo":{
            "qeueueLen":0,
            "queuedTotal":1,
            "queueHwmLen":1,
            "totalEnqueued":1
          },
          "adjListCount":1,
          "needsRefresh":false,
          "peers":[
            "uplink_1",
            "uplink_2"
          ]
        }
      ]
    }
  }
}
{
  "sym_3":{
  }
}
{
  "sym_5":{
  }
}
{
  "sym_2":{
  }
}
{
  "sym_4":{
  }
}
{
  "sym_1":{
  }
}
Co-authored-by: Chirag Shah <chirag@nvidia.com>
Signed-off-by: Ashwini Reddy <ashred@nvidia.com>
Diffstat (limited to 'bgpd/bgp_updgrp.h')
| -rw-r--r-- | bgpd/bgp_updgrp.h | 4 | 
1 files changed, 3 insertions, 1 deletions
diff --git a/bgpd/bgp_updgrp.h b/bgpd/bgp_updgrp.h index ecd92a996e..16628158f9 100644 --- a/bgpd/bgp_updgrp.h +++ b/bgpd/bgp_updgrp.h @@ -304,6 +304,8 @@ struct updwalk_context {  	updgrp_walkcb cb;  	void *context;  	uint8_t flags; +	bool uj; +	json_object *json_updategrps;  #define UPDWALK_FLAGS_ADVQUEUE   (1 << 0)  #define UPDWALK_FLAGS_ADVERTISED (1 << 1) @@ -365,7 +367,7 @@ extern void update_bgp_group_init(struct bgp *);  extern void udpate_bgp_group_free(struct bgp *);  extern void update_group_show(struct bgp *bgp, afi_t afi, safi_t safi, -			      struct vty *vty, uint64_t subgrp_id); +			      struct vty *vty, uint64_t subgrp_id, bool uj);  extern void update_group_show_stats(struct bgp *bgp, struct vty *vty);  extern void update_group_adjust_peer(struct peer_af *paf);  extern int update_group_adjust_soloness(struct peer *peer, int set);  | 
