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

PAN: app-override parsing and extraction #6626

Merged
merged 10 commits into from
Feb 16, 2021
Merged

PAN: app-override parsing and extraction #6626

merged 10 commits into from
Feb 16, 2021

Conversation

sfraint
Copy link
Member

@sfraint sfraint commented Feb 13, 2021

Add parsing and extraction for Palo Alto application-override rules.

Conversion will be done separately, in another PR.

@batfish-bot
Copy link

This change is Reviewable

@codecov
Copy link

codecov bot commented Feb 13, 2021

Codecov Report

Merging #6626 (5602a19) into master (4298b0f) will increase coverage by 0.00%.
The diff coverage is 97.89%.

@@             Coverage Diff             @@
##             master    #6626     +/-   ##
===========================================
  Coverage     73.42%   73.42%             
- Complexity    35888    36415    +527     
===========================================
  Files          2847     2916     +69     
  Lines        144818   146801   +1983     
  Branches      17523    17692    +169     
===========================================
+ Hits         106328   107787   +1459     
- Misses        30058    30521    +463     
- Partials       8432     8493     +61     
Impacted Files Coverage Δ Complexity Δ
...rammar/palo_alto/PaloAltoConfigurationBuilder.java 89.01% <97.56%> (+0.49%) 501.00 <27.00> (+27.00)
...epresentation/palo_alto/PaloAltoConfiguration.java 89.08% <100.00%> (+0.03%) 399.00 <0.00> (ø)
...epresentation/palo_alto/PaloAltoStructureType.java 100.00% <100.00%> (ø) 3.00 <0.00> (ø)
...presentation/palo_alto/PaloAltoStructureUsage.java 100.00% <100.00%> (ø) 3.00 <0.00> (ø)
.../java/org/batfish/representation/cumulus/Bond.java 0.00% <0.00%> (-100.00%) 0.00% <0.00%> (-10.00%)
.../java/org/batfish/representation/cumulus/Vlan.java 0.00% <0.00%> (-100.00%) 0.00% <0.00%> (-10.00%)
...h/representation/cumulus/CumulusInterfaceType.java 0.00% <0.00%> (-100.00%) 0.00% <0.00%> (-1.00%)
.../org/batfish/representation/cumulus/Interface.java 4.25% <0.00%> (-91.49%) 1.00% <0.00%> (-26.00%)
...a/org/batfish/representation/cumulus/Loopback.java 0.00% <0.00%> (-73.69%) 0.00% <0.00%> (-9.00%)
...ava/org/batfish/representation/cumulus/Bridge.java 57.89% <0.00%> (-42.11%) 3.00% <0.00%> (-5.00%)
... and 102 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 10 of 10 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @dhalperi and @sfraint)


projects/batfish/src/main/java/org/batfish/grammar/palo_alto/PaloAltoConfigurationBuilder.java, line 2467 at r1 (raw file):

  public void exitSrao_application(Srao_applicationContext ctx) {
    String application = getText(ctx.application);
    _currentApplicationOverrideRule.setApplication(application);

we won't need the unique application name to be sure we're applying the rule to the right application? Same thought with endpoint and zone names.


projects/batfish/src/test/java/org/batfish/grammar/palo_alto/PaloAltoGrammarTest.java, line 3905 at r1 (raw file):

  @Test
  public void testApplicationOverrideRuleExtraction() throws IOException {
    String hostname = "application-override-rule-reference";

Looks like you're using this test config for more than just reference checking. Could rename (but i don't feel strongly about it)

Copy link
Member Author

@sfraint sfraint 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: 8 of 10 files reviewed, 1 unresolved discussion (waiting on @corinaminer and @dhalperi)


projects/batfish/src/main/java/org/batfish/grammar/palo_alto/PaloAltoConfigurationBuilder.java, line 2467 at r1 (raw file):

Previously, corinaminer (Corina Miner) wrote…

we won't need the unique application name to be sure we're applying the rule to the right application? Same thought with endpoint and zone names.

Discussed offline, but: unique name isn't needed here as we know the zone/endpoint/app is in the same vsys as the rule


projects/batfish/src/test/java/org/batfish/grammar/palo_alto/PaloAltoGrammarTest.java, line 3905 at r1 (raw file):

Previously, corinaminer (Corina Miner) wrote…

Looks like you're using this test config for more than just reference checking. Could rename (but i don't feel strongly about it)

renamed

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.

:lgtm:

Reviewed 2 of 2 files at r2.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @dhalperi)

@sfraint sfraint merged commit 12547a5 into master Feb 16, 2021
@sfraint sfraint deleted the pan-app-override branch February 16, 2021 19:05
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