VOL-3881: Make OMCI timeout value configurable
Change-Id: I8286e80ff95f8dba5adc20af4b8a71566da671fb
diff --git a/internal/pkg/onuadaptercore/openonu.go b/internal/pkg/onuadaptercore/openonu.go
index 3f98031..10281cf 100644
--- a/internal/pkg/onuadaptercore/openonu.go
+++ b/internal/pkg/onuadaptercore/openonu.go
@@ -70,6 +70,7 @@
pDownloadManager *adapterDownloadManager
metricsEnabled bool
mibAuditInterval time.Duration
+ omciTimeout int // in seconds
}
//NewOpenONUAC returns a new instance of OpenONU_AC
@@ -102,6 +103,8 @@
//openOnuAc.GrpcTimeoutInterval = cfg.GrpcTimeoutInterval
openOnuAc.metricsEnabled = cfg.MetricsEnabled
openOnuAc.mibAuditInterval = cfg.MibAuditInterval
+ // since consumers of OMCI timeout value everywhere in code is in "int seconds", do this useful conversion
+ openOnuAc.omciTimeout = int(cfg.OmciTimeout.Seconds())
openOnuAc.pSupportedFsms = &OmciDeviceFsms{
"mib-synchronizer": {