@Test public void testDeniedByAcl_permit() { IpAccessList acl = IpAccessList.builder().setName("acl").setLines(ImmutableList.of(ACCEPT_ALL)).build(); assertFalse( Evaluator.matches( new DeniedByAcl(acl.getName()), FLOW, null, ImmutableMap.of(acl.getName(), acl), ImmutableMap.of())); }
public static boolean matches( AclLineMatchExpr item, Flow flow, String srcInterface, Map<String, IpAccessList> availableAcls, Map<String, IpSpace> namedIpSpaces) { return item.accept(new Evaluator(flow, srcInterface, availableAcls, namedIpSpaces)); }
Evaluator implements GenericAclLineMatchExprVisitor<Boolean> { public static boolean matches( AclLineMatchExpr item, Flow flow, String srcInterface, Map<String, IpAccessList> availableAcls, Map<String, IpSpace> namedIpSpaces) { return item.accept(new Evaluator(flow, srcInterface, availableAcls, namedIpSpaces)); } }
Evaluator implements GenericAclLineMatchExprVisitor<Boolean> { public static boolean matches( AclLineMatchExpr item, Flow flow, String srcInterface, Map<String, IpAccessList> availableAcls, Map<String, IpSpace> namedIpSpaces) { return item.accept(new Evaluator(flow, srcInterface, availableAcls, namedIpSpaces)); } Evaluator(
      Flow flow,
      String srcInterface,
      Map<String, IpAccessList> availableAcls,
      Map<String, IpSpace> namedIpSpaces); }
Evaluator implements GenericAclLineMatchExprVisitor<Boolean> { public static boolean matches( AclLineMatchExpr item, Flow flow, String srcInterface, Map<String, IpAccessList> availableAcls, Map<String, IpSpace> namedIpSpaces) { return item.accept(new Evaluator(flow, srcInterface, availableAcls, namedIpSpaces)); } Evaluator(
      Flow flow,
      String srcInterface,
      Map<String, IpAccessList> availableAcls,
      Map<String, IpSpace> namedIpSpaces); static boolean matches(
      AclLineMatchExpr item,
      Flow flow,
      String srcInterface,
      Map<String, IpAccessList> availableAcls,
      Map<String, IpSpace> namedIpSpaces); @Override Boolean visitAndMatchExpr(AndMatchExpr andMatchExpr); @Override Boolean visitDeniedByAcl(DeniedByAcl deniedByAcl); @Override Boolean visitFalseExpr(FalseExpr falseExpr); @Override Boolean visitMatchHeaderSpace(MatchHeaderSpace matchHeaderSpace); @Override Boolean visitMatchSrcInterface(MatchSrcInterface matchSrcInterface); @Override Boolean visitNotMatchExpr(NotMatchExpr notMatchExpr); @Override Boolean visitOriginatingFromDevice(OriginatingFromDevice originatingFromDevice); @Override Boolean visitOrMatchExpr(OrMatchExpr orMatchExpr); @Override Boolean visitPermittedByAcl(PermittedByAcl permittedByAcl); @Override Boolean visitTrueExpr(TrueExpr trueExpr); }
Evaluator implements GenericAclLineMatchExprVisitor<Boolean> { public static boolean matches( AclLineMatchExpr item, Flow flow, String srcInterface, Map<String, IpAccessList> availableAcls, Map<String, IpSpace> namedIpSpaces) { return item.accept(new Evaluator(flow, srcInterface, availableAcls, namedIpSpaces)); } Evaluator(
      Flow flow,
      String srcInterface,
      Map<String, IpAccessList> availableAcls,
      Map<String, IpSpace> namedIpSpaces); static boolean matches(
      AclLineMatchExpr item,
      Flow flow,
      String srcInterface,
      Map<String, IpAccessList> availableAcls,
      Map<String, IpSpace> namedIpSpaces); @Override Boolean visitAndMatchExpr(AndMatchExpr andMatchExpr); @Override Boolean visitDeniedByAcl(DeniedByAcl deniedByAcl); @Override Boolean visitFalseExpr(FalseExpr falseExpr); @Override Boolean visitMatchHeaderSpace(MatchHeaderSpace matchHeaderSpace); @Override Boolean visitMatchSrcInterface(MatchSrcInterface matchSrcInterface); @Override Boolean visitNotMatchExpr(NotMatchExpr notMatchExpr); @Override Boolean visitOriginatingFromDevice(OriginatingFromDevice originatingFromDevice); @Override Boolean visitOrMatchExpr(OrMatchExpr orMatchExpr); @Override Boolean visitPermittedByAcl(PermittedByAcl permittedByAcl); @Override Boolean visitTrueExpr(TrueExpr trueExpr);  }