-
Notifications
You must be signed in to change notification settings - Fork 229
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
FRR: implement route-map match ip address prefix-len #6617
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.
Reviewable status: 0 of 9 files reviewed, all discussions resolved (waiting on @arifogel and @ratulm)
projects/batfish/src/main/antlr4/org/batfish/grammar/cumulus_frr/CumulusFrr_common.g4, line 35 at r2 (raw file):
ip_prefix_length
FYI moved here from FRR_prefix_list.g4, renamed to be less context-specific, and expanded to include 0. I checked.
projects/batfish/src/main/java/org/batfish/grammar/cumulus_frr/CumulusFrrConfigurationBuilder.java, line 382 at r2 (raw file):
Quoted 18 lines of code…
/** * Convert a {@link ParserRuleContext} whose text is guaranteed to represent a valid signed 32-bit * decimal integer to an {@link Integer} if it is contained in the provided {@code space}, or else * {@link Optional#empty}. */ private @Nonnull Optional<Integer> toIntegerInSpace( ParserRuleContext messageCtx, ParserRuleContext ctx, IntegerSpace space, String name) { int num = Integer.parseInt(ctx.getText()); if (!space.contains(num)) { _w.addWarning( messageCtx, getFullText(messageCtx), _parser, String.format("Expected %s in range %s, but got '%d'", name, space, num)); return Optional.empty(); } return Optional.of(num); }
FYI: brought all this over from NX-OS.
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 9 of 9 files at r1, 1 of 2 files at r2.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @dhalperi and @ratulm)
projects/batfish/src/main/java/org/batfish/representation/cumulus/RouteMapEntry.java, line 55 at r1 (raw file):
/** Return stream of match statements for this entry. */ public @Nonnull Stream<RouteMapMatch> getMatches() {
Don't you need to modify this function?
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: 8 of 10 files reviewed, all discussions resolved (waiting on @arifogel and @ratulm)
projects/batfish/src/main/java/org/batfish/representation/cumulus/RouteMapEntry.java, line 55 at r1 (raw file):
Previously, arifogel (Ari Fogel) wrote…
Don't you need to modify this function?
Good catch!
I added it to the existing tests in the same way.
Codecov Report
@@ Coverage Diff @@
## master #6617 +/- ##
============================================
- Coverage 73.42% 73.41% -0.01%
- Complexity 35854 35855 +1
============================================
Files 2844 2845 +1
Lines 144689 144714 +25
Branches 17514 17515 +1
============================================
+ Hits 106237 106245 +8
- Misses 30023 30032 +9
- Partials 8429 8437 +8 |
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 r3.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @ratulm)
No description provided.