use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartRequestInput in project openflowplugin by opendaylight.
the class MultipartRequestInputFactoryTest method testMakeMultipartRequestInputMeterConfig.
@Test
public void testMakeMultipartRequestInputMeterConfig() throws Exception {
final MultipartType mpType = MultipartType.OFPMPMETERCONFIG;
final MultipartRequestInput mpRqInput = (MultipartRequestInput) MultipartRequestInputFactory.makeMultipartRequest(xid, ofVersion, mpType, false);
checkHeader(mpRqInput, mpType);
final MultipartRequestBody mpRqBody = mpRqInput.getMultipartRequestBody();
Assert.assertTrue(mpRqBody instanceof MultipartRequestMeterConfigCase);
MultipartRequestMeterConfig mpRq = ((MultipartRequestMeterConfigCase) mpRqBody).getMultipartRequestMeterConfig();
Assert.assertEquals(OFConstants.OFPM_ALL, mpRq.getMeterId().getValue());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartRequestInput in project openflowplugin by opendaylight.
the class MultipartRequestInputFactoryTest method testMakeMultipartRequestInputTableFeatures.
@Test
public void testMakeMultipartRequestInputTableFeatures() throws Exception {
final MultipartType mpType = MultipartType.OFPMPTABLEFEATURES;
final MultipartRequestInput mpRqInput = (MultipartRequestInput) MultipartRequestInputFactory.makeMultipartRequest(xid, ofVersion, mpType, false);
checkHeader(mpRqInput, mpType);
final MultipartRequestBody mpRqBody = mpRqInput.getMultipartRequestBody();
Assert.assertTrue(mpRqBody instanceof MultipartRequestTableFeaturesCase);
MultipartRequestTableFeatures mpRq = ((MultipartRequestTableFeaturesCase) mpRqBody).getMultipartRequestTableFeatures();
Assert.assertNotNull(mpRq);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartRequestInput in project openflowplugin by opendaylight.
the class MultipartRequestInputFactoryTest method testMakeMultipartRequestInput_DESC.
@Test
public void testMakeMultipartRequestInput_DESC() throws Exception {
MultipartType mpType = MultipartType.OFPMPDESC;
final MultipartRequestInput mpRqInput = (MultipartRequestInput) MultipartRequestInputFactory.makeMultipartRequest(xid, ofVersion, mpType, false);
checkHeader(mpRqInput, mpType);
checkEmptyBody(mpRqInput.getMultipartRequestBody().getImplementedInterface(), MultipartRequestDescCase.class);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartRequestInput in project openflowplugin by opendaylight.
the class MultipartRequestInputFactoryTest method testMakeMultipartRequestInputPortStats.
@Test
public void testMakeMultipartRequestInputPortStats() throws Exception {
final MultipartType mpType = MultipartType.OFPMPPORTSTATS;
final MultipartRequestInput mpRqInput = (MultipartRequestInput) MultipartRequestInputFactory.makeMultipartRequest(xid, ofVersion, mpType, false);
checkHeader(mpRqInput, mpType);
final MultipartRequestBody mpRqBody = mpRqInput.getMultipartRequestBody();
Assert.assertTrue(mpRqBody instanceof MultipartRequestPortStatsCase);
MultipartRequestPortStats mpRq = ((MultipartRequestPortStatsCase) mpRqBody).getMultipartRequestPortStats();
Assert.assertEquals(OFConstants.OFPP_ANY, mpRq.getPortNo());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartRequestInput in project openflowplugin by opendaylight.
the class MultipartRequestInputFactoryTest method testMakeMultipartRequestInputGroupDesc.
@Test
public void testMakeMultipartRequestInputGroupDesc() throws Exception {
MultipartType mpType = MultipartType.OFPMPGROUPDESC;
final MultipartRequestInput mpRqInput = (MultipartRequestInput) MultipartRequestInputFactory.makeMultipartRequest(xid, ofVersion, mpType, false);
checkHeader(mpRqInput, mpType);
checkEmptyBody(mpRqInput.getMultipartRequestBody().getImplementedInterface(), MultipartRequestGroupDescCase.class);
}
Aggregations