VOL-3727 Support in OLT adapter to send periodic onu stats and gem stats
If enableOnuStats and enableGemStats flags are set, olt adapter collects these stats from agent and sends kpis to kafka. Default values are false.
Change-Id: Ifa96140518921d3d79118118a971d77c798dc2ab
diff --git a/internal/pkg/core/openolt.go b/internal/pkg/core/openolt.go
index a22aac4..49c5675 100644
--- a/internal/pkg/core/openolt.go
+++ b/internal/pkg/core/openolt.go
@@ -51,6 +51,8 @@
HeartbeatFailReportInterval time.Duration
GrpcTimeoutInterval time.Duration
lockDeviceHandlersMap sync.RWMutex
+ enableONUStats bool
+ enableGemStats bool
}
//NewOpenOLT returns a new instance of OpenOLT
@@ -73,6 +75,8 @@
openOLT.GrpcTimeoutInterval = cfg.GrpcTimeoutInterval
openOLT.lockDeviceHandlersMap = sync.RWMutex{}
openOLT.configManager = cm
+ openOLT.enableONUStats = cfg.EnableONUStats
+ openOLT.enableGemStats = cfg.EnableGEMStats
return &openOLT
}