use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestPortStatsCase in project openflowplugin by opendaylight.
the class MultipartRequestInputFactoryTest method createRequestPortStats.
private static MultipartRequestPortStatsCase createRequestPortStats() {
MultipartRequestPortStatsCaseBuilder caseBuilder = new MultipartRequestPortStatsCaseBuilder();
MultipartRequestPortStatsBuilder builder = new MultipartRequestPortStatsBuilder();
builder.setPortNo(2251L);
caseBuilder.setMultipartRequestPortStats(builder.build());
return caseBuilder.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestPortStatsCase in project openflowplugin by opendaylight.
the class MultipartRequestInputFactoryTest method decodeRequestPortStats.
private static MultipartRequestPortStatsCase decodeRequestPortStats(ByteBuf output) {
MultipartRequestPortStatsCaseBuilder caseBuilder = new MultipartRequestPortStatsCaseBuilder();
MultipartRequestPortStatsBuilder builder = new MultipartRequestPortStatsBuilder();
builder.setPortNo(output.readUnsignedInt());
output.skipBytes(PADDING_IN_MULTIPART_REQUEST_PORTSTATS_BODY);
caseBuilder.setMultipartRequestPortStats(builder.build());
return caseBuilder.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestPortStatsCase in project openflowplugin by opendaylight.
the class MultipartRequestPortStatsInputMessageFactoryTest method createRequestPortStats.
private static MultipartRequestPortStatsCase createRequestPortStats() {
MultipartRequestPortStatsCaseBuilder caseBuilder = new MultipartRequestPortStatsCaseBuilder();
MultipartRequestPortStatsBuilder builder = new MultipartRequestPortStatsBuilder();
builder.setPortNo(2251L);
caseBuilder.setMultipartRequestPortStats(builder.build());
return caseBuilder.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestPortStatsCase in project openflowplugin by opendaylight.
the class MultipartRequestInputFactoryTest method testMakeMultipartRequestInputPortStats.
@Test
public void testMakeMultipartRequestInputPortStats() throws Exception {
final MultipartType mpType = MultipartType.OFPMPPORTSTATS;
final MultipartRequestInput mpRqInput = (MultipartRequestInput) MultipartRequestInputFactory.makeMultipartRequest(xid, ofVersion, mpType, false);
checkHeader(mpRqInput, mpType);
final MultipartRequestBody mpRqBody = mpRqInput.getMultipartRequestBody();
Assert.assertTrue(mpRqBody instanceof MultipartRequestPortStatsCase);
MultipartRequestPortStats mpRq = ((MultipartRequestPortStatsCase) mpRqBody).getMultipartRequestPortStats();
Assert.assertEquals(OFConstants.OFPP_ANY, mpRq.getPortNo());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestPortStatsCase in project openflowplugin by opendaylight.
the class OF10StatsRequestInputFactory method setPortStats.
private MultipartRequestPortStatsCase setPortStats(ByteBuf input) {
MultipartRequestPortStatsCaseBuilder caseBuilder = new MultipartRequestPortStatsCaseBuilder();
MultipartRequestPortStatsBuilder portBuilder = new MultipartRequestPortStatsBuilder();
portBuilder.setPortNo((long) input.readUnsignedShort());
caseBuilder.setMultipartRequestPortStats(portBuilder.build());
return caseBuilder.build();
}
Aggregations