use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.peer.rpc.rev171207.RouteRefreshRequestInput in project bgpcep by opendaylight.
the class BgpPeerRpcTest method testRouteRefreshRequestSuccessRequest.
@Test
public void testRouteRefreshRequestSuccessRequest() throws InterruptedException, ExecutionException {
final RouteRefreshRequestInput input = new RouteRefreshRequestInputBuilder().setAfi(Ipv4AddressFamily.class).setSafi(SubsequentAddressFamily.class).setPeerRef(this.peer).build();
final Future<RpcResult<Void>> result = this.rpc.routeRefreshRequest(input);
assertTrue(result.get().getErrors().isEmpty());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.peer.rpc.rev171207.RouteRefreshRequestInput in project bgpcep by opendaylight.
the class BgpPeerRpcTest method testRouteRefreshRequestFailedRequest.
@Test
public void testRouteRefreshRequestFailedRequest() throws InterruptedException, ExecutionException {
final RouteRefreshRequestInput input = new RouteRefreshRequestInputBuilder().setAfi(Ipv6AddressFamily.class).setSafi(SubsequentAddressFamily.class).setPeerRef(this.peer).build();
final Future<RpcResult<Void>> result = this.rpc.routeRefreshRequest(input);
assertEquals(1, result.get().getErrors().size());
assertEquals("Failed to send Route Refresh message due to unsupported address families.", result.get().getErrors().iterator().next().getMessage());
}
Aggregations