From 611f83f324a4e2a9cb0611fd74de8b32a8d22dd6 Mon Sep 17 00:00:00 2001 From: Philippe Guibert Date: Wed, 19 Jun 2024 16:10:48 +0200 Subject: [PATCH] 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 --- isisd/isis_spf.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/isisd/isis_spf.c b/isisd/isis_spf.c index d6ce76960be6..7aa9147e71c0 100644 --- a/isisd/isis_spf.c +++ b/isisd/isis_spf.c @@ -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); }