ldpd: json support for show commands#13
ldpd: json support for show commands#13dwalton76 wants to merge 1 commit intoFRRouting:masterfrom dwalton76:ldp-json
Conversation
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
|
|
|
|
|
@rwestphal can you take a look at this one |
|
A few additional issues: 1 - There's no "json" option for the L2VPN commands (which are only two by now). 2 - This is the output of "show mpls ldp neighbor json" on my dual-stack ldpd test network: We are not showing the address-family of the adjacencies. I guess we could change this: To this (*): * I introduced one targeted adjacency in the output to show how it would fit in there. 3 - In the same command above, I think we can remove this line from the json output:
ldpd supports only this mode of operation (which is not really a limitation), so it's a moot piece of information. 4 - The "show mpls ldp interface json" command is not showing all interface/address-family combinations: 5 - ldpd segfaults on "show mpls ldp discovery json" if we have any targeted neighbor to display: |
|
For
RIght now with that file checked in it is very easy to overlook the fact that it should not be edited. I just tried |
|
For |
|
Yes, I thought about creating a make target for the auto-generated files. But the problem with that is that it would add another dependency to build FRR, which can be a problem on some platforms. So, since ldp_vty.xml is barely changed, I think doing that is not worth the hassle. Regarding the "{}" notation, indeed. xml2cli.pl was written a few years ago and I need to extended it to make use of this new feature. But having a new command just to add the "json" option should not be a "show stopper", it's only dumb and inefficient. I should have a patch for this in a few hours. |
|
For |
|
For |
|
For |
|
Ack |
|
@rwestphal can you send me your dual-stack config with target neighbors? |
|
Sure, will send by email now. |
|
Wow this interface is tough for having multiple conversations...I think if you start a review you can click on "+" to leave a comment and then we can reply to each other. That may be a little easier for both of us :) Agreed xml2cli.pl isn't a show stopper but if it is something you think you can knock out really quick I'll hold off and wait for it. If not I'm fine with it putting in the extra DEFUNs. Having xml2cli.pl run as part of the build and removing ldp_vty_cmds.c from the repo seems like a must though. We already depend on PERL for building (extract.pl) so it wouldn't be adding a new dependancy. |
|
@dwalton76 I've just sent to the list a patch to extend xml2cli.pl as you requested. Now, for each command, you need to modify the XML file as follows: Then the new output of the script should be exactly what you want: |
|
@dwalton76 and @rwestphal What can I do to help drive this to completion? |
|
sorry, will pick this back up either this week or next and address all of the points that Renato raised |
|
I'd say that 95% of the work is already done. @dwalton76, if you don't mind I can update your patch to address the points I mentioned earlier, it's only a few things that need to be changed. |
|
@rwestphal that is fine with me. Thanks! |
Signed-off-by: Daniel Walton dwalton@cumulusnetworks.com