Search in sources :

Example 1 with RouteMapSetAdditiveCommunityListLine

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

the class CiscoControlPlaneExtractor method exitSet_community_list_additive_rm_stanza.

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

Aggregations

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