Search in sources :

Example 1 with RouteMapSetAdditiveCommunityLine

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

the class CiscoControlPlaneExtractor method exitSet_community_additive_rm_stanza.

@Override
public void exitSet_community_additive_rm_stanza(Set_community_additive_rm_stanzaContext ctx) {
    List<Long> commList = new ArrayList<>();
    for (CommunityContext c : ctx.communities) {
        long community = toLong(c);
        commList.add(community);
    }
    RouteMapSetAdditiveCommunityLine line = new RouteMapSetAdditiveCommunityLine(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) CommunityContext(org.batfish.grammar.cisco.CiscoParser.CommunityContext) RouteMapSetAdditiveCommunityLine(org.batfish.representation.cisco.RouteMapSetAdditiveCommunityLine)

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 RouteMapSetAdditiveCommunityLine (org.batfish.representation.cisco.RouteMapSetAdditiveCommunityLine)1