SEBA-506 BBSIM - omci handler for new TP flows
BBSim changed the way to get GemPortID.

Change-Id: Ie8a2d7c4b41204f71da7a3fa97e90cfea10295fc
diff --git a/core/grpc_service.go b/core/grpc_service.go
index 5f927d9..7a66fc0 100644
--- a/core/grpc_service.go
+++ b/core/grpc_service.go
@@ -142,12 +142,13 @@
 }
 
 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:.", s.Olt.ID, flow.AccessIntfId, flow.OnuId, flow.Classifier.EthType)
+	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))
 
 	if err == nil {
 		intfid := onu.IntfID
 		onuid := onu.OnuID
+		onu.GemportID = uint16(flow.GemportId)
 
 		utils.LoggerWithOnu(onu).WithFields(log.Fields{
 			"olt":   s.Olt.ID,
@@ -156,11 +157,10 @@
 
 		if flow.Classifier.EthType == uint32(layers.EthernetTypeEAPOL) {
 			omcistate := omci.GetOnuOmciState(onu.IntfID, onu.OnuID)
-			if omcistate == omci.DONE {
-				s.updateOnuIntState(intfid, onuid, device.ONU_OMCIACTIVE)
-			} else {
-				logger.Error("FlowAdd() OMCI state %d is not \"DONE\"", omci.GetOnuOmciState(onu.OnuID, onu.IntfID))
+			if omcistate != omci.DONE {
+				logger.Warn("FlowAdd() OMCI state %d is not \"DONE\"", omci.GetOnuOmciState(onu.OnuID, onu.IntfID))
 			}
+			s.updateOnuIntState(intfid, onuid, device.ONU_OMCIACTIVE)
 		}
 	}
 	return new(openolt.Empty), nil