[VOL-2778] Fixing reboots
Change-Id: I9751a6a9abd83a1a45a809b1c32834d60ec22254
diff --git a/internal/bbsim/devices/olt.go b/internal/bbsim/devices/olt.go
index eff9c86..49ea3fe 100644
--- a/internal/bbsim/devices/olt.go
+++ b/internal/bbsim/devices/olt.go
@@ -277,20 +277,12 @@
return err
}
+ // PONs are already handled in the Disable call
for _, pon := range olt.Pons {
- msg := Message{
- Type: PonIndication,
- Data: PonIndicationMessage{
- OperState: DOWN,
- PonPortID: pon.ID,
- },
- }
- o.channel <- msg
-
+ // ONUs are not automatically disabled when a PON goes down
+ // as it's possible that it's an admin down and in that case the ONUs need to keep their state
for _, onu := range pon.Onus {
- if onu.InternalState.Current() != "initialized" {
- _ = onu.InternalState.Event("disable")
- }
+ _ = onu.InternalState.Event("disable")
}
}
@@ -611,7 +603,7 @@
oltLogger.WithFields(log.Fields{
"IntfId": pon.ID,
"OperState": pon.OperState.Current(),
- }).Debug("Sent Indication_IntfInd")
+ }).Debug("Sent Indication_IntfInd for PON")
// Send IntfOperIndication for PON port
operData := &openolt.Indication_IntfOperInd{IntfOperInd: &openolt.IntfOperIndication{
@@ -1275,7 +1267,7 @@
"IntfId": onu.PonPortID,
"OnuId": onu.ID,
"OnuSn": onu.Sn(),
- }).Info("Received OnuPacketOut")
+ }).Trace("Received OnuPacketOut")
rawpkt := gopacket.NewPacket(onuPkt.Pkt, layers.LayerTypeEthernet, gopacket.Default)
pktType, _ := packetHandlers.IsEapolOrDhcp(rawpkt)