From: Philippe Guibert Date: Mon, 19 Dec 2022 14:39:00 +0000 (+0100) Subject: isisd: show isis route .. json adds the algorithm value X-Git-Tag: base_10.1~312^2~2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=4d63d8cd62b700393b07fe1487f54e38197e9979;p=mirror%2Ffrr.git isisd: show isis route .. json adds the algorithm value 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 Signed-off-by: Louis Scalbert --- diff --git a/isisd/isis_spf.c b/isisd/isis_spf.c index 8689742a5e..773136d034 100644 --- a/isisd/isis_spf.c +++ b/isisd/isis_spf.c @@ -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");