summaryrefslogtreecommitdiff
path: root/doc/code
diff options
context:
space:
mode:
authorChirag Shah <chirag@cumulusnetworks.com>2017-10-30 11:56:59 -0700
committerChirag Shah <chirag@cumulusnetworks.com>2017-10-30 19:31:28 -0700
commitcef262c34a4c8c3ca85ea009d45d41a85d2d7453 (patch)
tree2509540c76f420466312f4714c5582fc1f20f5ef /doc/code
parentb1c3ae8ce33dff980cc5008c939776327f9b9f11 (diff)
ospfd: fix show ospf neigh json for multile nbrs
Same neighbor learned from multiple ospf interfaces (all) were not displayed in json, only last was displayed. Created list within dictionary using neighbor-id as key. lookup neigbhor-id in json obejct prior to creating new list. spine-2# show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 0.0.1.16 1 Full/DR 36.754s 8.0.3.15 swp1:8.0.3.16 0.0.1.16 1 Full/DR 30.903s 7.0.3.15 swp2:7.0.3.16 spine-2# show ip ospf neighbor json { "0.0.1.16":[ { "priority":1, "state":"Full\/DR", "deadTimeMsecs":35114, "address":"8.0.3.15", "ifaceName":"swp1:8.0.3.16", "retransmitCounter":0, "requestCounter":0, "dbSummaryCounter":0 }, { "priority":1, "state":"Full\/DR", "deadTimeMsecs":39264, "address":"7.0.3.15", "ifaceName":"swp2:7.0.3.16", "retransmitCounter":0, "requestCounter":0, "dbSummaryCounter":0 } ] } Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
Diffstat (limited to 'doc/code')
0 files changed, 0 insertions, 0 deletions