SEBA-663 VOLTHA 1.7 support in BBSim
Error handling in FlowRemove()
Error handling in getGemPortId
Update README for supporting VOLTHA 1.7
Change-Id: Ib9e76282f8bdf2b7b66bbf745521bca31cd4a219
diff --git a/core/grpc_service.go b/core/grpc_service.go
index 69dadaa..c030c18 100644
--- a/core/grpc_service.go
+++ b/core/grpc_service.go
@@ -213,13 +213,14 @@
// FlowRemove should handle flow deletion from datapath
func (s *Server) FlowRemove(c context.Context, flow *openolt.Flow) (*openolt.Empty, error) {
- onu, _ := s.GetOnuByID(uint32(flow.OnuId), uint32(flow.AccessIntfId))
-
- utils.LoggerWithOnu(onu).WithFields(log.Fields{
- "olt": s.Olt.ID,
- "c_tag": flow.Action.IVid,
- }).Debug("OLT receives FlowRemove().")
-
+ logger.Debug("OLT %d receives FlowRemove()", s.Olt.ID)
+ onu, err := s.GetOnuByID(uint32(flow.OnuId), uint32(flow.AccessIntfId))
+ if err == nil{
+ utils.LoggerWithOnu(onu).WithFields(log.Fields{
+ "olt": s.Olt.ID,
+ "c_tag": flow.Action.IVid,
+ }).Debug("OLT receives FlowRemove().")
+ }
return new(openolt.Empty), nil
}