[VOL-4701] Adding logs if disabling of UNI or POTS port fails while disabling the ONU
Change-Id: Ia06b621dea8550bacc31d30a0d0b39618888b9ee
diff --git a/internal/bbsim/devices/onu.go b/internal/bbsim/devices/onu.go
index 593be6a..bbed5d6 100644
--- a/internal/bbsim/devices/onu.go
+++ b/internal/bbsim/devices/onu.go
@@ -288,12 +288,26 @@
// disable the UNI ports
for _, uni := range o.UniPorts {
- _ = uni.Disable()
+ if err := uni.Disable(); err != nil {
+ onuLogger.WithFields(log.Fields{
+ "onuId": o.ID,
+ "OnuSn": o.Sn(),
+ "UniId": uni.GetID(),
+ "err": err,
+ }).Error("failed-to-disable-uni-port")
+ }
}
// disable the POTS UNI ports
for _, pots := range o.PotsPorts {
- _ = pots.Disable()
+ if err := pots.Disable(); err != nil {
+ onuLogger.WithFields(log.Fields{
+ "onuId": o.ID,
+ "OnuSn": o.Sn(),
+ "UniId": pots.GetID(),
+ "err": err,
+ }).Error("failed-to-disable-pots-port")
+ }
}
// verify all the flows removes are handled and