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

Cisco ospf cost #897

Merged
merged 4 commits into from
Feb 6, 2018
Merged

Cisco ospf cost #897

merged 4 commits into from
Feb 6, 2018

Conversation

dhalperi
Copy link
Member

@dhalperi dhalperi commented Feb 5, 2018

For #873.

This change is Reviewable

For #873.

Also:
* modified the base OSPF data model classes to support retaining and
  using this information.
* ensured that area numbers are always longs.
@progwriter
Copy link
Contributor

:lgtm:


Reviewed 13 of 13 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

@arifogel
Copy link
Member

arifogel commented Feb 6, 2018

Looks fine functionally. Some suggestions regarding tests.


Reviewed 13 of 13 files at r1.
Review status: all files reviewed at latest revision, 2 unresolved discussions, all commit checks successful.


projects/batfish/src/test/java/org/batfish/grammar/cisco/CiscoGrammarTest.java, line 117 at r1 (raw file):

            .getSummaries()
            .get(Prefix.parse("10.0.0.0/16"));
    assertThat(summary.getAdvertise(), is(false));

Please add newline, description of what is being asserted.
Also, I generally prefer that you use feature matchers for things like this, i.e. assertThat(summary, isAdvertise(false)) or assertThat(summary, not(isAdvertise()) (see InterfaceMatchers.isActive)


projects/batfish/src/test/java/org/batfish/grammar/cisco/CiscoGrammarTest.java, line 129 at r1 (raw file):

            .getSummaries()
            .get(Prefix.parse("10.0.0.0/16"));
    assertThat(summary.getAdvertise(), is(true));

Please add newline, description of what is being asserted.
Also, I generally prefer that you use feature matchers for things like this, i.e. assertThat(summay, isAdvertise(true)) or assertThat(summary, isAdvertise()) (see InterfaceMatchers.isActive)
and assertThat(summary, hasMetric(nullValue()))


Comments from Reviewable

@sfraint
Copy link
Member

sfraint commented Feb 6, 2018

Reviewed 12 of 13 files at r1.
Review status: all files reviewed at latest revision, 2 unresolved discussions.


Comments from Reviewable

@sfraint
Copy link
Member

sfraint commented Feb 6, 2018

Review status: all files reviewed at latest revision, 3 unresolved discussions.


projects/batfish/src/test/java/org/batfish/grammar/cisco/CiscoGrammarTest.java, line 107 at r1 (raw file):

  @Test
  public void testSummaryMetricCost() throws IOException {

Just a nitpick here, but MetricCost seems redundant; maybe call it something like testOspfSummaryRouteMetric or just testOspfSummaryRoute instead?


Comments from Reviewable

@dhalperi
Copy link
Member Author

dhalperi commented Feb 6, 2018

Review status: 12 of 16 files reviewed at latest revision, 3 unresolved discussions.


projects/batfish/src/test/java/org/batfish/grammar/cisco/CiscoGrammarTest.java, line 107 at r1 (raw file):

Previously, sfraint (Spencer Fraint) wrote…

Just a nitpick here, but MetricCost seems redundant; maybe call it something like testOspfSummaryRouteMetric or just testOspfSummaryRoute instead?

Done.


projects/batfish/src/test/java/org/batfish/grammar/cisco/CiscoGrammarTest.java, line 117 at r1 (raw file):

Previously, arifogel (Ari Fogel) wrote…

Please add newline, description of what is being asserted.
Also, I generally prefer that you use feature matchers for things like this, i.e. assertThat(summary, isAdvertise(false)) or assertThat(summary, not(isAdvertise()) (see InterfaceMatchers.isActive)

Done.


projects/batfish/src/test/java/org/batfish/grammar/cisco/CiscoGrammarTest.java, line 129 at r1 (raw file):

Previously, arifogel (Ari Fogel) wrote…

Please add newline, description of what is being asserted.
Also, I generally prefer that you use feature matchers for things like this, i.e. assertThat(summay, isAdvertise(true)) or assertThat(summary, isAdvertise()) (see InterfaceMatchers.isActive)
and assertThat(summary, hasMetric(nullValue()))

Done.


Comments from Reviewable

@dhalperi dhalperi mentioned this pull request Feb 6, 2018
@arifogel
Copy link
Member

arifogel commented Feb 6, 2018

:lgtm:


Reviewed 4 of 4 files at r2.
Review status: all files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

@dhalperi dhalperi merged commit 90636c2 into master Feb 6, 2018
@dhalperi dhalperi deleted the cisco-ospf-cost branch February 6, 2018 05:56
rabeckett pushed a commit that referenced this pull request Feb 8, 2018
* Cisco support for OSPF summary route cost override

For #873.

Also:
* modified the base OSPF data model classes to support retaining and
  using this information.
* ensured that area numbers are always longs.

* add matchers

* add cisco

* fixup
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