[VOL-3311] Fix for ONU Delete and Re-Discovery
Change-Id: Ia5ae24a68889c9b160b55ad4af28667390cfa11c
diff --git a/internal/bbsim/devices/olt.go b/internal/bbsim/devices/olt.go
index 700fdeb..dbc226e 100644
--- a/internal/bbsim/devices/olt.go
+++ b/internal/bbsim/devices/olt.go
@@ -900,25 +900,9 @@
}).Infof("Failed to transition ONU to disabled state: %s", err.Error())
}
- time.Sleep(1 * time.Second)
-
// ONU Re-Discovery
if o.InternalState.Current() == "enabled" && pon.InternalState.Current() == "enabled" {
- if err := _onu.InternalState.Event("initialize"); err != nil {
- oltLogger.WithFields(log.Fields{
- "IntfId": _onu.PonPortID,
- "OnuSn": _onu.Sn(),
- "OnuId": _onu.ID,
- }).Infof("Failed to transition ONU to initialized state: %s", err.Error())
- }
-
- if err := _onu.InternalState.Event("discover"); err != nil {
- oltLogger.WithFields(log.Fields{
- "IntfId": _onu.PonPortID,
- "OnuSn": _onu.Sn(),
- "OnuId": _onu.ID,
- }).Infof("Failed to transition ONU to discovered state: %s", err.Error())
- }
+ go _onu.ReDiscoverOnu()
}
return new(openolt.Empty), nil