[VOL-4507] Keeping track of DP flows in PENDING_ADD/REMOVE status
This is not an issue during normal operations, but in case of close events it's needed to keep track of the current status.
An example is:
- port up -> flows are installed -> [PENDING_ADD is now added to the cpStatus map]
- port down -> flows needs to be removed -> flows are not found in the map, no op [flows are now found an will be removed]
Change-Id: I45190847539c4a55f5a78a2a043b9aa35cc3b855
diff --git a/impl/src/main/java/org/opencord/olt/impl/OltFlowService.java b/impl/src/main/java/org/opencord/olt/impl/OltFlowService.java
index 64d0745..f798e25 100644
--- a/impl/src/main/java/org/opencord/olt/impl/OltFlowService.java
+++ b/impl/src/main/java/org/opencord/olt/impl/OltFlowService.java
@@ -1030,6 +1030,10 @@
log.info("{} Data plane flows for subscriber {} on {} and service {}",
flowOpToString(action), si.id(), portWithName(port), uti.getServiceName());
+ ServiceKey sk = new ServiceKey(new AccessDevicePort(port), uti);
+ OltFlowsStatus status = action.equals(FlowOperation.ADD) ?
+ OltFlowsStatus.PENDING_ADD : OltFlowsStatus.PENDING_REMOVE;
+ updateConnectPointStatus(sk, null, status, null);
// upstream flows
MeterId usMeterId = oltMeterService