mirror of
https://github.com/opennetworkinglab/onos.git
synced 2025-10-15 17:31:31 +02:00
Do not send group stats request if unsupported
Change-Id: I1f0665dd9badfc5d29cea49c3fca48688ca77bc0
This commit is contained in:
parent
256d92ba2c
commit
c893b27a2c
@ -65,6 +65,7 @@ import org.onosproject.openflow.controller.OpenFlowSwitchListener;
|
|||||||
import org.onosproject.openflow.controller.RoleState;
|
import org.onosproject.openflow.controller.RoleState;
|
||||||
import org.osgi.service.component.ComponentContext;
|
import org.osgi.service.component.ComponentContext;
|
||||||
import org.projectfloodlight.openflow.protocol.OFBucketCounter;
|
import org.projectfloodlight.openflow.protocol.OFBucketCounter;
|
||||||
|
import org.projectfloodlight.openflow.protocol.OFCapabilities;
|
||||||
import org.projectfloodlight.openflow.protocol.OFErrorMsg;
|
import org.projectfloodlight.openflow.protocol.OFErrorMsg;
|
||||||
import org.projectfloodlight.openflow.protocol.OFErrorType;
|
import org.projectfloodlight.openflow.protocol.OFErrorType;
|
||||||
import org.projectfloodlight.openflow.protocol.OFGroupDescStatsEntry;
|
import org.projectfloodlight.openflow.protocol.OFGroupDescStatsEntry;
|
||||||
@ -412,7 +413,7 @@ public class OpenFlowGroupProvider extends AbstractProvider implements GroupProv
|
|||||||
if (sw == null) {
|
if (sw == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (isGroupSupported(sw)) {
|
if (isGroupSupported(sw) && sw.features().getCapabilities().contains(OFCapabilities.GROUP_STATS)) {
|
||||||
GroupStatsCollector gsc = new GroupStatsCollector(sw, groupPollInterval);
|
GroupStatsCollector gsc = new GroupStatsCollector(sw, groupPollInterval);
|
||||||
stopCollectorIfNeeded(collectors.put(dpid, gsc));
|
stopCollectorIfNeeded(collectors.put(dpid, gsc));
|
||||||
gsc.start();
|
gsc.start();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user