summaryrefslogtreecommitdiff
path: root/lib/json.c
diff options
context:
space:
mode:
authorLakshman Krishnamoorthy <lkrishnamoor@vmware.com>2019-05-07 14:07:35 -0700
committerLakshman Krishnamoorthy <lkrishnamoor@vmware.com>2019-05-08 11:32:38 -0700
commit597f4b1a9a33ac52e7d2a5a48944a5520e29285a (patch)
treea8b80c77cfa8984863b8ad784d9eb58f3f191053 /lib/json.c
parentbe54c185f95815f0f664a135c2dc208c0cf1230f (diff)
bgpd: Evpn json cli output missing
Issue1: The following json cli commands are broken (they dont display anything): 1. show [ip] bgp l2vpn evpn json 2. show [ip] bgp l2vpn evpn all neighbors <IP> routes json 3. show [ip] bgp l2vpn evpn rd <RD> json 4. show [ip] bgp l2vpn evpn rd <RD> neighbors <IP> routes json RCA1: The existing json_object was partially filled. Some fields like "prefix", "prefixLen", etc were not filled in the json_object. RCA2: Code missing to display the constructed json_object. Issue2: Column header not shown on bgp evpn commands. Fix: turned on the flag to display header Output after fix: The above commands have been made to follow the existing output style of "show bgp l2vpn evpn routes json" leaf-1# sh bgp l2vpn evpn json { "bgpTableVersion":1, "bgpLocalRouterId":"10.100.0.1", "defaultLocPrf":100, "localAS":65000, "10.100.0.1:3":{ "rd":"10.100.0.1:3", "[3]:[0]:[32]:[10.100.0.1]":{ "prefix":"[3]:[0]:[32]:[10.100.0.1]", "prefixLen":288, "paths":[ { "valid":true, "bestpath":true, "pathFrom":"external", "routeType":3, "ethTag":0, "ipLen":32, "ip":"10.100.0.1", "weight":32768, "peerId":"(unspec)", "aspath":"", "path":"", "origin":"IGP", "nexthops":[ { "ip":"10.100.0.1", "afi":"ipv4", "used":true } ] } ] } }, .......... .......... "10.100.0.2:2":{ "rd":"10.100.0.2:2", "[3]:[0]:[32]:[10.100.0.2]":{ "prefix":"[3]:[0]:[32]:[10.100.0.2]", "prefixLen":288, "paths":[ { "valid":true, "bestpath":true, "pathFrom":"external", "routeType":3, "ethTag":0, "ipLen":32, "ip":"10.100.0.2", "weight":0, "peerId":"205.0.113.2", "aspath":"65002", "path":"65002", "origin":"IGP", "nexthops":[ { "ip":"10.100.0.2", "afi":"ipv4", "used":true } ] }, { "valid":true, "pathFrom":"external", "routeType":3, "ethTag":0, "ipLen":32, "ip":"10.100.0.2", "weight":0, "peerId":"203.0.113.4", "aspath":"65001 65002", "path":"65001 65002", "origin":"IGP", "nexthops":[ { "ip":"10.100.0.2", "afi":"ipv4", "used":true } ] } ] } }, .... .... "numPrefix":10, "totalPrefix":10 } leaf-1# sh bgp l2vpn evpn BGP table version is 1, local router ID is 10.100.0.1 Status codes:s suppressed, d damped, h history, * valid, > best, i - int Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path Route Distinguisher: ip 10.100.0.1:3 *> [3]:[0]:[32]:[10.100.0.1] 10.100.0.1 32768 i Route Distinguisher: ip 10.100.0.1:4 *> [3]:[0]:[32]:[10.100.0.1] 10.100.0.1 32768 i Route Distinguisher: ip 10.100.0.1:5 *> [3]:[0]:[32]:[10.100.0.1] 10.100.0.1 32768 i Route Distinguisher: ip 10.100.0.1:6 *> [3]:[0]:[32]:[10.100.0.1] 10.100.0.1 32768 i Route Distinguisher: ip 10.100.0.2:2 *> [3]:[0]:[32]:[10.100.0.2] 10.100.0.2 0 65002 i * [3]:[0]:[32]:[10.100.0.2] 10.100.0.2 0 65001 65002 Route Distinguisher: ip 10.100.0.2:3 *> [3]:[0]:[32]:[10.100.0.2] 10.100.0.2 0 65002 i * [3]:[0]:[32]:[10.100.0.2] 10.100.0.2 0 65001 65002 Route Distinguisher: ip 10.100.0.2:4 *> [3]:[0]:[32]:[10.100.0.2] 10.100.0.2 0 65002 i * [3]:[0]:[32]:[10.100.0.2] 10.100.0.2 0 65001 65002 Displayed 10 out of 10 total prefixes Signed-off-by: Lakshman Krishnamoorthy <lkrishnamoor@vmware.com>
Diffstat (limited to 'lib/json.c')
0 files changed, 0 insertions, 0 deletions