@Test public void testPermittedByAcl() { IpAccessList.Builder aclBuilder = IpAccessList.builder().setName("foo"); IpAccessList acl = aclBuilder .setLines( ImmutableList.of( ExprAclLine.accepting().setMatchCondition(matchSrcInterface("a")).build())) .build(); Map<String, IpAccessList> namedAcls = ImmutableMap.of(acl.getName(), acl); assertThat(referencedSources(namedAcls, new PermittedByAcl(acl.getName())), contains("a")); }
public static Set<String> referencedSources( Map<String, IpAccessList> namedAcls, AclLineMatchExpr expr) { ReferenceSourcesVisitor visitor = new ReferenceSourcesVisitor(namedAcls); visitor.visit(expr); return visitor.referencedInterfaces(); }
SourcesReferencedByIpAccessLists { public static Set<String> referencedSources( Map<String, IpAccessList> namedAcls, AclLineMatchExpr expr) { ReferenceSourcesVisitor visitor = new ReferenceSourcesVisitor(namedAcls); visitor.visit(expr); return visitor.referencedInterfaces(); } }
SourcesReferencedByIpAccessLists { public static Set<String> referencedSources( Map<String, IpAccessList> namedAcls, AclLineMatchExpr expr) { ReferenceSourcesVisitor visitor = new ReferenceSourcesVisitor(namedAcls); visitor.visit(expr); return visitor.referencedInterfaces(); }  }
SourcesReferencedByIpAccessLists { public static Set<String> referencedSources( Map<String, IpAccessList> namedAcls, AclLineMatchExpr expr) { ReferenceSourcesVisitor visitor = new ReferenceSourcesVisitor(namedAcls); visitor.visit(expr); return visitor.referencedInterfaces(); }  static Set<String> referencedSources(
      Map<String, IpAccessList> namedAcls, AclLineMatchExpr expr); static Set<String> referencedSources(
      Map<String, IpAccessList> namedAcls, IpAccessList acl); static Set<String> referencedSources(
      Map<String, IpAccessList> namedAcls, Set<String> acls); }
SourcesReferencedByIpAccessLists { public static Set<String> referencedSources( Map<String, IpAccessList> namedAcls, AclLineMatchExpr expr) { ReferenceSourcesVisitor visitor = new ReferenceSourcesVisitor(namedAcls); visitor.visit(expr); return visitor.referencedInterfaces(); }  static Set<String> referencedSources(
      Map<String, IpAccessList> namedAcls, AclLineMatchExpr expr); static Set<String> referencedSources(
      Map<String, IpAccessList> namedAcls, IpAccessList acl); static Set<String> referencedSources(
      Map<String, IpAccessList> namedAcls, Set<String> acls); static final String SOURCE_ORIGINATING_FROM_DEVICE; }