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

cumulus frr ospf #4821

Merged
merged 9 commits into from
Sep 26, 2019
Merged

cumulus frr ospf #4821

merged 9 commits into from
Sep 26, 2019

Conversation

yifeiyuan
Copy link
Contributor

parse, conversion to vs, conversion to vi for the following commands:

router ospf
  log-adjacency-changes detail

@batfish-bot
Copy link

This change is Reviewable

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 9 of 9 files at r1.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @anothermattbrown and @yifeiyuan)


projects/batfish/src/main/antlr4/org/batfish/grammar/cumulus_frr/CumulusFrr_ospf.g4, line 17 at r1 (raw file):

;

ro_null

Why not just properly name the rule? Let's avoid null rules unless we absolutely have to.


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

              if (vrf == null) {
                return;

warn


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

              org.batfish.datamodel.ospf.OspfProcess ospfProcess = toOspfProcess(ospfVrf);
              if (ospfProcess != null) {

warn


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

  org.batfish.datamodel.ospf.OspfProcess toOspfProcess(OspfVrf ospfVrf) {
    Ip routerId = ospfVrf.getRouterId();
    if (routerId == null) {

factor out into a method and test.
Leave pointers to docs about how this works.

Copy link
Contributor

@anothermattbrown anothermattbrown left a comment

Choose a reason for hiding this comment

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

Reviewed 8 of 9 files at r1.
Reviewable status: all files reviewed, 5 unresolved discussions (waiting on @progwriter and @yifeiyuan)

a discussion (no related file):
imo this should be 2 prs (or at least 2 separate commits): one for parsing/extraction, one for conversion. not a blocker, but a request for the future



projects/batfish/src/main/antlr4/org/batfish/grammar/cumulus_frr/CumulusFrr_ospf.g4, line 17 at r1 (raw file):

Previously, progwriter (Victor Heorhiadi) wrote…

Why not just properly name the rule? Let's avoid null rules unless we absolutely have to.

it's not clear what you want -- what is your concrete suggestion?


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

  @VisibleForTesting
  @Nullable
  org.batfish.datamodel.ospf.OspfProcess toOspfProcess(OspfVrf ospfVrf) {

Why is this class the right place for this method? It seems more natural to me to put it in OspfVrf, and pass in relevant data from the config

Copy link
Contributor

@anothermattbrown anothermattbrown left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 9 files at r1.
Reviewable status: all files reviewed, 5 unresolved discussions (waiting on @progwriter and @yifeiyuan)

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.

Reviewable status: all files reviewed, 5 unresolved discussions (waiting on @anothermattbrown and @yifeiyuan)


projects/batfish/src/main/antlr4/org/batfish/grammar/cumulus_frr/CumulusFrr_ospf.g4, line 17 at r1 (raw file):

Previously, anothermattbrown (Matt Brown) wrote…

it's not clear what you want -- what is your concrete suggestion?

I want a fleshed out rule following LL1 grammar. here:

s_router_ospf
:
  ROUTER OSPF NEWLINE
  (
    ro_log_adjacency_changes
  )*
;

ro_log_adjacency_changes
:
   LOG_ADJACENCY_CHANGES DETAIL? NEWLINE
;

http://docs.frrouting.org/en/latest/ospfd.html#clicmd-log-adjacency-changes[detail]

Copy link
Contributor

@anothermattbrown anothermattbrown 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, 5 unresolved discussions (waiting on @progwriter and @yifeiyuan)


projects/batfish/src/main/antlr4/org/batfish/grammar/cumulus_frr/CumulusFrr_ospf.g4, line 17 at r1 (raw file):

Previously, progwriter (Victor Heorhiadi) wrote…

I want a fleshed out rule following LL1 grammar. here:

s_router_ospf
:
  ROUTER OSPF NEWLINE
  (
    ro_log_adjacency_changes
  )*
;

ro_log_adjacency_changes
:
   LOG_ADJACENCY_CHANGES DETAIL? NEWLINE
;

http://docs.frrouting.org/en/latest/ospfd.html#clicmd-log-adjacency-changes[detail]

cool

Copy link
Contributor Author

@yifeiyuan yifeiyuan 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, 5 unresolved discussions (waiting on @progwriter and @yifeiyuan)

a discussion (no related file):

blocker
This is interesting.. I did have multiple commits. not sure why there is only one commit now.


Copy link
Contributor Author

@yifeiyuan yifeiyuan 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, 3 unresolved discussions (waiting on @anothermattbrown, @progwriter, and @yifeiyuan)


projects/batfish/src/main/antlr4/org/batfish/grammar/cumulus_frr/CumulusFrr_ospf.g4, line 17 at r1 (raw file):

Previously, anothermattbrown (Matt Brown) wrote…

cool

done


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

Previously, progwriter (Victor Heorhiadi) wrote…

warn

done


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

Previously, progwriter (Victor Heorhiadi) wrote…

warn

ospfProcess should not be null. so removed the test


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

natural to me to put it in OspfVrf, and pass in relevant data from the config
move this function to ospfVrf and then call ospfVrf.toOspfProcess(..)?

Copy link
Contributor Author

@yifeiyuan yifeiyuan 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 @anothermattbrown and @progwriter)


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

Previously, progwriter (Victor Heorhiadi) wrote…

factor out into a method and test.
Leave pointers to docs about how this works.

done

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 3 of 3 files at r2.
Reviewable status: 8 of 9 files reviewed, 1 unresolved discussion (waiting on @anothermattbrown and @progwriter)

@codecov
Copy link

codecov bot commented Sep 25, 2019

Codecov Report

Merging #4821 into master will decrease coverage by <.01%.
The diff coverage is 57.14%.

@@             Coverage Diff              @@
##             master    #4821      +/-   ##
============================================
- Coverage      75.5%   75.49%   -0.01%     
- Complexity    28724    28743      +19     
============================================
  Files          2292     2294       +2     
  Lines        112836   112886      +50     
  Branches      13541    13544       +3     
============================================
+ Hits          85196    85228      +32     
- Misses        21131    21145      +14     
- Partials       6509     6513       +4
Impacted Files Coverage Δ Complexity Δ
...presentation/cumulus/CumulusNcluConfiguration.java 93.11% <48.48%> (-1.89%) 210 <7> (+7)
...ar/cumulus_frr/CumulusFrrConfigurationBuilder.java 79.01% <66.66%> (-0.12%) 74 <1> (+1)
...rg/batfish/representation/cumulus/OspfProcess.java 66.66% <66.66%> (ø) 1 <1> (?)
...va/org/batfish/representation/cumulus/OspfVrf.java 85.71% <85.71%> (ø) 3 <3> (?)
...org/batfish/grammar/BatfishLexerErrorListener.java 34.04% <0%> (-1.38%) 3% <0%> (ø)
...src/main/java/org/batfish/coordinator/PoolMgr.java 64.04% <0%> (-1.13%) 15% <0%> (-1%)
...rg/batfish/dataplane/ibdp/EigrpRoutingProcess.java 93.12% <0%> (-0.39%) 69% <0%> (-1%)
...rg/batfish/grammar/BatfishParserErrorListener.java 92.2% <0%> (-0.1%) 15% <0%> (ø)
... and 6 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 3 of 3 files at r3.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@yifeiyuan yifeiyuan merged commit 643009b into master Sep 26, 2019
@yifeiyuan yifeiyuan deleted the yifei-cumulus-frr-ospf branch September 26, 2019 00:00
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