summaryrefslogtreecommitdiff
path: root/tests/lib/test_grpc.cpp
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2023-03-17 22:48:59 -0300
committerRenato Westphal <renato@opensourcerouting.org>2023-03-17 23:00:31 -0300
commitf54232d0b2f5a54d4ec53ce2efff4877c15cc8d1 (patch)
tree6ab751f7f20c12d9894148c43ba980ba2d5200e6 /tests/lib/test_grpc.cpp
parenta08f41b95b7af2a5803d1cd18c80e361fa24c66d (diff)
ospfd: Fix inconsistency in LSDB JSON output
As it can be seen below, the LSDB JSON output varies depending whether a filter option is specified or not (e.g. "adv-router", "self-originate"): > show ip ospf database router json { "routerId":"3.3.3.3", "routerLinkStates":{ "areas":{ "0.0.0.0":[ { "lsaAge":175, "options":"*|-|-|-|-|-|E|-", [snip] > show ip ospf database router adv-router 2.2.2.2 json { "routerId":"3.3.3.3", "Router Link States":{ "0.0.0.0":{ "2.2.2.2":{ "lsaAge":193, "options":"*|-|-|-|-|-|E|-", [snip] This inconsistency is undesirable since it makes this data harder to consume programmatically. Also, in the second output, "Router Link States" is used as a JSON key, which doesn't conform to our JSON guidelines (JSON keys need to be camelCased). Make the required changes to ensure the first output structure is used, regardless if any output filter is used or not. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'tests/lib/test_grpc.cpp')
0 files changed, 0 insertions, 0 deletions