isisd: change the json output for isis routes

The json format for json routes should be compliant with caml format.

Before:

> "Prefix|Metric|Interface|Nexthop|SID|LabelOp|Algo":
> "Prefix|Metric|Interface|Nexthop|Label(s)");

After:

> "prefix|metric|interface|nextHop|segmentIdentifier|labelOperation|Algorithm":
> "prefix|metric|interface|nextHop|label(s)");

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
This commit is contained in:
Philippe Guibert 2024-06-19 16:10:48 +02:00
parent d0a142aae4
commit 611f83f324

View File

@ -3015,7 +3015,11 @@ void isis_print_routes(struct vty *vty, struct isis_spftree *spftree,
vty_out(vty, "%s\n", table);
XFREE(MTYPE_TMP, table);
} else if (json) {
*json = ttable_json(tt, prefix_sid ? "sdssdsdd" : "sdsss");
*json = ttable_json_with_json_text(
tt, prefix_sid ? "sdssdsdd" : "sdsss",
prefix_sid
? "prefix|metric|interface|nextHop|segmentIdentifier|labelOperation|Algorithm"
: "prefix|metric|interface|nextHop|label(s)");
}
ttable_del(tt);
}