mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-15 05:18:47 +00:00
ldpd: Convert vty_out to vty_json for JSON
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
This commit is contained in:
parent
382dcab318
commit
038c0a8fcf
@ -1844,9 +1844,7 @@ ldp_vty_dispatch(struct vty *vty, struct imsgbuf *ibuf, enum show_command cmd,
|
|||||||
done:
|
done:
|
||||||
close(ibuf->fd);
|
close(ibuf->fd);
|
||||||
if (json) {
|
if (json) {
|
||||||
vty_out (vty, "%s\n",
|
vty_json(vty, json);
|
||||||
json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY));
|
|
||||||
json_object_free(json);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return (ret);
|
return (ret);
|
||||||
@ -2006,9 +2004,7 @@ ldp_vty_show_capabilities(struct vty *vty, const char *json)
|
|||||||
"0x0603");
|
"0x0603");
|
||||||
json_object_array_add(json_array, json_cap);
|
json_object_array_add(json_array, json_cap);
|
||||||
|
|
||||||
vty_out (vty, "%s\n",
|
vty_json(vty, json);
|
||||||
json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY));
|
|
||||||
json_object_free(json);
|
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user