-
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
Cisco IOS implement route-map set as-path replace #8081
Conversation
- parse and convert route-map statement `set as-path replace` - add new VI Statement for replacing elements of an as-path - for now, just support replacing with local-as Follow-on work: - On IOS, should use confed insetad of local-as if in confed and neighbor is not in the confed
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 15 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status: 7 of 15 files reviewed, 3 unresolved discussions (waiting on @arifogel and @corinaminer)
projects/batfish/src/main/java/org/batfish/representation/cisco/RouteMapSetAsPathReplaceAnyLine.java, line 30 at r2 (raw file):
public void applyTo( List<Statement> statements, CiscoConfiguration cc, Configuration c, Warnings w) { // TODO: confirm prepend occurs after replace
- loop detection
- replace
- prepend
in that order
projects/batfish/src/main/java/org/batfish/representation/cisco/RouteMapSetAsPathReplaceAnyLine.java, line 30 at r2 (raw file):
public void applyTo( List<Statement> statements, CiscoConfiguration cc, Configuration c, Warnings w) { // TODO: confirm prepend occurs after replace
Where is this implemented?
projects/batfish-common-protocol/src/main/java/org/batfish/datamodel/routing_policy/statement/ReplaceAsesInAsSequence.java, line 58 at r2 (raw file):
} private static final class AnyAs implements AsSequenceExpr {
This all needs to be public, right? Otherwise, how will searchRoutePolicies do its thing?
cc: @millstein
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: 7 of 15 files reviewed, 3 unresolved discussions (waiting on @corinaminer, @dhalperi, and @millstein)
projects/batfish/src/main/java/org/batfish/representation/cisco/RouteMapSetAsPathReplaceAnyLine.java, line 30 at r2 (raw file):
Previously, dhalperi (Dan Halperin) wrote…
- loop detection
- replace
- prepend
in that order
Loop detection should happen before incoming transformation, and is irrelevant for outgoing transformation, so that much is fine.
Updated conversion to ensure prepend is after all replaces.
projects/batfish/src/main/java/org/batfish/representation/cisco/RouteMapSetAsPathReplaceAnyLine.java, line 30 at r2 (raw file):
Previously, dhalperi (Dan Halperin) wrote…
Where is this implemented?
Where is what implemented?
projects/batfish-common-protocol/src/main/java/org/batfish/datamodel/routing_policy/statement/ReplaceAsesInAsSequence.java, line 58 at r2 (raw file):
Previously, dhalperi (Dan Halperin) wrote…
This all needs to be public, right? Otherwise, how will searchRoutePolicies do its thing?
cc: @millstein
Fixed.
Codecov Report
@@ Coverage Diff @@
## master #8081 +/- ##
============================================
- Coverage 74.42% 74.41% -0.01%
- Complexity 43091 43110 +19
============================================
Files 3359 3362 +3
Lines 168752 168869 +117
Branches 20203 20218 +15
============================================
+ Hits 125586 125659 +73
- Misses 33520 33551 +31
- Partials 9646 9659 +13
|
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 7 of 15 files at r1, 7 of 7 files at r3, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (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.
Reviewed 1 of 1 files at r4.
Reviewable status: all files reviewed (commit messages unreviewed), all discussions resolved (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.
Reviewed all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @corinaminer)
Fixes #8059
set as-path replace
Follow-on work: