From: Philippe Guibert Date: Wed, 19 Jun 2024 14:10:48 +0000 (+0200) Subject: isisd: change the json output for isis routes X-Git-Tag: base_10.2~316^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=611f83f324a4e2a9cb0611fd74de8b32a8d22dd6;p=matthieu%2Ffrr.git 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 --- diff --git a/isisd/isis_spf.c b/isisd/isis_spf.c index d6ce76960b..7aa9147e71 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); }