use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.MultipartType in project openflowplugin by opendaylight.
the class MultipartRequestInputFactoryTest method testMakeMultipartRequestInputGroupFeatures.
@Test
public void testMakeMultipartRequestInputGroupFeatures() throws Exception {
MultipartType mpType = MultipartType.OFPMPGROUPFEATURES;
final MultipartRequestInput mpRqInput = (MultipartRequestInput) MultipartRequestInputFactory.makeMultipartRequest(xid, ofVersion, mpType, false);
checkHeader(mpRqInput, mpType);
checkEmptyBody(mpRqInput.getMultipartRequestBody().getImplementedInterface(), MultipartRequestGroupFeaturesCase.class);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.MultipartType in project openflowplugin by opendaylight.
the class MultipartRequestInputFactoryTest method testMakeMultipartRequestInputExperimenter.
@Test
public void testMakeMultipartRequestInputExperimenter() throws Exception {
MultipartType mpType = MultipartType.OFPMPEXPERIMENTER;
final MultipartRequestInput mpRqInput = (MultipartRequestInput) MultipartRequestInputFactory.makeMultipartRequest(xid, ofVersion, mpType, false);
checkHeader(mpRqInput, mpType);
checkEmptyBody(mpRqInput.getMultipartRequestBody().getImplementedInterface(), MultipartRequestExperimenterCase.class);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.MultipartType in project openflowplugin by opendaylight.
the class MultipartRequestInputFactoryTest method testMakeMultipartRequestInputGroup.
@Test
public void testMakeMultipartRequestInputGroup() throws Exception {
final MultipartType mpType = MultipartType.OFPMPGROUP;
final MultipartRequestInput mpRqInput = (MultipartRequestInput) MultipartRequestInputFactory.makeMultipartRequest(xid, ofVersion, mpType, false);
checkHeader(mpRqInput, mpType);
final MultipartRequestBody mpRqBody = mpRqInput.getMultipartRequestBody();
Assert.assertTrue(mpRqBody instanceof MultipartRequestGroupCase);
MultipartRequestGroup mpRq = ((MultipartRequestGroupCase) mpRqBody).getMultipartRequestGroup();
Assert.assertEquals(OFConstants.OFPG_ALL, mpRq.getGroupId().getValue());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.MultipartType 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.common.types.rev130731.MultipartType in project openflowplugin by opendaylight.
the class MultipartRequestInputFactoryTest method testMakeMultipartRequestInputPortDesc.
@Test
public void testMakeMultipartRequestInputPortDesc() throws Exception {
MultipartType mpType = MultipartType.OFPMPPORTDESC;
final MultipartRequestInput mpRqInput = (MultipartRequestInput) MultipartRequestInputFactory.makeMultipartRequest(xid, ofVersion, mpType, false);
checkHeader(mpRqInput, mpType);
checkEmptyBody(mpRqInput.getMultipartRequestBody().getImplementedInterface(), MultipartRequestPortDescCase.class);
}
Aggregations