use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.aggregate._case.MultipartRequestAggregate in project openflowplugin by opendaylight.
the class FlowCreatorUtilTest method testSetWildcardedFlowMatch_.
/**
* Test method for
* {@link FlowCreatorUtil#setWildcardedFlowMatch(short version, MultipartRequestAggregateBuilder aggregateBuilder)}.
*/
@Test
public void testSetWildcardedFlowMatch_() {
MultipartRequestAggregateBuilder multipartRequestAggregateBuilder = new MultipartRequestAggregateBuilder();
FlowCreatorUtil.setWildcardedFlowMatch(OFConstants.OFP_VERSION_1_0, multipartRequestAggregateBuilder);
MultipartRequestAggregate multipartRequestAggregate = multipartRequestAggregateBuilder.build();
assertMatch(multipartRequestAggregate.getMatchV10());
multipartRequestAggregateBuilder = new MultipartRequestAggregateBuilder();
FlowCreatorUtil.setWildcardedFlowMatch(OFConstants.OFP_VERSION_1_3, multipartRequestAggregateBuilder);
multipartRequestAggregate = multipartRequestAggregateBuilder.build();
assertMatch(multipartRequestAggregate.getMatch());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.aggregate._case.MultipartRequestAggregate 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);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.aggregate._case.MultipartRequestAggregate 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());
}
Aggregations