-
Notifications
You must be signed in to change notification settings - Fork 666
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
[show][bgp] Use only 'show ip bgp' as the base and use bgp_frr_v4 file for FRR routing stack #884
Conversation
… file for FRR routing stack.
This pull request introduces 2 alerts and fixes 1 when merging df8a53f into a87173b - view on LGTM.com new alerts:
fixed alerts:
|
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 to me. Please wait Joe's review
FYI, I rephrased the PR title. |
@tsvanduyn: FYI, we have added a new "LGTM" PR checker, which checks for code issues. In the future, I suggest you fix the issues it finds. However, we are currently expecting these "Module-level cyclic import" issues that it flagged with the way we are currently importing separate files (e.g., bgp_frr_v4.py, bgp_quagga_v4.py, etc.) into our show/config main.py files. We need to investigate a way to restructure the code to allow for importing other files without these warnings, as I would like to split these large main.py files into separate files. |
…e for FRR routing stack (#884) Co-authored-by: Travis Van Duyn <trvanduy@microsoft.com>
…e for FRR routing stack (sonic-net#884) Co-authored-by: Travis Van Duyn <trvanduy@microsoft.com>
[Vxlan] : adding show vnet/vxlan cmds (sonic-net#880) [show][bgp] Use only 'show ip bgp' as the base and use bgp_frr_v4 file for FRR routing stack (sonic-net#884) [fast reboot] set a fast-reboot DB flag (sonic-net#887) [show] Add 'ip/ipv6 bgp network' commands (sonic-net#888)
… file for FRR routing stack.
- What I did
I created new file bgp_frr_v4.py for the FRR routing-stack and changed the code to use this file instead of the pass through to vtysh for "show bgp". This now requires the use of "show ip bgp" like the bgp_quagga_v4.py file and which is standardized on most networking vendors.
- How I did it
I added the file bgp_frr_v4.py in the same directory as the bgp_quagga_v4.py file and updated the main.py for the show commands to use this file. This is the same as how we do bgp_quagga_v4.py today.
- How to verify it
If you are on a platform running FRR and you issue the "show bgp ?" command then it would be piped through to the FRR vtysh shell and show the help output for that command like this:
So you can see this device has the "docker-fpm-frr" container.
Before changes:
Once you make the change you would see this:
As you can see the "show bgp ?" is no longer piped through to the FRR vtysh shell.
This behavior now mimics the behavior that we see on the bgp_quagga_v4.py routing-stack and forcing all help commands to go through the SONIC CLI. This would standardize the behavior of the two stacks and give the SONIC CLI more control.
Also the bgp_frr_v4.py file commands work as expected.
- Previous command output (if the output of a command-line utility has changed)
SNIP
- New command output (if the output of a command-line utility has changed)