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

Arista: support deleting BGP peer groups #8257

Merged
merged 1 commit into from
Apr 23, 2022

Conversation

dhalperi
Copy link
Member

@dhalperi dhalperi commented Apr 22, 2022

commit-id:b75db8a1

@batfish-bot
Copy link

This change is Reviewable

@codecov
Copy link

codecov bot commented Apr 22, 2022

Codecov Report

Merging #8257 (8070602) into master (f71a9f5) will decrease coverage by 0.01%.
The diff coverage is 83.33%.

@@             Coverage Diff              @@
##             master    #8257      +/-   ##
============================================
- Coverage     74.58%   74.56%   -0.02%     
+ Complexity    43734    43727       -7     
============================================
  Files          3405     3405              
  Lines        169398   169402       +4     
  Branches      20229    20230       +1     
============================================
- Hits         126341   126319      -22     
- Misses        33490    33507      +17     
- Partials       9567     9576       +9     
Impacted Files Coverage Δ
...sh/grammar/arista/AristaControlPlaneExtractor.java 47.25% <80.00%> (+0.03%) ⬆️
...sh/representation/arista/eos/AristaBgpProcess.java 89.47% <100.00%> (+0.58%) ⬆️
...src/main/java/org/batfish/coordinator/PoolMgr.java 54.76% <0.00%> (-5.96%) ⬇️
...fish/bddreachability/BDDLoopDetectionAnalysis.java 83.82% <0.00%> (-2.95%) ⬇️
...col/src/main/java/org/batfish/role/InferRoles.java 91.36% <0.00%> (-1.37%) ⬇️
...main/java/org/batfish/datamodel/acl/AclTracer.java 63.69% <0.00%> (-1.28%) ⬇️
...ain/java/org/batfish/storage/FileBasedStorage.java 85.47% <0.00%> (-0.86%) ⬇️
...rg/batfish/dataplane/ibdp/EigrpRoutingProcess.java 88.73% <0.00%> (-0.71%) ⬇️
...ain/java/org/batfish/coordinator/WorkQueueMgr.java 70.93% <0.00%> (-0.59%) ⬇️
...src/main/java/org/batfish/coordinator/WorkMgr.java 75.66% <0.00%> (-0.32%) ⬇️
... and 1 more

Copy link
Member

@ratulm ratulm left a comment

Choose a reason for hiding this comment

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

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


projects/batfish/src/main/java/org/batfish/grammar/arista/AristaControlPlaneExtractor.java, line 3169 at r1 (raw file):

    if (_currentAristaBgpNeighbor instanceof AristaBgpHasPeerGroup) {
      // clearing the peer group for a concrete neighbor.
      ((AristaBgpHasPeerGroup) _currentAristaBgpNeighbor).setPeerGroup(null);

Is this variation being tested someplace?


projects/batfish/src/main/java/org/batfish/grammar/arista/AristaControlPlaneExtractor.java, line 3173 at r1 (raw file):

      assert _currentAristaBgpNeighbor instanceof AristaBgpPeerGroupNeighbor;
      _currentAristaBgpProcess.deletePeerGroup(
          ((AristaBgpPeerGroupNeighbor) _currentAristaBgpNeighbor).getName());

No warning to the user?

Copy link
Member Author

@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.

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @arifogel)


projects/batfish/src/main/java/org/batfish/grammar/arista/AristaControlPlaneExtractor.java, line 3169 at r1 (raw file):

Previously, ratulm wrote…

Is this variation being tested someplace?

Already was implemented and tested.

@dhalperi dhalperi merged commit 1ce37e4 into master Apr 23, 2022
@dhalperi dhalperi deleted the pr/dhalperi/arista-no-bgp/b75db8a1 branch April 23, 2022 22:47
@dhalperi
Copy link
Member Author

projects/batfish/src/main/java/org/batfish/grammar/arista/AristaControlPlaneExtractor.java, line 3173 at r1 (raw file):

Previously, ratulm wrote…

No warning to the user?

This is tricky. Turns out that Arista does not warn here - does not require the PG to be defined first.

For example:
In a fresh bgp process, you can do this

no neighbor foo-bar enforce-first-as

after which you get

router bgp 1
   neighbor foo-bar peer-group
   no neighbor foo-bar enforce-first-as
   neighbor foo-bar maximum-routes 12000 

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