import org.opendaylight.openflowplugin.api.openflow.device.DeviceContext;
import org.opendaylight.openflowplugin.api.openflow.device.RequestContextStack;
import org.opendaylight.openflowplugin.api.openflow.registry.flow.FlowRegistryKey;
+import org.opendaylight.openflowplugin.extension.api.path.MatchPath;
import org.opendaylight.openflowplugin.impl.registry.flow.FlowRegistryKeyFactory;
import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.ConvertorExecutor;
+import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.data.FlowStatsResponseConvertorData;
import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.data.VersionDatapathIdConvertorData;
import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.match.MatchReactor;
import org.opendaylight.yang.gen.v1.urn.opendaylight.direct.statistics.rev160511.GetFlowStatisticsInput;
* The Flow direct statistics service.
*/
public class FlowDirectStatisticsService extends AbstractDirectStatisticsService<GetFlowStatisticsInput, GetFlowStatisticsOutput> {
- private final VersionDatapathIdConvertorData data;
+ private final FlowStatsResponseConvertorData data;
/**
* Instantiates a new Flow direct statistics service.
*/
public FlowDirectStatisticsService(RequestContextStack requestContextStack, DeviceContext deviceContext, ConvertorExecutor convertorExecutor) {
super(MultipartType.OFPMPFLOW, requestContextStack, deviceContext, convertorExecutor);
- data = new VersionDatapathIdConvertorData(getVersion());
+ data = new FlowStatsResponseConvertorData(getVersion());
data.setDatapathId(getDatapathId());
+ data.setMatchPath(MatchPath.RPCFLOWSSTATISTICS_FLOWANDSTATISTICSMAPLIST_MATCH);
}
@Override
final FlowBuilder flowBuilder = new FlowBuilder(flowStatistics)
.addAugmentation(FlowStatisticsData.class, flowStatisticsDataBld.build());
- final FlowRegistryKey flowRegistryKey = FlowRegistryKeyFactory.create(flowBuilder.build());
+ final FlowRegistryKey flowRegistryKey = FlowRegistryKeyFactory.create(getVersion(), flowBuilder.build());
return getDeviceRegistry().getDeviceFlowRegistry().storeIfNecessary(flowRegistryKey);
}
}