Search in sources :

Example 6 with RouteRefresh

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev171207.RouteRefresh in project bgpcep by opendaylight.

the class ParserTest method testRouteRefreshMsg.

@Test
public void testRouteRefreshMsg() throws BGPDocumentedException, BGPParsingException {
    final Notification rrMsg = new RouteRefreshBuilder().setAfi(Ipv4AddressFamily.class).setSafi(UnicastSubsequentAddressFamily.class).build();
    final ByteBuf buffer = Unpooled.buffer();
    ParserTest.reg.serializeMessage(rrMsg, buffer);
    assertArrayEquals(RR_MSG, ByteArray.getAllBytes(buffer));
    final Notification m = ParserTest.reg.parseMessage(Unpooled.copiedBuffer(ByteArray.getAllBytes(buffer)), null);
    assertTrue(m instanceof RouteRefresh);
}
Also used : RouteRefreshBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev171207.RouteRefreshBuilder) RouteRefresh(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev171207.RouteRefresh) ByteBuf(io.netty.buffer.ByteBuf) Notification(org.opendaylight.yangtools.yang.binding.Notification) UnicastSubsequentAddressFamily(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.UnicastSubsequentAddressFamily) Test(org.junit.Test)

Aggregations

RouteRefresh (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev171207.RouteRefresh)3 ByteBuf (io.netty.buffer.ByteBuf)2 BGPDocumentedException (org.opendaylight.protocol.bgp.parser.BGPDocumentedException)2 RouteRefreshBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev171207.RouteRefreshBuilder)2 Test (org.junit.Test)1 AddPathCapabilityHandler (org.opendaylight.protocol.bgp.parser.impl.message.open.AddPathCapabilityHandler)1 As4CapabilityHandler (org.opendaylight.protocol.bgp.parser.impl.message.open.As4CapabilityHandler)1 BgpExtendedMessageCapabilityHandler (org.opendaylight.protocol.bgp.parser.impl.message.open.BgpExtendedMessageCapabilityHandler)1 CapabilityParameterParser (org.opendaylight.protocol.bgp.parser.impl.message.open.CapabilityParameterParser)1 GracefulCapabilityHandler (org.opendaylight.protocol.bgp.parser.impl.message.open.GracefulCapabilityHandler)1 MultiProtocolCapabilityHandler (org.opendaylight.protocol.bgp.parser.impl.message.open.MultiProtocolCapabilityHandler)1 RouteRefreshCapabilityHandler (org.opendaylight.protocol.bgp.parser.impl.message.open.RouteRefreshCapabilityHandler)1 AddressFamilyRegistry (org.opendaylight.protocol.bgp.parser.spi.AddressFamilyRegistry)1 SubsequentAddressFamilyRegistry (org.opendaylight.protocol.bgp.parser.spi.SubsequentAddressFamilyRegistry)1 Keepalive (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.Keepalive)1 Notify (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.Notify)1 Open (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.Open)1 Update (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.Update)1 BgpParameters (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.open.message.BgpParameters)1 As4BytesCapability (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.open.message.bgp.parameters.optional.capabilities.c.parameters.As4BytesCapability)1