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
Add support for "force" with next-hop-self in Cumulus configs. #5800
Add support for "force" with next-hop-self in Cumulus configs. #5800
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5800 +/- ##
============================================
+ Coverage 71.35% 71.92% +0.56%
- Complexity 33676 33847 +171
============================================
Files 2788 2789 +1
Lines 139668 139489 -179
Branches 16801 16770 -31
============================================
+ Hits 99664 100329 +665
+ Misses 32132 31272 -860
- Partials 7872 7888 +16 |
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.
Reviewed 4 of 6 files at r1, 2 of 2 files at r2.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @raveranj)
projects/batfish/src/main/antlr4/org/batfish/grammar/cumulus_frr/CumulusFrr_bgp.g4, line 306 at r2 (raw file):
sbafin_next_hop_self : NEXT_HOP_SELF (FORCE)?
Let's handle both force
and all
since they are the exact same command apparently
projects/batfish/src/main/java/org/batfish/grammar/cumulus_frr/CumulusFrrConfigurationBuilder.java, line 695 at r2 (raw file):
_currentBgpNeighborIpv4UnicastAddressFamily.setNextHopSelf(true); if (ctx.FORCE() != null) { _currentBgpNeighborIpv4UnicastAddressFamily.setForceNextHopSelf(true);
IIUC, all
is new (and preferred syntax) while force
is legacy syntax?
If that's indeed the case, let's have the setters/getters use All
as the suffix to match new documentation. Then here can leave comments linking to
http://docs.frrouting.org/en/latest/bgp.html#clicmd-[no]neighborPEERnext-hop-self[all]
and
FRRouting/frr#4200
indicating that they are indeed the same command.
projects/batfish/src/main/java/org/batfish/representation/cumulus/CumulusConversions.java, line 778 at r2 (raw file):
} boolean isIBgp = neighbor.getRemoteAs().equals(bgpVrf.getAutonomousSystem());
Leave a TODO comment indicating this won't work for dynamic neighbors.
projects/batfish/src/main/antlr4/org/batfish/grammar/cumulus_frr/CumulusFrr_bgp.g4, line 306 at r2 (raw file): Previously, progwriter (Victor Heorhiadi) wrote…
Done. |
projects/batfish/src/main/java/org/batfish/grammar/cumulus_frr/CumulusFrrConfigurationBuilder.java, line 695 at r2 (raw file): Previously, progwriter (Victor Heorhiadi) wrote…
Thats right. Added comments with the links. |
projects/batfish/src/main/java/org/batfish/representation/cumulus/CumulusConversions.java, line 778 at r2 (raw file): Previously, progwriter (Victor Heorhiadi) wrote…
Done. |
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.
Reviewed 6 of 6 files at r3.
Reviewable status: complete! all files reviewed, all discussions resolved
No description provided.