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 for interfaces inside vlan definition #4999

Merged
merged 1 commit into from
Oct 16, 2019

Conversation

dhalperi
Copy link
Member

Fix #4985

  • Add support for interfaces declared inside of vlan, like set vlans LAB-3 interface ge-0/0/20.0. On an interface in ACCESS mode, this sets the (vendor-specific) access vlan name. On an interface in TRUNK mode, this adds the vlan to the trunk members.

  • Set switchport mode ACCESS when interface is added to family ethernet-switching for the first time.

  • Move setting of VI allowed vlans into the trunk handling conversion code.

  • Fix native vlan-id for trunks (1 -> drop untagged frames by default).

  • Fix reference tracking for vlan l3-interface

@batfish-bot
Copy link

This change is Reviewable

@codecov
Copy link

codecov bot commented Oct 15, 2019

Codecov Report

Merging #4999 into master will increase coverage by <.01%.
The diff coverage is 80.43%.

@@             Coverage Diff              @@
##             master    #4999      +/-   ##
============================================
+ Coverage     76.62%   76.62%   +<.01%     
- Complexity    30021    30032      +11     
============================================
  Files          2399     2399              
  Lines        115658   115688      +30     
  Branches      13662    13669       +7     
============================================
+ Hits          88618    88643      +25     
- Misses        20325    20330       +5     
  Partials       6715     6715
Impacted Files Coverage Δ Complexity Δ
.../org/batfish/representation/juniper/Interface.java 93.82% <ø> (+1.14%) 81 <0> (ø) ⬇️
.../representation/juniper/JuniperStructureUsage.java 100% <100%> (ø) 3 <0> (ø) ⬇️
.../java/org/batfish/representation/juniper/Vlan.java 100% <100%> (+10%) 8 <2> (+3) ⬆️
...fish/grammar/flatjuniper/ConfigurationBuilder.java 63.44% <100%> (+0.08%) 723 <4> (+3) ⬆️
...h/representation/juniper/JuniperConfiguration.java 88.38% <70.96%> (-0.3%) 419 <3> (+5)
.../src/main/java/org/batfish/datamodel/flow/Hop.java 53.33% <0%> (-6.67%) 5% <0%> (-1%)
...col/src/main/java/org/batfish/role/InferRoles.java 90.11% <0%> (-1.15%) 63% <0%> (-1%)
...rg/batfish/dataplane/ibdp/EigrpRoutingProcess.java 93.1% <0%> (ø) 69% <0%> (ø) ⬇️
...tfish/representation/cisco/CiscoConfiguration.java 84.11% <0%> (+0.12%) 510% <0%> (+1%) ⬆️
... and 2 more

Copy link
Member

@arifogel arifogel left a comment

Choose a reason for hiding this comment

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

Reviewed 11 of 11 files at r1.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved


projects/batfish/src/main/java/org/batfish/representation/juniper/Vlan.java, line 17 at r1 (raw file):

  private @Nonnull Set<String> _interfaces;
  private @Nullable String _l3Interface;
  private @Nullable Integer _vlanId;

Fine for now, but I believe we may have to support named vlan range in the future using same structure.

@dhalperi dhalperi merged commit ccb2d4d into batfish:master Oct 16, 2019
@dhalperi dhalperi deleted the juniper-vlan-interfaces branch October 16, 2019 16:20
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.

Juniper EX VLAN Parsing
3 participants