Search in sources :

Example 6 with MultipartRequestMeterCase

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

the class MultipartRequestInputMessageFactory method setMeter.

private MultipartRequestMeterCase setMeter(ByteBuf input) {
    MultipartRequestMeterCaseBuilder caseBuilder = new MultipartRequestMeterCaseBuilder();
    MultipartRequestMeterBuilder meterBuilder = new MultipartRequestMeterBuilder();
    meterBuilder.setMeterId(new MeterId(input.readUnsignedInt()));
    caseBuilder.setMultipartRequestMeter(meterBuilder.build());
    return caseBuilder.build();
}
Also used : MultipartRequestMeterCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestMeterCaseBuilder) MultipartRequestMeterBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.meter._case.MultipartRequestMeterBuilder) MeterId(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.MeterId)

Example 7 with MultipartRequestMeterCase

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

the class MultipartRequestInputFactoryTest method decodeRequestMeter.

private static MultipartRequestMeterCase decodeRequestMeter(ByteBuf output) {
    MultipartRequestMeterCaseBuilder caseBuilder = new MultipartRequestMeterCaseBuilder();
    MultipartRequestMeterBuilder builder = new MultipartRequestMeterBuilder();
    builder.setMeterId(new MeterId(output.readUnsignedInt()));
    output.skipBytes(PADDING_IN_MULTIPART_REQUEST_METER_BODY);
    caseBuilder.setMultipartRequestMeter(builder.build());
    return caseBuilder.build();
}
Also used : MultipartRequestMeterCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestMeterCaseBuilder) MultipartRequestMeterBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.meter._case.MultipartRequestMeterBuilder) MeterId(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.MeterId)

Aggregations

MeterId (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.MeterId)4 MultipartRequestMeterCaseBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestMeterCaseBuilder)4 MultipartRequestMeterBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.meter._case.MultipartRequestMeterBuilder)4 MultipartRequestMeterCase (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestMeterCase)3 MultipartRequestMeter (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.meter._case.MultipartRequestMeter)3 Test (org.junit.Test)1 Xid (org.opendaylight.openflowplugin.api.openflow.device.Xid)1 GetMeterStatisticsInput (org.opendaylight.yang.gen.v1.urn.opendaylight.direct.statistics.rev160511.GetMeterStatisticsInput)1 MeterId (org.opendaylight.yang.gen.v1.urn.opendaylight.meter.types.rev130918.MeterId)1 MultipartType (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.MultipartType)1 MultipartRequestInput (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartRequestInput)1 MultipartRequestBody (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.MultipartRequestBody)1