Search in sources :

Example 1 with StandardCommunityListLine

use of org.batfish.representation.cisco.StandardCommunityListLine in project batfish by batfish.

the class CiscoControlPlaneExtractor method exitIp_community_list_standard_tail.

@Override
public void exitIp_community_list_standard_tail(Ip_community_list_standard_tailContext ctx) {
    LineAction action = toLineAction(ctx.ala);
    List<Long> communities = new ArrayList<>();
    for (CommunityContext communityCtx : ctx.communities) {
        long community = toLong(communityCtx);
        communities.add(community);
    }
    StandardCommunityListLine line = new StandardCommunityListLine(action, communities);
    _currentStandardCommunityList.getLines().add(line);
}
Also used : LineAction(org.batfish.datamodel.LineAction) StandardCommunityListLine(org.batfish.representation.cisco.StandardCommunityListLine) LiteralLong(org.batfish.datamodel.routing_policy.expr.LiteralLong) VarLong(org.batfish.datamodel.routing_policy.expr.VarLong) ArrayList(java.util.ArrayList) CommunityContext(org.batfish.grammar.cisco.CiscoParser.CommunityContext)

Aggregations

ArrayList (java.util.ArrayList)1 LineAction (org.batfish.datamodel.LineAction)1 LiteralLong (org.batfish.datamodel.routing_policy.expr.LiteralLong)1 VarLong (org.batfish.datamodel.routing_policy.expr.VarLong)1 CommunityContext (org.batfish.grammar.cisco.CiscoParser.CommunityContext)1 StandardCommunityListLine (org.batfish.representation.cisco.StandardCommunityListLine)1