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 testFastRerouteObjectParser7.
@Test
public void testFastRerouteObjectParser7() throws RSVPParsingException {
final InformationalFastRerouteObjectParser parser = new InformationalFastRerouteObjectParser();
final RsvpTeObject obj = parser.parseObject(Unpooled.copiedBuffer(ByteArray.subByte(TEObjectUtil.TE_LSP_FAST_REROUTE7, 4, TEObjectUtil.TE_LSP_FAST_REROUTE7.length - 4)));
final ByteBuf output = Unpooled.buffer();
parser.serializeObject(obj, output);
assertArrayEquals(TEObjectUtil.TE_LSP_FAST_REROUTE7, 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 testAttributesObject12Parser.
@Test
public void testAttributesObject12Parser() throws RSVPParsingException {
final AttributesObjectParser parser = new AttributesObjectParser();
final RsvpTeObject obj = parser.parseObject(Unpooled.copiedBuffer(ByteArray.subByte(TEObjectUtil.TE_LSP_ATTRIBUTES, 4, TEObjectUtil.TE_LSP_ATTRIBUTES.length - 4)));
final ByteBuf output = Unpooled.buffer();
parser.serializeObject(obj, output);
assertArrayEquals(TEObjectUtil.TE_LSP_ATTRIBUTES, 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 testSessionAttributeParser7.
@Test
public void testSessionAttributeParser7() throws RSVPParsingException {
final SessionAttributeLspObjectParser parser = new SessionAttributeLspObjectParser();
final RsvpTeObject obj = parser.parseObject(Unpooled.copiedBuffer(ByteArray.subByte(TEObjectUtil.TE_LSP_SESSION_C7, 4, TEObjectUtil.TE_LSP_SESSION_C7.length - 4)));
final ByteBuf output = Unpooled.buffer();
parser.serializeObject(obj, output);
assertArrayEquals(TEObjectUtil.TE_LSP_SESSION_C7, 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 testExcludeRouteParser.
@Test
public void testExcludeRouteParser() throws RSVPParsingException {
final ExcludeRouteObjectParser parser = new ExcludeRouteObjectParser(this.context.getXROSubobjectHandlerRegistry());
final RsvpTeObject obj = parser.parseObject(Unpooled.copiedBuffer(ByteArray.subByte(TEObjectUtil.TE_LSP_EXCLUDE_ROUTE, 4, TEObjectUtil.TE_LSP_EXCLUDE_ROUTE.length - 4)));
final ByteBuf output = Unpooled.buffer();
parser.serializeObject(obj, output);
assertArrayEquals(TEObjectUtil.TE_LSP_EXCLUDE_ROUTE, 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 testDetourObjectParser7.
@Test
public void testDetourObjectParser7() throws RSVPParsingException {
final DetourObjectIpv4Parser parser = new DetourObjectIpv4Parser();
final RsvpTeObject obj = parser.parseObject(Unpooled.copiedBuffer(ByteArray.subByte(TEObjectUtil.TE_LSP_DETOUR7, 4, TEObjectUtil.TE_LSP_DETOUR7.length - 4)));
final ByteBuf output = Unpooled.buffer();
parser.serializeObject(obj, output);
assertArrayEquals(TEObjectUtil.TE_LSP_DETOUR7, ByteArray.getAllBytes(output));
}
Aggregations