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

NX-OS: Trunk interfaces' allowed VLANs must be active #7936

Merged
merged 1 commit into from Jan 14, 2022
Merged

Conversation

corinaminer
Copy link
Contributor

Previously, if no allowed VLANs were specified for an interface in trunk mode, we allowed the full valid range (1-4094). Actually it should default to all active declared VLANs.

Similarly, if allowed VLANs are specified, any that are not active declared VLANs should be ignored.

@batfish-bot
Copy link

This change is Reviewable

Copy link
Contributor Author

@corinaminer corinaminer 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: 0 of 5 files reviewed, all discussions resolved (waiting on @dhalperi)


projects/batfish/src/main/java/org/batfish/grammar/cisco_nxos/CiscoNxosControlPlaneExtractor.java, line 5933 at r1 (raw file):

          if (iface.getSwitchportMode() == null) {
            // NX-OS has these commands in show run all even for interfaces in other modes.
            iface.setSwitchportMode(SwitchportMode.TRUNK);

fyi: It does let you configure allowed VLANs on non-trunk interfaces, but this does not automatically put the interface in trunk mode (show vlan shows that such interfaces are not associated with their specified VLANs).

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: :shipit: complete! all files reviewed, all discussions resolved (waiting on @corinaminer)

@codecov
Copy link

codecov bot commented Jan 14, 2022

Codecov Report

Merging #7936 (8eff7c8) into master (5855fac) will decrease coverage by 0.01%.
The diff coverage is 83.33%.

@@             Coverage Diff              @@
##             master    #7936      +/-   ##
============================================
- Coverage     74.22%   74.21%   -0.02%     
+ Complexity    42691    42681      -10     
============================================
  Files          3335     3335              
  Lines        167646   167650       +4     
  Branches      20078    20078              
============================================
- Hits         124443   124428      -15     
- Misses        33609    33619      +10     
- Partials       9594     9603       +9     
Impacted Files Coverage Δ
...g/batfish/representation/cisco_nxos/Interface.java 95.20% <ø> (ø)
...mar/cisco_nxos/CiscoNxosControlPlaneExtractor.java 78.29% <66.66%> (-0.02%) ⬇️
...resentation/cisco_nxos/CiscoNxosConfiguration.java 88.19% <100.00%> (+0.01%) ⬆️
...src/main/java/org/batfish/coordinator/PoolMgr.java 54.76% <0.00%> (-4.77%) ⬇️
...fish/bddreachability/BDDLoopDetectionAnalysis.java 80.23% <0.00%> (-2.33%) ⬇️
...model/routing_policy/communities/CommunitySet.java 93.84% <0.00%> (-1.54%) ⬇️
...col/src/main/java/org/batfish/role/InferRoles.java 91.36% <0.00%> (-1.37%) ⬇️
...ain/java/org/batfish/datamodel/EvpnType3Route.java 70.70% <0.00%> (-1.02%) ⬇️
...ain/java/org/batfish/coordinator/WorkQueueMgr.java 70.93% <0.00%> (-0.59%) ⬇️
...src/main/java/org/batfish/coordinator/WorkMgr.java 75.53% <0.00%> (-0.31%) ⬇️
... and 4 more

@corinaminer corinaminer merged commit 97ea303 into master Jan 14, 2022
@corinaminer corinaminer deleted the nxos-vlans branch January 14, 2022 21:45
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