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

EOS: parse peer-address heartbeat VRF #8426

Merged
merged 4 commits into from
Jul 14, 2022
Merged

EOS: parse peer-address heartbeat VRF #8426

merged 4 commits into from
Jul 14, 2022

Conversation

ratulm
Copy link
Member

@ratulm ratulm commented Jul 14, 2022

Extract and ignore the optional VRF specification. The non-optional IP address part was already being ignored.

@ratulm ratulm requested a review from dhalperi July 14, 2022 04:03
@batfish-bot
Copy link

This change is Reviewable

@ratulm ratulm requested a review from arifogel July 14, 2022 04:03
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.

Reviewed 5 of 5 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @arifogel and @ratulm)


projects/batfish/src/main/antlr4/org/batfish/grammar/arista/Arista_mlag.g4 line 28 at r1 (raw file):

:
   PEER_ADDRESS HEARTBEAT ip = IP_ADDRESS (VRF vrf_name)? NEWLINE
;

No two rules can start with the same prefix -- it's not LL1.

Have eos_mlag_peer_address call 2 subrules based on first token.

Code quote:

   PEER_ADDRESS ip = IP_ADDRESS NEWLINE
;

eos_mlag_peer_address_heartbeat
:
   PEER_ADDRESS HEARTBEAT ip = IP_ADDRESS (VRF vrf_name)? NEWLINE
;

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.

Reviewed 1 of 2 files at r2, all commit messages.
Reviewable status: 4 of 5 files reviewed, 1 unresolved discussion (waiting on @arifogel, @dhalperi, and @ratulm)


projects/batfish/src/main/antlr4/org/batfish/grammar/arista/Arista_mlag.g4 line 27 at r2 (raw file):

     | eos_mpa_heartbeat
   )
   NEWLINE

Rules should be tail-recursive unless there's a great reason not to. Aka, newlines are normally in child rules.

Is there a reason to deviate here?

Code quote:

NEWLINE

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.

Reviewed 1 of 2 files at r2.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @arifogel and @ratulm)

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.

Reviewed 2 of 2 files at r3, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @arifogel)

@codecov
Copy link

codecov bot commented Jul 14, 2022

Codecov Report

Merging #8426 (0ea93ab) into master (b0ea739) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##             master    #8426      +/-   ##
============================================
- Coverage     75.19%   75.18%   -0.01%     
  Complexity    43944    43944              
============================================
  Files          3403     3403              
  Lines        168790   168795       +5     
  Branches      20037    20038       +1     
============================================
- Hits         126914   126905       -9     
- Misses        32314    32327      +13     
- Partials       9562     9563       +1     
Impacted Files Coverage Δ
...sh/grammar/arista/AristaControlPlaneExtractor.java 47.68% <100.00%> (+0.02%) ⬆️
...tfish/representation/arista/MlagConfiguration.java 80.64% <100.00%> (+2.07%) ⬆️
...src/main/java/org/batfish/coordinator/PoolMgr.java 55.95% <0.00%> (-3.58%) ⬇️
...ain/java/org/batfish/storage/FileBasedStorage.java 86.00% <0.00%> (-0.84%) ⬇️
...ain/java/org/batfish/coordinator/WorkQueueMgr.java 70.93% <0.00%> (-0.59%) ⬇️
...src/main/java/org/batfish/coordinator/WorkMgr.java 76.02% <0.00%> (-0.37%) ⬇️
...fish/bddreachability/BDDLoopDetectionAnalysis.java 86.76% <0.00%> (+2.94%) ⬆️

@ratulm ratulm merged commit 33e440a into master Jul 14, 2022
@ratulm ratulm deleted the eos-mlag-heartbeat-vrf branch July 14, 2022 06:19
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