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

Cisco IOS: convert VRF leaking config to VI model #6556

Merged
merged 3 commits into from Jan 11, 2021

Conversation

progwriter
Copy link
Contributor

Convert the VS model to VI VRF leaking config. Resolve import/export route targets to setup VI VrfLeakingConfig
This required creating a new policy purely for redistribution.

After #6554

@batfish-bot
Copy link

This change is Reviewable

@codecov
Copy link

codecov bot commented Jan 11, 2021

Codecov Report

Merging #6556 (e17723e) into master (614c3bf) will increase coverage by 0.01%.
The diff coverage is 94.23%.

@@             Coverage Diff              @@
##             master    #6556      +/-   ##
============================================
+ Coverage     73.36%   73.38%   +0.01%     
- Complexity    35666    35697      +31     
============================================
  Files          2837     2837              
  Lines        143981   144131     +150     
  Branches      17410    17425      +15     
============================================
+ Hits         105632   105768     +136     
- Misses        29970    29973       +3     
- Partials       8379     8390      +11     
Impacted Files Coverage Δ Complexity Δ
...batfish/representation/cisco/CiscoConversions.java 88.16% <90.00%> (-0.04%) 188.00 <9.00> (+9.00) ⬇️
...tfish/representation/cisco/CiscoConfiguration.java 86.51% <100.00%> (+0.13%) 502.00 <0.00> (+1.00)
...batfish/representation/aws/LoadBalancerTarget.java 54.16% <0.00%> (-4.17%) 8.00% <0.00%> (-1.00%)
.../org/batfish/dataplane/rib/RouteAdvertisement.java 83.67% <0.00%> (-4.09%) 18.00% <0.00%> (-1.00%)
...rc/main/java/org/batfish/datamodel/BgpProcess.java 88.67% <0.00%> (-1.33%) 36.00% <0.00%> (+2.00%) ⬇️
...src/main/java/org/batfish/coordinator/PoolMgr.java 59.52% <0.00%> (-1.20%) 15.00% <0.00%> (-1.00%)
...java/org/batfish/dataplane/ibdp/VirtualRouter.java 90.58% <0.00%> (-0.83%) 206.00% <0.00%> (+2.00%) ⬇️
...ain/java/org/batfish/storage/FileBasedStorage.java 86.19% <0.00%> (-0.41%) 249.00% <0.00%> (ø%)
...a/org/batfish/representation/aws/LoadBalancer.java 82.18% <0.00%> (-0.32%) 70.00% <0.00%> (-1.00%)
...src/main/java/org/batfish/coordinator/WorkMgr.java 75.81% <0.00%> (-0.16%) 247.00% <0.00%> (-1.00%)
... and 9 more

Copy link
Contributor

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

Reviewed 8 of 8 files at r1.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @progwriter)


projects/batfish/src/main/java/org/batfish/representation/cisco/CiscoConfiguration.java, line 2989 at r1 (raw file):

        continue;
      }
      ip4uaf.inherit(vrf.getGenericAddressFamilyConfig());

was this inheritance just not happening before?


projects/batfish/src/test/java/org/batfish/grammar/cisco/CiscoGrammarTest.java, line 7223 at r1 (raw file):

    // Denied by import map
    assertThat(
        dstVrfRoutes, not(contains(isBgpv4RouteThat(hasPrefix(Prefix.parse("1.1.1.1/32"))))));

this assertion is redundant with the previous; it's already guaranteed that the 2.2.2.0/24 route is the only one. i'd just put a comment noting that 1.1.1.1/32 is absent because of the import map.

Copy link
Contributor Author

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


projects/batfish/src/main/java/org/batfish/representation/cisco/CiscoConfiguration.java, line 2989 at r1 (raw file):

Previously, corinaminer (Corina Miner) wrote…

was this inheritance just not happening before?

correct, this is the first code that makes any use of this portion of the VS model.


projects/batfish/src/test/java/org/batfish/grammar/cisco/CiscoGrammarTest.java, line 7223 at r1 (raw file):

Previously, corinaminer (Corina Miner) wrote…

this assertion is redundant with the previous; it's already guaranteed that the 2.2.2.0/24 route is the only one. i'd just put a comment noting that 1.1.1.1/32 is absent because of the import map.

done

Copy link
Contributor Author

@progwriter progwriter 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 1 files at r2.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@progwriter progwriter merged commit bf762d1 into batfish:master Jan 11, 2021
@progwriter progwriter deleted the cisco-configure-vrf-leaking branch January 11, 2021 22:29
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