Search in sources :

Example 1 with RouteMapSetNextHopLine

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

the class CiscoControlPlaneExtractor method exitSet_next_hop_rm_stanza.

@Override
public void exitSet_next_hop_rm_stanza(Set_next_hop_rm_stanzaContext ctx) {
    List<Ip> nextHops = new ArrayList<>();
    for (Token t : ctx.nexthop_list) {
        Ip nextHop = toIp(t);
        nextHops.add(nextHop);
    }
    RouteMapSetNextHopLine line = new RouteMapSetNextHopLine(nextHops);
    _currentRouteMapClause.addSetLine(line);
}
Also used : Ip(org.batfish.datamodel.Ip) RoutePolicyNextHopIp(org.batfish.representation.cisco.RoutePolicyNextHopIp) ArrayList(java.util.ArrayList) RouteMapSetNextHopLine(org.batfish.representation.cisco.RouteMapSetNextHopLine) Token(org.antlr.v4.runtime.Token)

Aggregations

ArrayList (java.util.ArrayList)1 Token (org.antlr.v4.runtime.Token)1 Ip (org.batfish.datamodel.Ip)1 RouteMapSetNextHopLine (org.batfish.representation.cisco.RouteMapSetNextHopLine)1 RoutePolicyNextHopIp (org.batfish.representation.cisco.RoutePolicyNextHopIp)1