[VOL-4466] support multi onu sw section download
Change-Id: Iee29866f22a1b3de65aa257fdfaf46112d058c01
diff --git a/internal/pkg/core/openolt.go b/internal/pkg/core/openolt.go
index 650a310..3665cbd 100644
--- a/internal/pkg/core/openolt.go
+++ b/internal/pkg/core/openolt.go
@@ -374,6 +374,17 @@
* OLT Inter-adapter service
*/
+// ProxyOmciRequests proxies an onu sw download OMCI request from the child adapter
+func (oo *OpenOLT) ProxyOmciRequests(ctx context.Context, request *ia.OmciMessages) (*empty.Empty, error) {
+ if handler := oo.getDeviceHandler(request.ParentDeviceId); handler != nil {
+ if err := handler.ProxyOmciRequests(ctx, request); err != nil {
+ return nil, errors.New(err.Error())
+ }
+ return &empty.Empty{}, nil
+ }
+ return nil, olterrors.NewErrNotFound("no-device-handler", log.Fields{"parent-device-id": request.ParentDeviceId, "child-device-id": request.ChildDeviceId}, nil).Log()
+}
+
// ProxyOmciRequest proxies an OMCI request from the child adapter
func (oo *OpenOLT) ProxyOmciRequest(ctx context.Context, request *ia.OmciMessage) (*empty.Empty, error) {
logger.Debugw(ctx, "proxy-omci-request", log.Fields{"request": request})