Add intid to GetOnuByID
Change-Id: Ibe18e674dd228aa6c8851fcff89d4ceadb2e427e
diff --git a/core/grpc_service.go b/core/grpc_service.go
index 7a66fc0..bc92483 100644
--- a/core/grpc_service.go
+++ b/core/grpc_service.go
@@ -120,7 +120,7 @@
}
func (s *Server) OnuPacketOut(c context.Context, packet *openolt.OnuPacket) (*openolt.Empty, error) {
- onu, _ := s.GetOnuByID(packet.OnuId)
+ onu, _ := s.GetOnuByID(packet.OnuId, packet.IntfId)
utils.LoggerWithOnu(onu).Debugf("OLT %d receives OnuPacketOut () to IF-ID:%d ONU-ID %d.", s.Olt.ID, packet.IntfId, packet.OnuId)
onuid := packet.OnuId
intfid := packet.IntfId
@@ -143,7 +143,7 @@
func (s *Server) FlowAdd(c context.Context, flow *openolt.Flow) (*openolt.Empty, error) {
logger.Debug("OLT %d receives FlowAdd() IntfID:%d OnuID:%d EType:%x GemPortID:%d", s.Olt.ID, flow.AccessIntfId, flow.OnuId, flow.Classifier.EthType, flow.GemportId)
- onu, err := s.GetOnuByID(uint32(flow.OnuId))
+ onu, err := s.GetOnuByID(uint32(flow.OnuId), uint32(flow.AccessIntfId))
if err == nil {
intfid := onu.IntfID
@@ -167,7 +167,7 @@
}
func (s *Server) FlowRemove(c context.Context, flow *openolt.Flow) (*openolt.Empty, error) {
- onu, _ := s.GetOnuByID(uint32(flow.OnuId))
+ onu, _ := s.GetOnuByID(uint32(flow.OnuId), uint32(flow.AccessIntfId))
utils.LoggerWithOnu(onu).WithFields(log.Fields{
"olt": s.Olt.ID,