[ONOS-7527] FIX for OfControllerImpl does not filter by device scheme in DeviceListener
Change-Id: If8c01c8bbc692a23c15435608f2a453e0299635d
(cherry picked from commit 86e0c564d3001bffe84ac4c3ef861b128b2b9477)
diff --git a/protocols/openflow/ctl/src/main/java/org/onosproject/openflow/controller/impl/OpenFlowControllerImpl.java b/protocols/openflow/ctl/src/main/java/org/onosproject/openflow/controller/impl/OpenFlowControllerImpl.java
index 05b68a4..974a71c 100644
--- a/protocols/openflow/ctl/src/main/java/org/onosproject/openflow/controller/impl/OpenFlowControllerImpl.java
+++ b/protocols/openflow/ctl/src/main/java/org/onosproject/openflow/controller/impl/OpenFlowControllerImpl.java
@@ -100,6 +100,7 @@
private static final String APP_ID = "org.onosproject.openflow-base";
private static final String DEFAULT_OFPORT = "6633,6653";
private static final int DEFAULT_WORKER_THREADS = 0;
+ protected static final String SCHEME = "of";
private static final Logger log =
LoggerFactory.getLogger(OpenFlowControllerImpl.class);
@@ -607,7 +608,8 @@
@Override
public boolean isRelevant(DeviceEvent event) {
- return event.subject().type() != CONTROLLER && event.type() == DEVICE_REMOVED;
+ return event.subject().type() != CONTROLLER && event.type() == DEVICE_REMOVED
+ && event.subject().id().uri().getScheme().equals(SCHEME);
}
@Override