Merge "BUG-4117: preparation for FlowCapableNode notification impl."
[openflowplugin.git] / openflowplugin-impl / src / main / java / org / opendaylight / openflowplugin / impl / statistics / services / FlowsInTableService.java
index 1d812694de4ccb8ebe3cedc62fd80764d75e7ef8..f063b2ef51d69511fc26f61ba722e84eabb3e2a6 100644 (file)
@@ -40,7 +40,12 @@ public final class FlowsInTableService extends AbstractCompatibleStatService<Get
     protected OfHeader buildRequest(final Xid xid, final GetFlowStatisticsFromFlowTableInput input) {
         final MultipartRequestFlowCaseBuilder multipartRequestFlowCaseBuilder = new MultipartRequestFlowCaseBuilder();
         final MultipartRequestFlowBuilder mprFlowRequestBuilder = new MultipartRequestFlowBuilder();
-        mprFlowRequestBuilder.setTableId(input.getTableId());
+
+        if (input.getTableId() != null) {
+            mprFlowRequestBuilder.setTableId(input.getTableId());
+        } else {
+            mprFlowRequestBuilder.setTableId(OFConstants.OFPTT_ALL);
+        }
 
         if (input.getOutPort() != null) {
             mprFlowRequestBuilder.setOutPort(input.getOutPort().longValue());