import org.opendaylight.openflowplugin.api.openflow.device.DeviceContext;
import org.opendaylight.openflowplugin.api.openflow.device.RequestContextStack;
import org.opendaylight.openflowplugin.api.openflow.device.Xid;
-import org.opendaylight.openflowplugin.impl.services.RequestInputUtils;
-import org.opendaylight.openflowplugin.impl.services.ServiceException;
+import org.opendaylight.openflowplugin.impl.services.util.RequestInputUtils;
import org.opendaylight.openflowplugin.impl.statistics.services.compatibility.AbstractCompatibleStatService;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Counter32;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.transaction.rev150304.TransactionId;
final class MeterFeaturesService
extends AbstractCompatibleStatService<GetMeterFeaturesInput, GetMeterFeaturesOutput, MeterFeaturesUpdated> {
- private static final MultipartRequestMeterFeaturesCase METER_FEATURES_CASE = new MultipartRequestMeterFeaturesCaseBuilder().build();
+ private static final MultipartRequestMeterFeaturesCase METER_FEATURES_CASE =
+ new MultipartRequestMeterFeaturesCaseBuilder().build();
- public MeterFeaturesService(RequestContextStack requestContextStack, DeviceContext deviceContext, AtomicLong compatibilityXidSeed) {
+ MeterFeaturesService(RequestContextStack requestContextStack,
+ DeviceContext deviceContext,
+ AtomicLong compatibilityXidSeed) {
super(requestContextStack, deviceContext, compatibilityXidSeed);
}
@Override
- protected OfHeader buildRequest(final Xid xid, final GetMeterFeaturesInput input) throws ServiceException {
+ protected OfHeader buildRequest(final Xid xid, final GetMeterFeaturesInput input) {
MultipartRequestInputBuilder mprInput =
RequestInputUtils.createMultipartHeader(MultipartType.OFPMPMETERFEATURES, xid.getValue(), getVersion());
mprInput.setMultipartRequestBody(METER_FEATURES_CASE);
notification.setMoreReplies(Boolean.FALSE);
notification.setTransactionId(emulatedTxId);
- MultipartReplyMeterFeaturesCase caseBody = (MultipartReplyMeterFeaturesCase) result.get(0).getMultipartReplyBody();
+ MultipartReplyMeterFeaturesCase caseBody =
+ (MultipartReplyMeterFeaturesCase) result.get(0).getMultipartReplyBody();
MultipartReplyMeterFeatures replyBody = caseBody.getMultipartReplyMeterFeatures();
notification.setMaxBands(replyBody.getMaxBands());
notification.setMaxColor(replyBody.getMaxColor());
}
@VisibleForTesting
- protected List<Class<? extends MeterBand>> extractSupportedMeterBand(MultipartReplyMeterFeatures replyBody, MeterBandTypeBitmap bandTypes) {
+ protected List<Class<? extends MeterBand>> extractSupportedMeterBand(MultipartReplyMeterFeatures replyBody,
+ MeterBandTypeBitmap bandTypes) {
List<Class<? extends MeterBand>> supportedMeterBand = new ArrayList<>();
if (bandTypes.isOFPMBTDROP()) {
supportedMeterBand.add(MeterBandDrop.class);