From: Renato Westphal Date: Tue, 10 Jan 2017 20:27:03 +0000 (-0200) Subject: ldpd: reorganize json support and fix a few issues X-Git-Tag: frr-3.0-branchpoint~80^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=refs%2Fpull%2F73%2Fhead;p=mirror%2Ffrr.git ldpd: reorganize json support and fix a few issues * reorganize code to improve maintainability; * add json output for the l2vpn show commands as well; * in "show mpls ldp discovery json", nest the adjacencies inside the respective interfaces. Also, fix a segfault when trying to show a targeted adjacency; * in "show mpls ldp neighbor", show the address-family of the adjacencies of each neighbor. Also, remove "downstreamUnsolicited":true from the output; * in "show mpls ldp interface json", show all interface/address-family combinations; Signed-off-by: Renato Westphal --- diff --git a/ldpd/ldp_vty.h b/ldpd/ldp_vty.h index 78b83dc5a9..735554badf 100644 --- a/ldpd/ldp_vty.h +++ b/ldpd/ldp_vty.h @@ -65,10 +65,10 @@ int ldp_vty_l2vpn_pw_nbr_addr(struct vty *, struct vty_arg *[]); int ldp_vty_l2vpn_pw_nbr_id(struct vty *, struct vty_arg *[]); int ldp_vty_l2vpn_pw_pwid(struct vty *, struct vty_arg *[]); int ldp_vty_l2vpn_pw_pwstatus(struct vty *, struct vty_arg *[]); -int ldp_vty_show_binding(struct vty *, struct vty_arg *[], u_char); -int ldp_vty_show_discovery(struct vty *, struct vty_arg *[], u_char); -int ldp_vty_show_interface(struct vty *, struct vty_arg *[], u_char); -int ldp_vty_show_neighbor(struct vty *, struct vty_arg *[], u_char); +int ldp_vty_show_binding(struct vty *, struct vty_arg *[]); +int ldp_vty_show_discovery(struct vty *, struct vty_arg *[]); +int ldp_vty_show_interface(struct vty *, struct vty_arg *[]); +int ldp_vty_show_neighbor(struct vty *, struct vty_arg *[]); int ldp_vty_show_atom_binding(struct vty *, struct vty_arg *[]); int ldp_vty_show_atom_vc(struct vty *, struct vty_arg *[]); int ldp_vty_clear_nbr(struct vty *, struct vty_arg *[]); diff --git a/ldpd/ldp_vty.xml b/ldpd/ldp_vty.xml index ee5c6e4df2..88e6b718ab 100644 --- a/ldpd/ldp_vty.xml +++ b/ldpd/ldp_vty.xml @@ -272,15 +272,23 @@ - + +