Skip to content

Junos: Add parsing support for bgp family route-target command#8892

Merged
dhalperi merged 2 commits intobatfish:masterfrom
pranavbj-amzn:routeTargetSupport
Dec 19, 2023
Merged

Junos: Add parsing support for bgp family route-target command#8892
dhalperi merged 2 commits intobatfish:masterfrom
pranavbj-amzn:routeTargetSupport

Conversation

@pranavbj-amzn
Copy link
Copy Markdown
Contributor

Juniper docs on family route-target command.

The family route-target statement is useful for filtering VPN routes before they are sent. Provider edge (PE) routers inform the route reflector (RR) which routes to send, using family route-target to provide the route-target-interest information. The RR then sends to the PE router only the advertisements containing the specified route target.

Add parsing support for the route-target command and warn. We still need to look into fully supporting this command in Batfish.

@batfish-bot
Copy link
Copy Markdown

This change is Reviewable

Copy link
Copy Markdown
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 4 of 4 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @pranavbj-amzn)


projects/batfish/src/main/java/org/batfish/grammar/flatjuniper/ConfigurationBuilder.java line 7257 at r1 (raw file):

  @Override
  public void exitBf_route_target(Bf_route_targetContext ctx) {
    warn(

just todo(ctx), please.

Copy link
Copy Markdown
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.

Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @pranavbj-amzn)


projects/batfish/src/test/resources/org/batfish/grammar/juniper/testconfigs/juniper-bgp-family-route-target line 4 at r1 (raw file):

set system host-name juniper-bgp-family-route-target
#
set protocols bgp group XYZ-BGP neighbor 1.2.3.4 family route-target

Something like GROUP or G or G1/G2/... is better. XYZ-BGP looks kinda specific, which might confuse the reader.

Code quote:

XYZ-BGP

Copy link
Copy Markdown
Contributor Author

@pranavbj-amzn pranavbj-amzn 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: 2 of 4 files reviewed, all discussions resolved (waiting on @dhalperi)


projects/batfish/src/main/java/org/batfish/grammar/flatjuniper/ConfigurationBuilder.java line 7257 at r1 (raw file):

Previously, dhalperi (Dan Halperin) wrote…

just todo(ctx), please.

done


projects/batfish/src/test/resources/org/batfish/grammar/juniper/testconfigs/juniper-bgp-family-route-target line 4 at r1 (raw file):

Previously, dhalperi (Dan Halperin) wrote…

Something like GROUP or G or G1/G2/... is better. XYZ-BGP looks kinda specific, which might confuse the reader.

done!

Copy link
Copy Markdown
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 r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @pranavbj-amzn)

@codecov
Copy link
Copy Markdown

codecov bot commented Dec 19, 2023

Codecov Report

Merging #8892 (b087217) into master (3c7b38b) will increase coverage by 0.00%.
Report is 1 commits behind head on master.
The diff coverage is 100.00%.

❗ Current head b087217 differs from pull request most recent head 54721ca. Consider uploading reports for the commit 54721ca to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #8892   +/-   ##
=======================================
  Coverage   72.50%   72.50%           
=======================================
  Files        3319     3319           
  Lines      169439   169441    +2     
  Branches    19878    19878           
=======================================
+ Hits       122854   122856    +2     
+ Misses      37437    37436    -1     
- Partials     9148     9149    +1     
Files Coverage Δ
...fish/grammar/flatjuniper/ConfigurationBuilder.java 67.67% <100.00%> (+0.01%) ⬆️

... and 5 files with indirect coverage changes

@dhalperi dhalperi enabled auto-merge (squash) December 19, 2023 19:49
@dhalperi dhalperi merged commit daadbb9 into batfish:master Dec 19, 2023
@pranavbj-amzn pranavbj-amzn deleted the routeTargetSupport branch December 19, 2023 20:11
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.

3 participants