Skip to content

Commit

Permalink
isisd: show isis route .. json adds the algorithm value
Browse files Browse the repository at this point in the history
When walking over all the flex-algorithm routes, it is
difficult to know which route is associated to which
algorithm: add "algorithm" attribute to the json object.

Output example:

> ubuntu2004(config-router)# do show isis route algorithm  json
> [
>   {
>     "area":"1",
>     "algorithm":128,
>     "level-1":{
>      ]
>    },
>    "level-2":{
>      "area":"1"
>    },
>    "vrf_id":0
>  },
>  {
>    "area":"1",
>    "algorithm":129,
>    "level-1":{
>      "area":"1",

Signed-off-by: Philippe Guibert <[email protected]>
Signed-off-by: Louis Scalbert <[email protected]>
  • Loading branch information
pguibert6WIND authored and louis-6wind committed Feb 19, 2024
1 parent 88e368b commit 4d63d8c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions isisd/isis_spf.c
Original file line number Diff line number Diff line change
Expand Up @@ -2912,6 +2912,7 @@ static void show_isis_route_common(struct vty *vty, int levels,
jstr = json_object_new_string(
area->area_tag ? area->area_tag : "null");
json_object_object_add(*json, "area", jstr);
json_object_int_add(*json, "algorithm", algo);
} else {
vty_out(vty, "Area %s:",
area->area_tag ? area->area_tag : "null");
Expand Down

0 comments on commit 4d63d8c

Please sign in to comment.