use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.desc._case.MultipartRequestDescBuilder in project openflowplugin by opendaylight.
the class MultipartRequestInputMessageFactory method setDesc.
private MultipartRequestDescCase setDesc(ByteBuf input) {
MultipartRequestDescCaseBuilder caseBuilder = new MultipartRequestDescCaseBuilder();
MultipartRequestDescBuilder descBuilder = new MultipartRequestDescBuilder();
descBuilder.setEmpty(true);
caseBuilder.setMultipartRequestDesc(descBuilder.build());
return caseBuilder.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.desc._case.MultipartRequestDescBuilder in project openflowplugin by opendaylight.
the class OF10StatsRequestInputFactory method setDesc.
private MultipartRequestDescCase setDesc(ByteBuf input) {
MultipartRequestDescCaseBuilder caseBuilder = new MultipartRequestDescCaseBuilder();
MultipartRequestDescBuilder descBuilder = new MultipartRequestDescBuilder();
descBuilder.setEmpty(true);
caseBuilder.setMultipartRequestDesc(descBuilder.build());
return caseBuilder.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.desc._case.MultipartRequestDescBuilder in project openflowplugin by opendaylight.
the class MultipartRequestInputFactoryTest method createRequestDesc.
private static MultipartRequestBody createRequestDesc() {
MultipartRequestDescCaseBuilder caseBuilder = new MultipartRequestDescCaseBuilder();
MultipartRequestDescBuilder builder = new MultipartRequestDescBuilder();
caseBuilder.setMultipartRequestDesc(builder.build());
return caseBuilder.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.desc._case.MultipartRequestDescBuilder in project openflowplugin by opendaylight.
the class OF10StatsRequestInputFactoryTest method testDesc.
/**
* Testing OF10StatsRequestInputFactory (Desc) for correct serialization.
*/
@Test
public void testDesc() throws Exception {
MultipartRequestInputBuilder builder = new MultipartRequestInputBuilder();
BufferHelper.setupHeader(builder, EncodeConstants.OF10_VERSION_ID);
builder.setType(MultipartType.OFPMPDESC);
builder.setFlags(new MultipartRequestFlags(false));
MultipartRequestDescCaseBuilder caseBuilder = new MultipartRequestDescCaseBuilder();
MultipartRequestDescBuilder descBuilder = new MultipartRequestDescBuilder();
caseBuilder.setMultipartRequestDesc(descBuilder.build());
builder.setMultipartRequestBody(caseBuilder.build());
MultipartRequestInput message = builder.build();
ByteBuf out = UnpooledByteBufAllocator.DEFAULT.buffer();
multipartFactory.serialize(message, out);
BufferHelper.checkHeaderV10(out, (byte) 16, 12);
Assert.assertEquals("Wrong type", 0, out.readUnsignedShort());
Assert.assertEquals("Wrong flags", 0, out.readUnsignedShort());
Assert.assertTrue("Unread data", out.readableBytes() == 0);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.desc._case.MultipartRequestDescBuilder in project openflowplugin by opendaylight.
the class OF10StatsRequestInputDescFactoryTest method createMultipartRequestBody.
private static MultipartRequestBody createMultipartRequestBody() {
MultipartRequestDescCaseBuilder caseBuilder = new MultipartRequestDescCaseBuilder();
MultipartRequestDescBuilder descBuilder = new MultipartRequestDescBuilder();
descBuilder.setEmpty(true);
caseBuilder.setMultipartRequestDesc(descBuilder.build());
return caseBuilder.build();
}
Aggregations