@JsonCreator private static SetNextHop jsonCreator( @Nullable @JsonProperty(PROP_DESTINATION_VRF) Boolean destinationVrf, @Nullable @JsonProperty(PROP_EXPR) NextHopExpr expr) { checkArgument(destinationVrf != null, "%s must be provided", PROP_DESTINATION_VRF); checkArgument(expr != null, "%s must be provided", PROP_EXPR); return new SetNextHop(expr, destinationVrf); }
@Override protected Statement toSetStatement(CiscoConfiguration cc, Configuration c, Warnings w) { return new SetNextHop(_nextHop.toNextHopExpr(cc, c, w), _destinationVrf); } }
@Override public void applyTo( List<Statement> statements, JuniperConfiguration juniperVendorConfiguration, Configuration c, Warnings w) { statements.add(new SetNextHop(SelfNextHop.getInstance(), false)); } }
@Override public void applyTo( List<Statement> statements, CiscoConfiguration cc, Configuration c, Warnings w) { statements.add(new SetNextHop(PeerAddressNextHop.getInstance(), false)); }
@Override public void applyTo( List<Statement> statements, JuniperConfiguration juniperVendorConfiguration, Configuration c, Warnings warnings) { // todo: something with destination-vrf statements.add(new SetNextHop(new IpNextHop(Collections.singletonList(_nextHopIp)), false)); }
@Override public void applyTo( List<Statement> statements, CiscoConfiguration cc, Configuration c, Warnings w) { // TODO: something with destination-vrf statements.add(new SetNextHop(new IpNextHop(_nextHops), false)); }
exportStatements.add(new SetNextHop(SelfNextHop.getInstance(), false));
peerExportPolicy.getStatements().add(new SetNextHop(SelfNextHop.getInstance(), false));
vpnGatewayCfgNode.getRoutingPolicies().put(vgwRpAcceptAllBgp.getName(), vgwRpAcceptAllBgp); vgwRpAcceptAllBgp.setStatements( ImmutableList.of(new SetNextHop(SelfNextHop.getInstance(), false), acceptIffEbgp)); vgwToVpcBuilder.setExportPolicy(rpAcceptAllEbgpAndSetNextHopSelfName); RoutingPolicy vgwRpRejectAll = new RoutingPolicy(rpRejectAllName, vpnGatewayCfgNode);