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
Arista: port NX-OS route-map logic #6465
Conversation
Codecov Report
@@ Coverage Diff @@
## master #6465 +/- ##
============================================
- Coverage 73.28% 73.28% -0.01%
- Complexity 35451 35452 +1
============================================
Files 2821 2821
Lines 143320 143306 -14
Branches 17306 17299 -7
============================================
- Hits 105036 105023 -13
- Misses 29957 29959 +2
+ Partials 8327 8324 -3
|
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.
Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion (waiting on @arifogel)
projects/batfish/src/main/java/org/batfish/representation/arista/AristaConfiguration.java, line 1903 at r1 (raw file):
// Continue: on match, change the default. if (action == LineAction.PERMIT) { trueStatements.add(Statements.SetLocalDefaultActionAccept.toStaticStatement());
codecov reveals we need new unit tests of continue statements
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 2 of 2 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion
Prior to this PR, Arista modeled route-maps as nested structures, so that if there were N terms, those terms would go into a recursive structure that was N terms deep. For large N (hundreds+) this can cause recursion limits in Java, e.g., in walking the route-map or in serializing it to disk. Fix this by adopting (neearly verbatim) the logic from NX-OS. Validated by existing unit tests + Batfish Enterprise compare view: routes are the same before and after in many real networks.
f522a52
to
eee8c83
Compare
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 1 of 1 files at r2.
Reviewable status: complete! all files reviewed, all discussions resolved
And add another missing test.
And add another missing test.
Prior to this PR, Arista modeled route-maps as nested structures, so that if
there were N terms, those terms would go into a recursive structure that was N
terms deep. For large N (hundreds+) this can cause recursion limits in Java,
e.g., in walking the route-map or in serializing it to disk.
Fix this by adopting (nearly verbatim) the logic from NX-OS.
Validated by existing unit tests + Batfish Enterprise compare view: routes are
the same before and after in many real networks.