New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lib, vtysh: fix 'show ip[v6] access-list ... json' formatting #15973
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you also provide a topotest (in additional PR is also good) that verifies JSON integrity/validity for prefix-list, access-list, route-map (per-daemon).
Ok, I will prepare a topotest (in a separate PR, since I'm not sure when I'll have time for that) -> should be something simple like one frr instance, setting arbitrary ip prefix-list, ip access-list and route-map rules in configuration and later passing the whole output through a json validator / linter, right? |
Yes |
ci:rerun CI stuck |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good
@Mergifyio rebase |
✅ Branch has been successfully rebased |
@piotrsuchy could you fix also the failing test?
|
Similarly to recently fixed 'show ip[v6] prefix-list ...' - PR#15750, json output is not valid for 'show ip[v6] access-list ... json' commands, as it goes through all the running daemons and for each one it calls 'filter_show' creating a new json object. To aggreagate the output and create a valid json that can later be parsed, the commands were moved to vtysh and formatted accordingly Signed-off-by: Piotr Suchy <[email protected]>
0b83085
to
70e5005
Compare
most recent failure looks like
not certain why this is related, trying to rerun just that test |
Similarly to recently fixed 'show ip[v6] prefix-list ...' - PR#15750, json output is not valid for 'show ip[v6] access-list ... json' commands, as it goes through all the running daemons and for each one it calls 'filter_show' creating a new json object. To aggreagate the output and create a valid json that can later be parsed, the commands were moved to vtysh and formatted accordingly
Before and after for json objects the same as here: PR#15750