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"
}
]
}
}