VOL-1282 BBSim - Add reboot-related features
Change-Id: I9a1ce85eae18e42361956942aaf8d8fae0cc0802
diff --git a/core/openolt_service.go b/core/openolt_service.go
index 3f0c311..ffded4d 100644
--- a/core/openolt_service.go
+++ b/core/openolt_service.go
@@ -34,12 +34,14 @@
func sendIntfInd(stream openolt.Openolt_EnableIndicationServer, olt *device.Olt) error {
for i := uint32(0); i < olt.NumPonIntf+olt.NumNniIntf; i++ {
intf := olt.Intfs[i]
- data := &openolt.Indication_IntfInd{&openolt.IntfIndication{IntfId: intf.IntfID, OperState: intf.OperState}}
- if err := stream.Send(&openolt.Indication{Data: data}); err != nil {
- log.Printf("Failed to send Intf [id: %d] indication : %v\n", i, err)
- return err
+ if intf.Type == "pon"{ // There is no need to send IntfInd for NNI
+ data := &openolt.Indication_IntfInd{&openolt.IntfIndication{IntfId: intf.IntfID, OperState: intf.OperState}}
+ if err := stream.Send(&openolt.Indication{Data: data}); err != nil {
+ log.Printf("Failed to send Intf [id: %d] indication : %v\n", i, err)
+ return err
+ }
+ log.Printf("SendIntfInd olt:%d intf:%d (%s)\n", olt.ID, intf.IntfID, intf.Type)
}
- log.Printf("SendIntfInd olt:%d intf:%d (%s)\n", olt.ID, intf.IntfID, intf.Type)
}
return nil
}