-
Notifications
You must be signed in to change notification settings - Fork 228
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: Parse AS path access lists #4895
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4895 +/- ##
============================================
- Coverage 76.64% 76.32% -0.33%
+ Complexity 29595 29269 -326
============================================
Files 2319 2321 +2
Lines 114944 113187 -1757
Branches 14301 13488 -813
============================================
- Hits 88102 86385 -1717
- Misses 20117 20219 +102
+ Partials 6725 6583 -142
|
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 4 files at r1, 9 of 9 files at r2.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @corinaminer)
projects/batfish/src/main/java/org/batfish/representation/cumulus/CumulusNcluConfiguration.java, line 1618 at r2 (raw file):
List<AsPathAccessListLine> lines = asPathAccessList.getLines().stream() .map(l -> new AsPathAccessListLine(l.getAction(), String.valueOf(l.getAsNum())))
VI AsPathAccessListLine
takes a regex. I sense we're not getting conversion to regex right here.
projects/batfish/src/test/java/org/batfish/grammar/cumulus_frr/CumulusFrrGrammarTest.java, line 747 at r2 (raw file):
assertThat(definedStructureInfo.getDefinitionLines(), contains(1, 2)); }
add parsing test for match/set routemap clauses (you can expand to extraction later).
projects/batfish/src/test/java/org/batfish/representation/cumulus/CumulusNcluConfigurationTest.java, line 150 at r2 (raw file):
new AsPathAccessListLine(LineAction.PERMIT, "12345"), new AsPathAccessListLine(LineAction.DENY, "54321")); assertThat(viList, equalTo(new AsPathAccessList("name", expectedViLines)));
add semantic test
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: 5 of 11 files reviewed, all discussions resolved (waiting on @progwriter)
projects/batfish/src/main/java/org/batfish/representation/cumulus/CumulusNcluConfiguration.java, line 1618 at r2 (raw file):
Previously, progwriter (Victor Heorhiadi) wrote…
VI
AsPathAccessListLine
takes a regex. I sense we're not getting conversion to regex right here.
nope. added a todo
projects/batfish/src/test/java/org/batfish/grammar/cumulus_frr/CumulusFrrGrammarTest.java, line 747 at r2 (raw file):
Previously, progwriter (Victor Heorhiadi) wrote…
add parsing test for match/set routemap clauses (you can expand to extraction later).
Done
projects/batfish/src/test/java/org/batfish/representation/cumulus/CumulusNcluConfigurationTest.java, line 150 at r2 (raw file):
Previously, progwriter (Victor Heorhiadi) wrote…
add semantic test
done-ish? I know it's going to be incorrect for anything remotely complex because of how we match AS paths. open to recommendations
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: all files reviewed, 1 unresolved discussion (waiting on @corinaminer)
projects/batfish/src/main/antlr4/org/batfish/grammar/cumulus_frr/CumulusFrr_common.g4, line 39 at r3 (raw file):
: ( asns += uint32
nit: plz indent
projects/batfish/src/main/antlr4/org/batfish/grammar/cumulus_frr/CumulusFrrLexer.g4, line 74 at r3 (raw file):
pushMode(M_Word); } }
😞
projects/batfish/src/test/java/org/batfish/representation/cumulus/CumulusNcluConfigurationTest.java, line 150 at r2 (raw file):
Previously, corinaminer (Corina Miner) wrote…
done-ish? I know it's going to be incorrect for anything remotely complex because of how we match AS paths. open to recommendations
be sad. file issue. add comment referencing issue. send PR that fixes it later.
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 r4.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @corinaminer)
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 11 files reviewed, all discussions resolved (waiting on @progwriter)
projects/batfish/src/main/antlr4/org/batfish/grammar/cumulus_frr/CumulusFrr_common.g4, line 39 at r3 (raw file):
Previously, progwriter (Victor Heorhiadi) wrote…
nit: plz indent
done
projects/batfish/src/main/antlr4/org/batfish/grammar/cumulus_frr/CumulusFrrLexer.g4, line 74 at r3 (raw file):
Previously, progwriter (Victor Heorhiadi) wrote…
😞
yeah, if you have a better idea lmk
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 3 of 3 files at r5.
Reviewable status: complete! all files reviewed, all discussions resolved
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 r6.
Reviewable status: complete! all files reviewed, all discussions resolved
Still to do: route-map clauses referencing AS path access lists.