use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.RsvpTeObject in project bgpcep by opendaylight.
the class TEObjectTest method testParser_HEAD_5.
@Test
public void testParser_HEAD_5() throws RSVPParsingException {
final SenderTspecObjectParser parser = new SenderTspecObjectParser();
final RsvpTeObject obj = parser.parseObject(Unpooled.copiedBuffer(ByteArray.subByte(TEObjectUtil.TE_LSP_SENDER_TSPEC, 4, TEObjectUtil.TE_LSP_SENDER_TSPEC.length - 4)));
final ByteBuf output = Unpooled.buffer();
parser.serializeObject(obj, output);
assertArrayEquals(TEObjectUtil.TE_LSP_SENDER_TSPEC, ByteArray.getAllBytes(output));
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.RsvpTeObject in project bgpcep by opendaylight.
the class TEObjectTest method testFastRerouteObjectParser1.
@Test
public void testFastRerouteObjectParser1() throws RSVPParsingException {
final FastRerouteObjectParser parser = new FastRerouteObjectParser();
final RsvpTeObject obj = parser.parseObject(Unpooled.copiedBuffer(ByteArray.subByte(TEObjectUtil.TE_LSP_FAST_REROUTE1, 4, TEObjectUtil.TE_LSP_FAST_REROUTE1.length - 4)));
final ByteBuf output = Unpooled.buffer();
parser.serializeObject(obj, output);
assertArrayEquals(TEObjectUtil.TE_LSP_FAST_REROUTE1, ByteArray.getAllBytes(output));
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.RsvpTeObject in project bgpcep by opendaylight.
the class TEObjectTest method testDetourObjectParser8.
@Test
public void testDetourObjectParser8() throws RSVPParsingException {
final DetourObjectIpv6Parser parser = new DetourObjectIpv6Parser();
final RsvpTeObject obj = parser.parseObject(Unpooled.copiedBuffer(ByteArray.subByte(TEObjectUtil.TE_LSP_DETOUR8, 4, TEObjectUtil.TE_LSP_DETOUR8.length - 4)));
final ByteBuf output = Unpooled.buffer();
parser.serializeObject(obj, output);
assertArrayEquals(TEObjectUtil.TE_LSP_DETOUR8, ByteArray.getAllBytes(output));
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.RsvpTeObject in project bgpcep by opendaylight.
the class TEObjectTest method testAssociationObjectParser2.
@Test
public void testAssociationObjectParser2() throws RSVPParsingException {
final AssociationObjectParserIPV6 parser = new AssociationObjectParserIPV6();
final RsvpTeObject obj = parser.parseObject(Unpooled.copiedBuffer(ByteArray.subByte(TEObjectUtil.TE_LSP_ASSOCIATION_2, 4, TEObjectUtil.TE_LSP_ASSOCIATION_2.length - 4)));
final ByteBuf output = Unpooled.buffer();
parser.serializeObject(obj, output);
assertArrayEquals(TEObjectUtil.TE_LSP_ASSOCIATION_2, ByteArray.getAllBytes(output));
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.RsvpTeObject in project bgpcep by opendaylight.
the class TEObjectTest method testAssociationObjectParser1.
@Test
public void testAssociationObjectParser1() throws RSVPParsingException {
final AssociationObjectParserIPV4 parser = new AssociationObjectParserIPV4();
final RsvpTeObject obj = parser.parseObject(Unpooled.copiedBuffer(ByteArray.subByte(TEObjectUtil.TE_LSP_ASSOCIATION_1, 4, TEObjectUtil.TE_LSP_ASSOCIATION_1.length - 4)));
final ByteBuf output = Unpooled.buffer();
parser.serializeObject(obj, output);
assertArrayEquals(TEObjectUtil.TE_LSP_ASSOCIATION_1, ByteArray.getAllBytes(output));
}
Aggregations