[VOL-2862] Installing eapol flows for ports across devices
Change-Id: I5b52280c89af421c7f71092419d8c49f9db1857c
diff --git a/app/src/main/java/org/opencord/olt/impl/Olt.java b/app/src/main/java/org/opencord/olt/impl/Olt.java
index 37aeafb..1e103e2 100644
--- a/app/src/main/java/org/opencord/olt/impl/Olt.java
+++ b/app/src/main/java/org/opencord/olt/impl/Olt.java
@@ -1004,9 +1004,9 @@
Collection<? extends UniTagInformation> uniTagInformationSet = programmedSubs.get(cp).value();
if (uniTagInformationSet == null || uniTagInformationSet.isEmpty()) {
if (!port.number().equals(PortNumber.LOCAL)) {
- log.info("eapol will be {} for dev/port updated {}/{}",
+ log.info("eapol will be {} for dev/port updated {}/{} with default vlan {}",
(port.isEnabled()) ? "added" : "removed",
- devId, port.number());
+ devId, port.number(), EAPOL_DEFAULT_VLAN);
oltFlowService.processEapolFilteringObjectives(devId, port.number(), defaultBpId,
null,
VlanId.vlanId(EAPOL_DEFAULT_VLAN),
diff --git a/app/src/main/java/org/opencord/olt/impl/OltFlowService.java b/app/src/main/java/org/opencord/olt/impl/OltFlowService.java
index 8e6ad0a..09746cc 100644
--- a/app/src/main/java/org/opencord/olt/impl/OltFlowService.java
+++ b/app/src/main/java/org/opencord/olt/impl/OltFlowService.java
@@ -28,6 +28,7 @@
import org.onosproject.core.CoreService;
import org.onosproject.mastership.MastershipService;
import org.onosproject.net.AnnotationKeys;
+import org.onosproject.net.ConnectPoint;
import org.onosproject.net.DeviceId;
import org.onosproject.net.Port;
import org.onosproject.net.PortNumber;
@@ -154,7 +155,7 @@
protected ApplicationId appId;
protected BaseInformationService<BandwidthProfileInformation> bpService;
protected BaseInformationService<SubscriberAndDeviceInformation> subsService;
- private Set<PortNumber> pendingAddEapol = Sets.newConcurrentHashSet();
+ private Set<ConnectPoint> pendingAddEapol = Sets.newConcurrentHashSet();
@Activate
public void activate(ComponentContext context) {
@@ -389,8 +390,9 @@
return;
}
+ ConnectPoint cp = new ConnectPoint(devId, portNumber);
if (install) {
- boolean added = pendingAddEapol.add(portNumber);
+ boolean added = pendingAddEapol.add(cp);
if (!added) {
if (filterFuture != null) {
log.warn("The eapol flow is processing for the port {}. Ignoring this request", portNumber);
@@ -398,7 +400,7 @@
}
return;
}
- log.info("portNumber added to pendingAddEapol map {}", portNumber);
+ log.info("connectPoint added to pendingAddEapol map {}", cp.toString());
}
DefaultFilteringObjective.Builder builder = DefaultFilteringObjective.builder();
@@ -452,7 +454,7 @@
if (filterFuture != null) {
filterFuture.complete(null);
}
- pendingAddEapol.remove(portNumber);
+ pendingAddEapol.remove(cp);
}
@Override
@@ -463,7 +465,7 @@
if (filterFuture != null) {
filterFuture.complete(error);
}
- pendingAddEapol.remove(portNumber);
+ pendingAddEapol.remove(cp);
}
});