Search in sources :

Example 1 with MultipartRequestTableCase

use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestTableCase in project openflowplugin by opendaylight.

the class MultipartRequestInputMessageFactory method setTable.

private MultipartRequestTableCase setTable(ByteBuf input) {
    MultipartRequestTableCaseBuilder caseBuilder = new MultipartRequestTableCaseBuilder();
    MultipartRequestTableBuilder tableBuilder = new MultipartRequestTableBuilder();
    tableBuilder.setEmpty(true);
    caseBuilder.setMultipartRequestTable(tableBuilder.build());
    return caseBuilder.build();
}
Also used : MultipartRequestTableCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestTableCaseBuilder) MultipartRequestTableBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.table._case.MultipartRequestTableBuilder)

Example 2 with MultipartRequestTableCase

use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestTableCase in project openflowplugin by opendaylight.

the class OF10StatsRequestInputFactory method setTable.

private MultipartRequestTableCase setTable(ByteBuf input) {
    MultipartRequestTableCaseBuilder caseBuilder = new MultipartRequestTableCaseBuilder();
    MultipartRequestTableBuilder tableBuilder = new MultipartRequestTableBuilder();
    tableBuilder.setEmpty(true);
    caseBuilder.setMultipartRequestTable(tableBuilder.build());
    return caseBuilder.build();
}
Also used : MultipartRequestTableCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestTableCaseBuilder) MultipartRequestTableBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.table._case.MultipartRequestTableBuilder)

Example 3 with MultipartRequestTableCase

use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestTableCase in project openflowplugin by opendaylight.

the class OpendaylightFlowTableStatisticsServiceImplTest method testBuildRequest.

@Test
public void testBuildRequest() throws Exception {
    Xid xid = new Xid(42L);
    GetFlowTablesStatisticsInputBuilder input = new GetFlowTablesStatisticsInputBuilder().setNode(createNodeRef("unitProt:123"));
    final OfHeader request = flowTableStatisticsService.buildRequest(xid, input.build());
    Assert.assertTrue(request instanceof MultipartRequestInput);
    final MultipartRequestInput mpRequest = (MultipartRequestInput) request;
    Assert.assertEquals(MultipartType.OFPMPTABLE, mpRequest.getType());
    Assert.assertTrue(mpRequest.getMultipartRequestBody() instanceof MultipartRequestTableCase);
    final MultipartRequestTableCase mpRequestBody = (MultipartRequestTableCase) (mpRequest.getMultipartRequestBody());
    Assert.assertTrue(mpRequestBody.getMultipartRequestTable().isEmpty());
}
Also used : MultipartRequestTableCase(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestTableCase) Xid(org.opendaylight.openflowplugin.api.openflow.device.Xid) GetFlowTablesStatisticsInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.table.statistics.rev131215.GetFlowTablesStatisticsInputBuilder) OfHeader(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.OfHeader) MultipartRequestInput(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartRequestInput) Test(org.junit.Test)

Aggregations

MultipartRequestTableCaseBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestTableCaseBuilder)2 MultipartRequestTableBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.table._case.MultipartRequestTableBuilder)2 Test (org.junit.Test)1 Xid (org.opendaylight.openflowplugin.api.openflow.device.Xid)1 GetFlowTablesStatisticsInputBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.flow.table.statistics.rev131215.GetFlowTablesStatisticsInputBuilder)1 MultipartRequestInput (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartRequestInput)1 OfHeader (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.OfHeader)1 MultipartRequestTableCase (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestTableCase)1