Search in sources :

Example 1 with RouteMapSetAsPathPrependLine

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

the class CiscoControlPlaneExtractor method exitSet_as_path_prepend_rm_stanza.

@Override
public void exitSet_as_path_prepend_rm_stanza(Set_as_path_prepend_rm_stanzaContext ctx) {
    List<AsExpr> asList = new ArrayList<>();
    for (As_exprContext asx : ctx.as_list) {
        AsExpr as = toAsExpr(asx);
        asList.add(as);
    }
    RouteMapSetAsPathPrependLine line = new RouteMapSetAsPathPrependLine(asList);
    _currentRouteMapClause.addSetLine(line);
}
Also used : AsExpr(org.batfish.datamodel.routing_policy.expr.AsExpr) ArrayList(java.util.ArrayList) As_exprContext(org.batfish.grammar.cisco.CiscoParser.As_exprContext) RouteMapSetAsPathPrependLine(org.batfish.representation.cisco.RouteMapSetAsPathPrependLine)

Aggregations

ArrayList (java.util.ArrayList)1 AsExpr (org.batfish.datamodel.routing_policy.expr.AsExpr)1 As_exprContext (org.batfish.grammar.cisco.CiscoParser.As_exprContext)1 RouteMapSetAsPathPrependLine (org.batfish.representation.cisco.RouteMapSetAsPathPrependLine)1