Search in sources :

Example 1 with RouteRefreshRequestInput

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());
}
Also used : RouteRefreshRequestInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.peer.rpc.rev171207.RouteRefreshRequestInputBuilder) RouteRefreshRequestInput(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.peer.rpc.rev171207.RouteRefreshRequestInput) Ipv4AddressFamily(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.Ipv4AddressFamily) RpcResult(org.opendaylight.yangtools.yang.common.RpcResult) Test(org.junit.Test)

Example 2 with RouteRefreshRequestInput

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());
}
Also used : Ipv6AddressFamily(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.Ipv6AddressFamily) RouteRefreshRequestInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.peer.rpc.rev171207.RouteRefreshRequestInputBuilder) RouteRefreshRequestInput(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.peer.rpc.rev171207.RouteRefreshRequestInput) RpcResult(org.opendaylight.yangtools.yang.common.RpcResult) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)2 RouteRefreshRequestInput (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.peer.rpc.rev171207.RouteRefreshRequestInput)2 RouteRefreshRequestInputBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.peer.rpc.rev171207.RouteRefreshRequestInputBuilder)2 RpcResult (org.opendaylight.yangtools.yang.common.RpcResult)2 Ipv4AddressFamily (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.Ipv4AddressFamily)1 Ipv6AddressFamily (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.Ipv6AddressFamily)1