Search in sources :

Example 21 with MultipartRequestBody

use of org.opendaylight.yang.gen.v1.urn.opendaylight.multipart.types.rev170112.multipart.request.MultipartRequestBody in project openflowplugin by opendaylight.

the class MultipartRequestInputFactory method serializeAggregateBody.

private void serializeAggregateBody(final MultipartRequestBody multipartRequestBody, final ByteBuf output) {
    MultipartRequestAggregateCase aggregateCase = (MultipartRequestAggregateCase) multipartRequestBody;
    MultipartRequestAggregate aggregate = aggregateCase.getMultipartRequestAggregate();
    output.writeByte(aggregate.getTableId().byteValue());
    output.writeZero(PADDING_IN_MULTIPART_REQUEST_AGREGGATE_BODY_01);
    output.writeInt(aggregate.getOutPort().intValue());
    output.writeInt(aggregate.getOutGroup().intValue());
    output.writeZero(PADDING_IN_MULTIPART_REQUEST_AGREGGATE_BODY_02);
    output.writeLong(aggregate.getCookie().longValue());
    output.writeLong(aggregate.getCookieMask().longValue());
    OFSerializer<Match> serializer = registry.getSerializer(new MessageTypeKey<>(EncodeConstants.OF13_VERSION_ID, Match.class));
    serializer.serialize(aggregate.getMatch(), output);
}
Also used : MultipartRequestAggregate(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.aggregate._case.MultipartRequestAggregate) MultipartRequestAggregateCase(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestAggregateCase) Match(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.grouping.Match)

Example 22 with MultipartRequestBody

use of org.opendaylight.yang.gen.v1.urn.opendaylight.multipart.types.rev170112.multipart.request.MultipartRequestBody in project openflowplugin by opendaylight.

the class MultipartRequestInputFactory method serializeQueueBody.

private static void serializeQueueBody(final MultipartRequestBody multipartRequestBody, final ByteBuf output) {
    MultipartRequestQueueCase queueCase = (MultipartRequestQueueCase) multipartRequestBody;
    MultipartRequestQueue queue = queueCase.getMultipartRequestQueue();
    output.writeInt(queue.getPortNo().intValue());
    output.writeInt(queue.getQueueId().intValue());
}
Also used : MultipartRequestQueue(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.queue._case.MultipartRequestQueue) MultipartRequestQueueCase(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestQueueCase)

Example 23 with MultipartRequestBody

use of org.opendaylight.yang.gen.v1.urn.opendaylight.multipart.types.rev170112.multipart.request.MultipartRequestBody in project openflowplugin by opendaylight.

the class OF10StatsRequestInputFactory method serializeQueueBody.

private static void serializeQueueBody(final MultipartRequestBody multipartRequestBody, final ByteBuf output) {
    MultipartRequestQueueCase queueCase = (MultipartRequestQueueCase) multipartRequestBody;
    MultipartRequestQueue queue = queueCase.getMultipartRequestQueue();
    output.writeShort(queue.getPortNo().intValue());
    output.writeZero(PADING_IN_QUEUE_BODY);
    output.writeInt(queue.getQueueId().intValue());
}
Also used : MultipartRequestQueue(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.queue._case.MultipartRequestQueue) MultipartRequestQueueCase(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestQueueCase)

Example 24 with MultipartRequestBody

use of org.opendaylight.yang.gen.v1.urn.opendaylight.multipart.types.rev170112.multipart.request.MultipartRequestBody in project openflowplugin by opendaylight.

the class OF10StatsRequestInputFactory method serializeFlowBody.

private void serializeFlowBody(final MultipartRequestBody multipartRequestBody, final ByteBuf output) {
    MultipartRequestFlowCase flowCase = (MultipartRequestFlowCase) multipartRequestBody;
    MultipartRequestFlow flow = flowCase.getMultipartRequestFlow();
    OFSerializer<MatchV10> matchSerializer = registry.getSerializer(new MessageTypeKey<>(EncodeConstants.OF10_VERSION_ID, MatchV10.class));
    matchSerializer.serialize(flow.getMatchV10(), output);
    output.writeByte(flow.getTableId().shortValue());
    output.writeZero(PADDING_IN_MULTIPART_REQUEST_FLOW_BODY);
    output.writeShort(flow.getOutPort().intValue());
}
Also used : MultipartRequestFlowCase(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestFlowCase) MultipartRequestFlow(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.flow._case.MultipartRequestFlow) MatchV10(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.v10.grouping.MatchV10)

Example 25 with MultipartRequestBody

use of org.opendaylight.yang.gen.v1.urn.opendaylight.multipart.types.rev170112.multipart.request.MultipartRequestBody in project openflowplugin by opendaylight.

the class OF10StatsRequestInputFactory method serializeAggregateBody.

private void serializeAggregateBody(final MultipartRequestBody multipartRequestBody, final ByteBuf output) {
    MultipartRequestAggregateCase aggregateCase = (MultipartRequestAggregateCase) multipartRequestBody;
    MultipartRequestAggregate aggregate = aggregateCase.getMultipartRequestAggregate();
    OFSerializer<MatchV10> matchSerializer = registry.getSerializer(new MessageTypeKey<>(EncodeConstants.OF10_VERSION_ID, MatchV10.class));
    matchSerializer.serialize(aggregate.getMatchV10(), output);
    output.writeByte(aggregate.getTableId().shortValue());
    output.writeZero(PADDING_IN_MULTIPART_REQUEST_AGGREGATE_BODY);
    output.writeShort(aggregate.getOutPort().intValue());
}
Also used : MultipartRequestAggregate(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.aggregate._case.MultipartRequestAggregate) MatchV10(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.v10.grouping.MatchV10) MultipartRequestAggregateCase(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestAggregateCase)

Aggregations

MultipartType (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.MultipartType)10 Test (org.junit.Test)8 MultipartRequestInput (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartRequestInput)8 MultipartRequestBody (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.MultipartRequestBody)8 MultipartRequestDescCaseBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestDescCaseBuilder)3 MultipartRequestFlowCase (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestFlowCase)3 MultipartRequestQueueCase (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestQueueCase)3 MultipartRequestFlow (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.flow._case.MultipartRequestFlow)3 MultipartRequestQueue (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.queue._case.MultipartRequestQueue)3 Ipv4Address (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address)2 MacAddress (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress)2 MultipartRequestDesc (org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.multipart.request.multipart.request.body.MultipartRequestDesc)2 MultipartRequestPortDesc (org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.port.rev130925.multipart.request.multipart.request.body.MultipartRequestPortDesc)2 MultipartRequestFlowStats (org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.multipart.request.multipart.request.body.MultipartRequestFlowStats)2 MultipartRequestGroupDesc (org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.multipart.request.multipart.request.body.MultipartRequestGroupDesc)2 MultipartRequestGroupStats (org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.multipart.request.multipart.request.body.MultipartRequestGroupStats)2 MultipartRequestBody (org.opendaylight.yang.gen.v1.urn.opendaylight.multipart.types.rev170112.multipart.request.MultipartRequestBody)2 MatchV10 (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.v10.grouping.MatchV10)2 MatchV10Builder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.v10.grouping.MatchV10Builder)2 MultipartRequestAggregateCase (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestAggregateCase)2