[VOL-3493] Wrong Connectstatus of openonu go adaptor after disable device
[VOL-3495] Wrong reason of openonu go adaptor after dis-enable device
Change-Id: I64265e31bedf9264e403e94ce54e7a2ea6869f53
diff --git a/internal/pkg/onuadaptercore/openonu.go b/internal/pkg/onuadaptercore/openonu.go
index 61b52f3..b1994d7 100644
--- a/internal/pkg/onuadaptercore/openonu.go
+++ b/internal/pkg/onuadaptercore/openonu.go
@@ -316,8 +316,9 @@
// no point in pushing omci flows if the device isn't reachable
if device.ConnectStatus != voltha.ConnectStatus_REACHABLE ||
device.AdminState != voltha.AdminState_ENABLED {
- logger.Warnw("device disabled or offline - skipping flow-update", log.Fields{"deviceId": device.Id})
- return errors.New("non-matching device state")
+ logger.Warnw("device disabled or offline - skipping flow-update", log.Fields{"ConnectStatus": device.ConnectStatus,
+ "AdminState": device.AdminState, "deviceId": device.Id})
+ return fmt.Errorf("non-matching device state: %s", device.Id)
}
// For now, there is no support for group changes (as in the actual Py-adapter code)