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: convert ospf area range #6665
Conversation
Codecov Report
@@ Coverage Diff @@
## master #6665 +/- ##
=========================================
Coverage 73.52% 73.53%
- Complexity 36634 36672 +38
=========================================
Files 2933 2934 +1
Lines 147422 147520 +98
Branches 17771 17782 +11
=========================================
+ Hits 108389 108474 +85
- Misses 30503 30507 +4
- Partials 8530 8539 +9 |
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 r1.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @arifogel and @dhalperi)
projects/batfish/src/main/java/org/batfish/representation/cumulus/CumulusConversions.java, line 1494 at r1 (raw file):
} // Anything not summarized is permitted. lines.add(new RouteFilterLine(LineAction.PERMIT, PrefixRange.ALL));
nit: won't this make lines
have size vsArea.getRanges().size() + 1
? Not sure how strict ImmutableList.builderWithExpectedSize
is
projects/batfish/src/main/java/org/batfish/representation/cumulus/OspfVrf.java, line 32 at r1 (raw file):
public @Nonnull Map<Long, OspfArea> getAreas() { return Collections.unmodifiableMap(_areas);
how is this different from/preferable to ImmutableMap.copyOf()
? Either may be fine, i've just never seen this one
projects/batfish/src/test/java/org/batfish/grammar/cumulus_frr/CumulusFrrGrammarTest.java, line 1918 at r1 (raw file):
assertThat(area.getSummaries(), hasKeys(Prefix.parse("1.255.0.0/17"))); OspfAreaSummary summary = Iterables.getOnlyElement(area.getSummaries().values()); assertThat(summary.getAdvertised(), equalTo(true));
i assume this means you confirmed FRR should always advertise summary routes (when contributing routes are present)?
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 6 files reviewed, 2 unresolved discussions (waiting on @arifogel and @corinaminer)
projects/batfish/src/main/java/org/batfish/representation/cumulus/CumulusConversions.java, line 1494 at r1 (raw file):
Previously, corinaminer (Corina Miner) wrote…
nit: won't this make
lines
have sizevsArea.getRanges().size() + 1
? Not sure how strictImmutableList.builderWithExpectedSize
is
It's not strict (you don't have to be right about the expectation, it will do the usual behavior of reallocating bigger), but allocating the correct size will be more efficient space-wise. Good catch!
projects/batfish/src/main/java/org/batfish/representation/cumulus/OspfVrf.java, line 32 at r1 (raw file):
Previously, corinaminer (Corina Miner) wrote…
how is this different from/preferable to
ImmutableMap.copyOf()
? Either may be fine, i've just never seen this one
This one is a wrapper. It doesn't iterate on or copy the underlying structure, it does reflect updates.
I tend to use this in conversion code since the copy won't be used for anything.
projects/batfish/src/test/java/org/batfish/grammar/cumulus_frr/CumulusFrrGrammarTest.java, line 1918 at r1 (raw file):
Previously, corinaminer (Corina Miner) wrote…
i assume this means you confirmed FRR should always advertise summary routes (when contributing routes are present)?
Yes.
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 r2.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @arifogel)
No description provided.