Skip to content

Commit

Permalink
PAN: use new built-in apps (#8189)
Browse files Browse the repository at this point in the history
  • Loading branch information
sfraint committed Mar 28, 2022
1 parent 09b0d2c commit 3dca4a8
Show file tree
Hide file tree
Showing 17 changed files with 416 additions and 532 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import static org.batfish.representation.palo_alto.PaloAltoConfiguration.PANORAMA_VSYS_NAME;
import static org.batfish.representation.palo_alto.PaloAltoConfiguration.SHARED_VSYS_NAME;
import static org.batfish.representation.palo_alto.PaloAltoConfiguration.computeObjectName;
import static org.batfish.representation.palo_alto.PaloAltoConfiguration.isBuiltInApp;
import static org.batfish.representation.palo_alto.PaloAltoStructureType.ADDRESS_GROUP;
import static org.batfish.representation.palo_alto.PaloAltoStructureType.ADDRESS_LIKE;
import static org.batfish.representation.palo_alto.PaloAltoStructureType.ADDRESS_LIKE_OR_NONE;
Expand Down Expand Up @@ -388,7 +389,6 @@
import org.batfish.representation.palo_alto.AddressObject;
import org.batfish.representation.palo_alto.AddressPrefix;
import org.batfish.representation.palo_alto.Application;
import org.batfish.representation.palo_alto.ApplicationBuiltIn;
import org.batfish.representation.palo_alto.ApplicationGroup;
import org.batfish.representation.palo_alto.ApplicationOverrideRule;
import org.batfish.representation.palo_alto.ApplicationOverrideRule.Protocol;
Expand Down Expand Up @@ -2893,8 +2893,7 @@ public void exitSrs_rule_type(Srs_rule_typeContext ctx) {
private void referenceApplicationOrGroupLike(
String name, String uniqueName, PaloAltoStructureUsage usage, ParserRuleContext var) {
PaloAltoStructureType type =
name.equals(CATCHALL_APPLICATION_NAME)
|| ApplicationBuiltIn.getBuiltInApplication(name).isPresent()
name.equals(CATCHALL_APPLICATION_NAME) || isBuiltInApp(name)
/*
* Since the name matches a builtin, we'll add a reference if the user defined
* over the builtin, but it's okay if they did not.
Expand All @@ -2908,8 +2907,7 @@ private void referenceApplicationOrGroupLike(
private void referenceApplicationLike(
String name, String uniqueName, PaloAltoStructureUsage usage, ParserRuleContext var) {
PaloAltoStructureType type =
name.equals(CATCHALL_APPLICATION_NAME)
|| ApplicationBuiltIn.getBuiltInApplication(name).isPresent()
name.equals(CATCHALL_APPLICATION_NAME) || isBuiltInApp(name)
/*
* Since the name matches a builtin, we'll add a reference if the user defined
* over the builtin, but it's okay if they did not.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.google.common.collect.ImmutableSet;
import java.io.Serializable;
import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
import javax.annotation.Nonnull;
Expand Down Expand Up @@ -35,6 +36,11 @@ private Builder(@Nonnull String name) {
_services.add(service);
return this;
}

public @Nonnull Builder addServices(@Nonnull Collection<Service> services) {
_services.addAll(services);
return this;
}
}

private @Nullable String _description;
Expand Down

0 comments on commit 3dca4a8

Please sign in to comment.