Search in sources :

Example 1 with RoutePolicyNextHopSelf

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

the class CiscoControlPlaneExtractor method toRoutePolicyStatement.

private RoutePolicyStatement toRoutePolicyStatement(Set_next_hop_rp_stanzaContext ctx) {
    RoutePolicyNextHop hop = null;
    if (ctx.IP_ADDRESS() != null) {
        hop = new RoutePolicyNextHopIp(toIp(ctx.IP_ADDRESS()));
    } else if (ctx.IPV6_ADDRESS() != null) {
        hop = new RoutePolicyNextHopIP6(toIp6(ctx.IPV6_ADDRESS()));
    } else if (ctx.PEER_ADDRESS() != null) {
        hop = new RoutePolicyNextHopPeerAddress();
    } else if (ctx.SELF() != null) {
        hop = new RoutePolicyNextHopSelf();
    }
    boolean destVrf = (ctx.DESTINATION_VRF() != null);
    return new RoutePolicySetNextHop(hop, destVrf);
}
Also used : RoutePolicyNextHopPeerAddress(org.batfish.representation.cisco.RoutePolicyNextHopPeerAddress) RoutePolicyNextHopSelf(org.batfish.representation.cisco.RoutePolicyNextHopSelf) RoutePolicyNextHop(org.batfish.representation.cisco.RoutePolicyNextHop) RoutePolicyNextHopIp(org.batfish.representation.cisco.RoutePolicyNextHopIp) RoutePolicyNextHopIP6(org.batfish.representation.cisco.RoutePolicyNextHopIP6) RoutePolicySetNextHop(org.batfish.representation.cisco.RoutePolicySetNextHop)

Aggregations

RoutePolicyNextHop (org.batfish.representation.cisco.RoutePolicyNextHop)1 RoutePolicyNextHopIP6 (org.batfish.representation.cisco.RoutePolicyNextHopIP6)1 RoutePolicyNextHopIp (org.batfish.representation.cisco.RoutePolicyNextHopIp)1 RoutePolicyNextHopPeerAddress (org.batfish.representation.cisco.RoutePolicyNextHopPeerAddress)1 RoutePolicyNextHopSelf (org.batfish.representation.cisco.RoutePolicyNextHopSelf)1 RoutePolicySetNextHop (org.batfish.representation.cisco.RoutePolicySetNextHop)1