Skip to content
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

Adding next-hop interface support to static routes for FRR #5698

Merged
merged 4 commits into from
Apr 23, 2020

Conversation

kylehoferamzn
Copy link
Contributor

@kylehoferamzn kylehoferamzn commented Apr 17, 2020

Previous pull request: #5691

This adds support for syntax such as:

ip route x.x.x.x/x Null0
ip route x.x.x.x/x eth0
ip route x.x.x.x/x blackhole
ip route x.x.x.x/x Eth0

Does NOT support ip route x.x.x.x/x y.y.y.y/y Null0 although that is valid syntax, the parser will continue to error out on that as it did previously.

@batfish-bot
Copy link

This change is Reviewable

@progwriter progwriter self-requested a review April 18, 2020 21:31
Copy link
Contributor

@progwriter progwriter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 10 of 10 files at r1.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @kylehoferamzn)


.gitignore, line 47 at r1 (raw file):

# Ignore Tokens
*.tokens

nit: can you send that as a separate PR, as not to conflate changes?


projects/batfish/src/main/java/org/batfish/representation/cumulus/StaticRoute.java, line 79 at r1 (raw file):

   * supported by the Batfish VI model - "null_interface"
   */
  public String CanonicalizeInterfaceName(String nextHopInterface) {
  1. why public?
  2. I think we have checks that require methods to start w/ lower case letter.

Copy link
Member

@dhalperi dhalperi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @kylehoferamzn and @progwriter)


.gitignore, line 47 at r1 (raw file):

Previously, progwriter (Victor Heorhiadi) wrote…

nit: can you send that as a separate PR, as not to conflate changes?

NACK - this is not checked in on purpose, since users need to know that those files existing will mess everything up.

@dhalperi
Copy link
Member


.gitignore, line 47 at r1 (raw file):

Previously, dhalperi (Dan Halperin) wrote…

NACK - this is not checked in on purpose, since users need to know that those files existing will mess everything up.

not ignored on purpose, that is.

@kylehoferamzn
Copy link
Contributor Author

"NACK - this is not checked in on purpose, since users need to know that those files existing will mess everything up."

Fair play - I'll remove.

Re: CanonicalizeInterfaceName

Good eye, I worked for years on a Java project where it was this way.

Public vs Private - I wasn't sure if this method would get re-used in the future, it seemed somewhat useful. I'll switch it to private and if someone wants to use it in the future they can open it up/refactor.

Copy link
Contributor

@progwriter progwriter left a 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 r2.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@codecov
Copy link

codecov bot commented Apr 23, 2020

Codecov Report

Merging #5698 into master will increase coverage by 0.11%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##             master    #5698      +/-   ##
============================================
+ Coverage     71.26%   71.37%   +0.11%     
- Complexity    33497    33637     +140     
============================================
  Files          2785     2786       +1     
  Lines        139421   139541     +120     
  Branches      16810    16781      -29     
============================================
+ Hits          99357    99603     +246     
+ Misses        32196    32073     -123     
+ Partials       7868     7865       -3     
Impacted Files Coverage Δ Complexity Δ
...ar/cumulus_frr/CumulusFrrConfigurationBuilder.java 74.34% <100.00%> (-0.13%) 141.00 <9.00> (+2.00) ⬇️
.../org/batfish/representation/cumulus/Interface.java 95.74% <100.00%> (+0.18%) 27.00 <1.00> (+1.00)
...rg/batfish/representation/cumulus/StaticRoute.java 86.48% <100.00%> (+1.63%) 15.00 <2.00> (+2.00)
...entation/arista/eos/AristaBgpDefaultOriginate.java 88.88% <0.00%> (-11.12%) 5.00% <0.00%> (+2.00%) ⬇️
...atfish/representation/arista/eos/AristaBgpVrf.java 90.19% <0.00%> (-3.72%) 89.00% <0.00%> (+20.00%) ⬇️
...h/representation/arista/eos/AristaBgpNeighbor.java 90.29% <0.00%> (-3.26%) 50.00% <0.00%> (+2.00%) ⬇️
...g/batfish/datamodel/answers/AutoCompleteUtils.java 85.54% <0.00%> (-0.79%) 92.00% <0.00%> (ø%)
...ish/representation/arista/AristaConfiguration.java 52.47% <0.00%> (-0.30%) 149.00% <0.00%> (+2.00%) ⬇️
...tfish/representation/arista/AristaConversions.java 75.19% <0.00%> (-0.14%) 76.00% <0.00%> (ø%)
... and 17 more

Copy link
Contributor

@progwriter progwriter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 5 of 5 files at r3.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@progwriter progwriter merged commit df5858e into batfish:master Apr 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants