use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.MultipartRequestBody in project openflowplugin by opendaylight.
the class MultipartRequestInputFactoryTest method testMakeMultipartRequestInput_FLOW_13.
@Test
public void testMakeMultipartRequestInput_FLOW_13() throws Exception {
final MultipartType mpType = MultipartType.OFPMPFLOW;
final MultipartRequestInput mpRqInput = (MultipartRequestInput) MultipartRequestInputFactory.makeMultipartRequest(xid, ofVersion, mpType, false);
checkHeader(mpRqInput, mpType);
final MultipartRequestBody mpRqBody = mpRqInput.getMultipartRequestBody();
Assert.assertTrue(mpRqBody instanceof MultipartRequestFlowCase);
MultipartRequestFlow mpRq = ((MultipartRequestFlowCase) mpRqBody).getMultipartRequestFlow();
Assert.assertEquals(OFConstants.OFPTT_ALL, mpRq.getTableId());
Assert.assertEquals(OFConstants.OFPP_ANY, mpRq.getOutPort());
Assert.assertEquals(OFConstants.OFPG_ANY, mpRq.getOutGroup());
Assert.assertEquals(0, mpRq.getCookie().intValue());
Assert.assertEquals(0, mpRq.getCookieMask().intValue());
Assert.assertNotNull(mpRq.getMatch());
Assert.assertNull(mpRq.getMatchV10());
Assert.assertEquals(OxmMatchType.class, mpRq.getMatch().getType());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.MultipartRequestBody in project openflowplugin by opendaylight.
the class OF10StatsRequestInputAggregateFactoryTest method createMultipartRequestBody.
private static MultipartRequestBody createMultipartRequestBody() {
final MultipartRequestAggregateCaseBuilder caseBuilder = new MultipartRequestAggregateCaseBuilder();
final MultipartRequestAggregateBuilder aggregateBuilder = new MultipartRequestAggregateBuilder();
MatchV10Builder matchBuilder = new MatchV10Builder();
matchBuilder.setWildcards(new FlowWildcardsV10(false, false, false, false, false, false, false, false, false, false));
matchBuilder.setNwSrcMask((short) 32);
matchBuilder.setNwDstMask((short) 32);
matchBuilder.setInPort(51);
matchBuilder.setDlSrc(new MacAddress("00:01:02:03:04:05"));
matchBuilder.setDlDst(new MacAddress("05:04:03:02:01:00"));
matchBuilder.setDlVlan(52);
matchBuilder.setDlVlanPcp((short) 53);
matchBuilder.setDlType(54);
matchBuilder.setNwTos((short) 55);
matchBuilder.setNwProto((short) 56);
matchBuilder.setNwSrc(new Ipv4Address("10.0.0.1"));
matchBuilder.setNwDst(new Ipv4Address("10.0.0.2"));
matchBuilder.setTpSrc(57);
matchBuilder.setTpDst(58);
aggregateBuilder.setMatchV10(matchBuilder.build());
aggregateBuilder.setTableId((short) 42);
aggregateBuilder.setOutPort(6653L);
caseBuilder.setMultipartRequestAggregate(aggregateBuilder.build());
return caseBuilder.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.MultipartRequestBody in project openflowplugin by opendaylight.
the class OF10StatsRequestInputQueueFactoryTest method createMultipartRequestBody.
private static MultipartRequestBody createMultipartRequestBody() {
MultipartRequestQueueCaseBuilder caseBuilder = new MultipartRequestQueueCaseBuilder();
MultipartRequestQueueBuilder queueBuilder = new MultipartRequestQueueBuilder();
queueBuilder.setPortNo(15L);
queueBuilder.setQueueId(16L);
caseBuilder.setMultipartRequestQueue(queueBuilder.build());
return caseBuilder.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.MultipartRequestBody in project openflowplugin by opendaylight.
the class MultipartRequestInputFactoryTest method createRequestDesc.
private static MultipartRequestBody createRequestDesc() {
MultipartRequestDescCaseBuilder caseBuilder = new MultipartRequestDescCaseBuilder();
MultipartRequestDescBuilder builder = new MultipartRequestDescBuilder();
caseBuilder.setMultipartRequestDesc(builder.build());
return caseBuilder.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.MultipartRequestBody in project openflowplugin by opendaylight.
the class OF10StatsRequestInputDescFactoryTest method createMultipartRequestBody.
private static MultipartRequestBody createMultipartRequestBody() {
MultipartRequestDescCaseBuilder caseBuilder = new MultipartRequestDescCaseBuilder();
MultipartRequestDescBuilder descBuilder = new MultipartRequestDescBuilder();
descBuilder.setEmpty(true);
caseBuilder.setMultipartRequestDesc(descBuilder.build());
return caseBuilder.build();
}
Aggregations