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 testPrimaryPathRouteParser.
@Test
public void testPrimaryPathRouteParser() throws RSVPParsingException {
final PrimaryPathRouteObjectParser parser = new PrimaryPathRouteObjectParser(this.context.getEROSubobjectHandlerRegistry());
final RsvpTeObject obj = parser.parseObject(Unpooled.copiedBuffer(ByteArray.subByte(TEObjectUtil.TE_LSP_PRIMARY_PATH_ROUTE, 4, TEObjectUtil.TE_LSP_PRIMARY_PATH_ROUTE.length - 4)));
final ByteBuf output = Unpooled.buffer();
parser.serializeObject(obj, output);
assertArrayEquals(TEObjectUtil.TE_LSP_PRIMARY_PATH_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 testRequiredAttributesParser.
@Test
public void testRequiredAttributesParser() throws RSVPParsingException {
final RequiredAttributesObjectParser parser = new RequiredAttributesObjectParser();
final RsvpTeObject obj = parser.parseObject(Unpooled.copiedBuffer(ByteArray.subByte(TEObjectUtil.TE_LSP_REQUIRED_ATTRIBUTES, 4, TEObjectUtil.TE_LSP_REQUIRED_ATTRIBUTES.length - 4)));
final ByteBuf output = Unpooled.buffer();
parser.serializeObject(obj, output);
assertArrayEquals(TEObjectUtil.TE_LSP_REQUIRED_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 testSecondaryRecordRouteObjectParser.
@Test
public void testSecondaryRecordRouteObjectParser() throws RSVPParsingException {
final SecondaryRecordRouteObjectParser parser = new SecondaryRecordRouteObjectParser(this.context.getRROSubobjectHandlerRegistry());
final RsvpTeObject obj = parser.parseObject(Unpooled.copiedBuffer(ByteArray.subByte(TEObjectUtil.TE_LSP_SECONDARY_RECORD_ROUTE, 4, TEObjectUtil.TE_LSP_SECONDARY_RECORD_ROUTE.length - 4)));
final ByteBuf output = Unpooled.buffer();
parser.serializeObject(obj, output);
assertArrayEquals(TEObjectUtil.TE_LSP_SECONDARY_RECORD_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 testExplicitRouteParser.
@Test
public void testExplicitRouteParser() throws RSVPParsingException {
final ExplicitRouteObjectParser parser = new ExplicitRouteObjectParser(this.context.getEROSubobjectHandlerRegistry());
final RsvpTeObject obj = parser.parseObject(Unpooled.copiedBuffer(ByteArray.subByte(TEObjectUtil.TE_LSP_EXPLICIT, 4, TEObjectUtil.TE_LSP_EXPLICIT.length - 4)));
final ByteBuf output = Unpooled.buffer();
parser.serializeObject(obj, output);
assertArrayEquals(TEObjectUtil.TE_LSP_EXPLICIT, 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 testFlowSpecObjectParser_HEAD_2.
@Test
public void testFlowSpecObjectParser_HEAD_2() throws RSVPParsingException {
final FlowSpecObjectParser parser = new FlowSpecObjectParser();
final RsvpTeObject obj = parser.parseObject(Unpooled.copiedBuffer(ByteArray.subByte(TEObjectUtil.TE_LSP_FLOWSPEC_H2, 4, TEObjectUtil.TE_LSP_FLOWSPEC_H2.length - 4)));
final ByteBuf output = Unpooled.buffer();
parser.serializeObject(obj, output);
assertArrayEquals(TEObjectUtil.TE_LSP_FLOWSPEC_H2, ByteArray.getAllBytes(output));
}
Aggregations