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
Support setting BGP properties on generated routes during activation #6728
Support setting BGP properties on generated routes during activation #6728
Conversation
- fixes crash on NX-OS when setting community in bgp neighbor default-originate route-map
- Too much code relies on special semantics of `instanceof BgpRoute` to be able to safely inherit from `BgpRoute` - instead, move needed code into BgpAttributesRoute, from which both GeneratedRoute and BgpRoute now inherit
- update api for fetching/matching communities in various places - use interfaces in routing policy where applicable, don't crash for inapplicable routes
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 6 files at r1, 50 of 50 files at r3.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @arifogel)
projects/batfish-common-protocol/src/main/java/org/batfish/datamodel/routing_policy/expr/IncrementLocalPreference.java, line 43 at r3 (raw file):
@Override public long evaluate(Environment environment) { BgpRoute<?, ?> oldRoute = (BgpRoute) environment.getOriginalRoute();
What about this one and decrement?
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: complete! all files reviewed, all discussions resolved
projects/batfish-common-protocol/src/main/java/org/batfish/datamodel/routing_policy/expr/IncrementLocalPreference.java, line 43 at r3 (raw file):
Previously, dhalperi (Dan Halperin) wrote…
What about this one and decrement?
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 2 of 2 files at r4.
Reviewable status: complete! all files reviewed, all discussions resolved
Codecov Report
@@ Coverage Diff @@
## master #6728 +/- ##
============================================
- Coverage 70.04% 70.02% -0.03%
- Complexity 37690 37696 +6
============================================
Files 3097 3096 -1
Lines 159712 159821 +109
Branches 19483 19501 +18
============================================
+ Hits 111876 111916 +40
- Misses 38826 38877 +51
- Partials 9010 9028 +18 |
Fix #6691
bgp neighbor default-originate route-map