Search in sources :

Example 1 with RouteMapSetCommunityLine

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

the class CiscoControlPlaneExtractor method exitSet_community_rm_stanza.

@Override
public void exitSet_community_rm_stanza(Set_community_rm_stanzaContext ctx) {
    List<Long> commList = new ArrayList<>();
    for (CommunityContext c : ctx.communities) {
        long community = toLong(c);
        commList.add(community);
    }
    RouteMapSetCommunityLine line = new RouteMapSetCommunityLine(commList);
    _currentRouteMapClause.addSetLine(line);
}
Also used : LiteralLong(org.batfish.datamodel.routing_policy.expr.LiteralLong) VarLong(org.batfish.datamodel.routing_policy.expr.VarLong) ArrayList(java.util.ArrayList) RouteMapSetCommunityLine(org.batfish.representation.cisco.RouteMapSetCommunityLine) CommunityContext(org.batfish.grammar.cisco.CiscoParser.CommunityContext)

Aggregations

ArrayList (java.util.ArrayList)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 RouteMapSetCommunityLine (org.batfish.representation.cisco.RouteMapSetCommunityLine)1