Adding remove flows on disable flag
Change-Id: Ia31266c3a959bb1049051de7c6e108e3a6cc6d20
diff --git a/internal/pkg/application/vnets.go b/internal/pkg/application/vnets.go
index 85de6dc..dffbb00 100644
--- a/internal/pkg/application/vnets.go
+++ b/internal/pkg/application/vnets.go
@@ -817,8 +817,12 @@
// PortDownInd : When the port status changes to down, we delete all configured flows
// The same indication is also passed to the services enqueued for them
// to take appropriate actions
-func (vpv *VoltPortVnet) PortDownInd(cntx context.Context, device string, port string) {
+func (vpv *VoltPortVnet) PortDownInd(cntx context.Context, device string, port string, nbRequest bool) {
+ if !nbRequest && !GetApplication().OltFlowServiceConfig.RemoveFlowsOnDisable {
+ logger.Info(ctx, "VPV Port DOWN Ind, Not deleting flows since RemoveOnDisable is disabled")
+ return
+ }
logger.Infow(ctx, "VPV Port DOWN Ind, deleting all flows for services",
log.Fields{"service count": vpv.servicesCount.Load()})