[VOL-2364] handle sub-sequent onuDiscoveryIndication

If ChildDeviceDetected times out then the device never receives the
"enable" call. With this patch we are allowing the device to send a new
discovery indication to retry the process (the OpenOlt agent keeps
sending discovery until an "enable" call is received for that device)

Change-Id: I6a2f5d5e9b0a001361bdca1feb14ca22cf092138
diff --git a/vendor/github.com/opencord/voltha-lib-go/v3/pkg/adapters/common/utils.go b/vendor/github.com/opencord/voltha-lib-go/v3/pkg/adapters/common/utils.go
index d3c562a..b782ebe 100644
--- a/vendor/github.com/opencord/voltha-lib-go/v3/pkg/adapters/common/utils.go
+++ b/vendor/github.com/opencord/voltha-lib-go/v3/pkg/adapters/common/utils.go
@@ -17,6 +17,9 @@
 
 import (
 	"fmt"
+	"github.com/opencord/voltha-lib-go/v3/pkg/log"
+	ic "github.com/opencord/voltha-protos/v3/go/inter_container"
+	"google.golang.org/grpc/codes"
 	"math/rand"
 	"time"
 )
@@ -71,3 +74,17 @@
 	}
 	return string(b)
 }
+
+func ICProxyErrorCodeToGrpcErrorCode(icErr ic.ErrorCodeCodes) codes.Code {
+	switch icErr {
+	case ic.ErrorCode_INVALID_PARAMETERS:
+		return codes.InvalidArgument
+	case ic.ErrorCode_UNSUPPORTED_REQUEST:
+		return codes.Unavailable
+	case ic.ErrorCode_DEADLINE_EXCEEDED:
+		return codes.DeadlineExceeded
+	default:
+		log.Warnw("cannnot-map-ic-error-code-to-grpc-error-code", log.Fields{"err": icErr})
+		return codes.Internal
+	}
+}