use of org.batfish.representation.cisco.RoutePolicyNextHopPeerAddress 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);
}
Aggregations