]> git.puffer.fish Git - mirror/frr.git/commit
ospf6d: Change structure of "show ipv6 ospf6 route json" command 8506/head
authorYash Ranjan <ranjany@vmware.com>
Mon, 19 Apr 2021 06:40:51 +0000 (23:40 -0700)
committerYash Ranjan <ranjany@vmware.com>
Thu, 29 Apr 2021 04:18:04 +0000 (21:18 -0700)
commita49ef569deadf4ad6932d185b2bf131691593364
tree739801c2eb74bc1e9bd91aa9c4e5e338e02c7b94
parentef456ea52e16154007e1b575124ac2510081ba4e
ospf6d: Change structure of "show ipv6 ospf6 route json" command

The output of "show ipv6 ospf6 route json" was not in the same
format as "show ip ospf route json". Currently ipv6 and ipv4 route
tables as well as ospfv2 have prefix as the key, but the same
is not true for ospfv3.

The structure of the json objects needs to be changed.

Currently the structure present is
frr(config-ospf6)# do show ipv6 ospf6 route json
{
  "routes":[
    {
      "destination":"66:ff::\/64",
      "isBestRoute":true,
      "destinationType":"N",
      "pathType":"IA",
      "duration":"00:00:06",
      "nextHops":[
        {
          "nextHop":"::",
          "interfaceName":"ens256"
        }
      ]
    }
  ]
}
It is changed to:
frr(config-ospf6)# do show ipv6 ospf6 route json
{
  "routes":{
    "12::2\/128":{
      "isBestRoute":true,
      "destinationType":"N",
      "pathType":"IA",
      "duration":"00:01:22",
      "nextHops":[
        {
          "nextHop":"::",
          "interfaceName":"ens192"
        }
      ]
    }
}

Signed-off-by: Yash Ranjan <ranjany@vmware.com>
ospf6d/ospf6_route.c