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

Juniper: support ospf area interface metric #1035

Merged
merged 2 commits into from
Mar 7, 2018
Merged

Conversation

dhalperi
Copy link
Member

@dhalperi dhalperi commented Mar 7, 2018

  • Fix inheritance (inverted condition on whether inheritance had been performed)
  • Add parsing for metric configuration for an ospf area interface
  • Add inheritance of ospf cost and ospf area
  • Rename parameter in setOspfCost
  • and test with new matchers and everthing.

@dhalperi dhalperi requested a review from arifogel March 7, 2018 09:22
@batfish-bot
Copy link

This change is Reviewable

@dhalperi
Copy link
Member Author

dhalperi commented Mar 7, 2018

Re inheritance break, the bug was introduced in 47e2823#diff-17db06163ef18e1161020de26c98df75L233 and Batfish 0.33.0

@arifogel
Copy link
Member

arifogel commented Mar 7, 2018

:lgtm: with minor suggestions


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


projects/batfish-common-protocol/src/test/java/org/batfish/datamodel/matchers/InterfaceMatchersImpl.java, line 39 at r1 (raw file):

  static final class HasOspfCost extends FeatureMatcher<Interface, Integer> {
    HasOspfCost(@Nonnull Matcher<? super Integer> subMatcher) {
      super(subMatcher, "an interface with ospfCost", "ospfCost");

"an interface with ospfCost" -> "an interface with ospfCost:" is the new style I am trying to apply to all matchers (note the colon on the right).


projects/batfish/src/test/java/org/batfish/grammar/flatjuniper/FlatJuniperGrammarTest.java, line 178 at r1 (raw file):

    // Interface override
    assertThat(config.getInterfaces().get("fe-1/0/1.0"), hasOspfCost(equalTo(17)));

Personally I would do: assertThat(config, hasInterface("fe-1/0/1.0", hasOspfCost(equalTo(17))));, but I'll leave it to your preference.


Comments from Reviewable

@dhalperi
Copy link
Member Author

dhalperi commented Mar 7, 2018

Review status: 5 of 7 files reviewed at latest revision, 1 unresolved discussion.


projects/batfish-common-protocol/src/test/java/org/batfish/datamodel/matchers/InterfaceMatchersImpl.java, line 39 at r1 (raw file):

Previously, arifogel (Ari Fogel) wrote…

"an interface with ospfCost" -> "an interface with ospfCost:" is the new style I am trying to apply to all matchers (note the colon on the right).

Done.


projects/batfish/src/test/java/org/batfish/grammar/flatjuniper/FlatJuniperGrammarTest.java, line 178 at r1 (raw file):

Previously, arifogel (Ari Fogel) wrote…

Personally I would do: assertThat(config, hasInterface("fe-1/0/1.0", hasOspfCost(equalTo(17))));, but I'll leave it to your preference.

Done.


Comments from Reviewable

@dhalperi
Copy link
Member Author

dhalperi commented Mar 7, 2018

Reviewed 2 of 2 files at r2.
Review status: all files reviewed at latest revision, 1 unresolved discussion.


Comments from Reviewable

@dhalperi dhalperi merged commit 40d2c31 into master Mar 7, 2018
@dhalperi dhalperi deleted the juniper-inprogress branch March 7, 2018 20:40
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

3 participants