[VOL-4495] Do not remove NNI flows, they are only wiped out on device disconnect
Change-Id: I904def137485f66a86fa9241a98e7ddeda10f481
diff --git a/impl/src/main/java/org/opencord/olt/impl/Olt.java b/impl/src/main/java/org/opencord/olt/impl/Olt.java
index 747a0b4..af3eed8 100644
--- a/impl/src/main/java/org/opencord/olt/impl/Olt.java
+++ b/impl/src/main/java/org/opencord/olt/impl/Olt.java
@@ -852,8 +852,12 @@
}
} else {
if (oltDeviceService.isNniPort(device, port.number())) {
- // NOTE this may need to be handled on DEVICE_REMOVE as we don't disable the NNI
- oltFlowService.handleNniFlows(device, port, OltFlowService.FlowOperation.REMOVE);
+ // NOTE the NNI is only disabled if the OLT shuts down (reboot or failure).
+ // In that case the flows are purged anyway, so there's no need to deal with them,
+ // it would actually be counter-productive as the openflow connection is severed and they won't
+ // be correctly processed
+ log.debug("NNI port went down, " +
+ "ignoring event as flows will be removed in the generic device cleanup");
} else {
post(new AccessDeviceEvent(AccessDeviceEvent.Type.UNI_REMOVED, device.id(), port));
// NOTE we are assuming that if a subscriber has default eapol