]> git.puffer.fish Git - matthieu/frr.git/commit
bgpd: BGP JSON show commands enhancements
authorAmeya Dharkar <adharkar@vmware.com>
Fri, 5 Oct 2018 21:30:59 +0000 (14:30 -0700)
committerAmeya Dharkar <adharkar@vmware.com>
Fri, 5 Oct 2018 22:06:17 +0000 (15:06 -0700)
commit50e05855f06d29d3c7ba86ef74529c777e3af7c3
tree8635a1d62ddec5a72d52163feb2eb02f4da55c00
parent78230371e9596bb0b8c5206cba86d8ac6c15a8d5
bgpd: BGP JSON show commands enhancements

1. "show bgp ipv4 json"
  - Corresponding CLI has "network" field which displays a prefix in
    'prefix/prefixlen' format. Added this "network" field to JSON as well.
  - Following fields have different names in JSON and CLI.
      CLI      JSON
      metric   med
      locPrf   localPref
      path     aspath

    Added fields "metric", "locPrf" and "path" in JSON for CLI/JSON
    consistency. Older JSON fields med, localPref, aspath will be
    deprecated in future.

2. "show bgp ipv6 json"
  - Similar changes as "show bgp ipv4 json"
  - JSON does not have "prefix", "prefixLen" fields which are present in IPv4
  command. Added these fields as they are useful.

3. "show bgp ipv4/ipv6 neighbor <neighbor_addr> advertised-routes json"
  - Added "network" field.
  - Added locPrf, path fields for CLI/JSON consistency. localPref, aspath will
  be deprecated in future.

4. "show bgp ipv4/ipv6 summary json"
  - Added "pfxRcd" for CLI/JSON consistency.
    "prefixReceivedCount" will be deprecated in future.
  - Added "pfxSnt" for peers. This count is obtalned from corresponding
    update_subgroup. This needed a fix in the code where we copy fields
    for a split update_subgroup from the parent update_subgrp.
    New subgrp should inherit subgrp->scount(Count of advertized prefixes)
    of the parent subgrp.

5. "show bgp neighbor json"
  - Added "sentPrefixCounter"

6. "show bgp ipv4/ipv6 <prefix> json"
  - Added "metric" field for CLI/JSON consistency.
    "med" will be deprecated in future.

Signed-off-by: Ameya Dharkar <adharkar@vmware.org>
bgpd/bgp_route.c
bgpd/bgp_updgrp.c
bgpd/bgp_vty.c