Do not send group stats request if unsupported

Change-Id: I1f0665dd9badfc5d29cea49c3fca48688ca77bc0
This commit is contained in:
Laszlo Papp 2018-01-03 17:57:43 +00:00 committed by Thomas Vachuska
parent 256d92ba2c
commit c893b27a2c

View File

@ -65,6 +65,7 @@ import org.onosproject.openflow.controller.OpenFlowSwitchListener;
import org.onosproject.openflow.controller.RoleState;
import org.osgi.service.component.ComponentContext;
import org.projectfloodlight.openflow.protocol.OFBucketCounter;
import org.projectfloodlight.openflow.protocol.OFCapabilities;
import org.projectfloodlight.openflow.protocol.OFErrorMsg;
import org.projectfloodlight.openflow.protocol.OFErrorType;
import org.projectfloodlight.openflow.protocol.OFGroupDescStatsEntry;
@ -412,7 +413,7 @@ public class OpenFlowGroupProvider extends AbstractProvider implements GroupProv
if (sw == null) {
return;
}
if (isGroupSupported(sw)) {
if (isGroupSupported(sw) && sw.features().getCapabilities().contains(OFCapabilities.GROUP_STATS)) {
GroupStatsCollector gsc = new GroupStatsCollector(sw, groupPollInterval);
stopCollectorIfNeeded(collectors.put(dpid, gsc));
gsc.start();