Search in sources :

Example 1 with RouteMapSetCommunityListLine

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

the class CiscoControlPlaneExtractor method exitSet_community_list_rm_stanza.

@Override
public void exitSet_community_list_rm_stanza(Set_community_list_rm_stanzaContext ctx) {
    Set<String> communityLists = new LinkedHashSet<>();
    int statementLine = ctx.getStart().getLine();
    for (VariableContext communityListCtx : ctx.comm_lists) {
        String communityList = communityListCtx.getText();
        communityLists.add(communityList);
    }
    RouteMapSetCommunityListLine line = new RouteMapSetCommunityListLine(communityLists, statementLine);
    _currentRouteMapClause.addSetLine(line);
}
Also used : LinkedHashSet(java.util.LinkedHashSet) RouteMapSetCommunityListLine(org.batfish.representation.cisco.RouteMapSetCommunityListLine) VariableContext(org.batfish.grammar.cisco.CiscoParser.VariableContext)

Aggregations

LinkedHashSet (java.util.LinkedHashSet)1 VariableContext (org.batfish.grammar.cisco.CiscoParser.VariableContext)1 RouteMapSetCommunityListLine (org.batfish.representation.cisco.RouteMapSetCommunityListLine)1