[VOL-5303]:Avoid reconciling the MEs with ONT
[VOL-5331] - Voltha DT PODTesets :: E2E pingtest fail
Change-Id: I7b105720435b970923b3ce86a7d37ed98a06c911
Signed-off-by: Praneeth Kumar Nalmas <praneeth.nalmas@radisys.com>
diff --git a/internal/pkg/core/device_handler.go b/internal/pkg/core/device_handler.go
index 929d117..c5e03c4 100755
--- a/internal/pkg/core/device_handler.go
+++ b/internal/pkg/core/device_handler.go
@@ -2032,25 +2032,26 @@
return err
}
_ = dh.ReasonUpdate(ctx, cmn.DrStartingOpenomci, !dh.IsReconciling() || dh.IsReconcilingReasonUpdate())
+ if !dh.IsReconciling() && !dh.GetSkipOnuConfigEnabled() {
+ /* this might be a good time for Omci Verify message? */
+ verifyExec := make(chan bool)
+ omciVerify := otst.NewOmciTestRequest(log.WithSpanFromContext(context.TODO(), ctx),
+ dh.device.Id, pDevEntry.PDevOmciCC, false,
+ true, true) //exclusive and allowFailure (anyway not yet checked)
+ omciVerify.PerformOmciTest(log.WithSpanFromContext(context.TODO(), ctx), verifyExec)
- /* this might be a good time for Omci Verify message? */
- verifyExec := make(chan bool)
- omciVerify := otst.NewOmciTestRequest(log.WithSpanFromContext(context.TODO(), ctx),
- dh.device.Id, pDevEntry.PDevOmciCC, false,
- true, true) //exclusive and allowFailure (anyway not yet checked)
- omciVerify.PerformOmciTest(log.WithSpanFromContext(context.TODO(), ctx), verifyExec)
-
- /* give the handler some time here to wait for the OMCi verification result
- after Timeout start and try MibUpload FSM anyway
- (to prevent stopping on just not supported OMCI verification from ONU) */
- select {
- case <-time.After(((cmn.CDefaultRetries+1)*otst.CTestRequestOmciTimeout + 1) * time.Second):
- logger.Warnw(ctx, "omci start-verification timed out (continue normal)", log.Fields{"device-id": dh.DeviceID})
- case testresult := <-verifyExec:
- logger.Infow(ctx, "Omci start verification done", log.Fields{"device-id": dh.DeviceID, "result": testresult})
- case <-dh.deviceDeleteCommChan:
- logger.Warnw(ctx, "Deleting device, stopping the omci test activity", log.Fields{"device-id": dh.DeviceID})
- return nil
+ /* give the handler some time here to wait for the OMCi verification result
+ after Timeout start and try MibUpload FSM anyway
+ (to prevent stopping on just not supported OMCI verification from ONU) */
+ select {
+ case <-time.After(((cmn.CDefaultRetries+1)*otst.CTestRequestOmciTimeout + 1) * time.Second):
+ logger.Warnw(ctx, "omci start-verification timed out (continue normal)", log.Fields{"device-id": dh.DeviceID})
+ case testresult := <-verifyExec:
+ logger.Infow(ctx, "Omci start verification done", log.Fields{"device-id": dh.DeviceID, "result": testresult})
+ case <-dh.deviceDeleteCommChan:
+ logger.Warnw(ctx, "Deleting device, stopping the omci test activity", log.Fields{"device-id": dh.DeviceID})
+ return nil
+ }
}
/* In py code it looks earlier (on activate ..)
@@ -4205,7 +4206,7 @@
}()
}
dh.mutexReconcilingFlag.Lock()
- if skipOnuConfig {
+ if skipOnuConfig || dh.GetSkipOnuConfigEnabled() {
dh.reconciling = cSkipOnuConfigReconciling
} else {
dh.reconciling = cOnuConfigReconciling
@@ -4677,6 +4678,11 @@
return dh.pOpenOnuAc.ExtendedOmciSupportEnabled
}
+// GetExtendedOmciSupportEnabled - TODO: add comment
+func (dh *deviceHandler) GetSkipOnuConfigEnabled() bool {
+ return dh.pOpenOnuAc.skipOnuConfig
+}
+
// InitPmConfigs - TODO: add comment
func (dh *deviceHandler) InitPmConfigs() {
dh.pmConfigs = &voltha.PmConfigs{}