Search in sources :

Example 1 with FwThenNextIp

use of org.batfish.representation.juniper.FwThenNextIp in project batfish by batfish.

the class ConfigurationBuilder method exitFftt_next_ip.

@Override
public void exitFftt_next_ip(Fftt_next_ipContext ctx) {
    Prefix nextPrefix;
    if (ctx.ip != null) {
        Ip nextIp = new Ip(ctx.ip.getText());
        nextPrefix = new Prefix(nextIp, Prefix.MAX_PREFIX_LENGTH);
    } else {
        nextPrefix = Prefix.parse(ctx.prefix.getText());
    }
    FwThenNextIp then = new FwThenNextIp(nextPrefix);
    _currentFwTerm.getThens().add(then);
    _currentFwTerm.getThens().add(FwThenAccept.INSTANCE);
    _currentFilter.setRoutingPolicy(true);
}
Also used : FwThenNextIp(org.batfish.representation.juniper.FwThenNextIp) PsThenNextHopIp(org.batfish.representation.juniper.PsThenNextHopIp) FwThenNextIp(org.batfish.representation.juniper.FwThenNextIp) Ip(org.batfish.datamodel.Ip) Prefix(org.batfish.datamodel.Prefix)

Aggregations

Ip (org.batfish.datamodel.Ip)1 Prefix (org.batfish.datamodel.Prefix)1 FwThenNextIp (org.batfish.representation.juniper.FwThenNextIp)1 PsThenNextHopIp (org.batfish.representation.juniper.PsThenNextHopIp)1