X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=pkg%2Frestful%2Frestful.go;h=2670fb6c4b74524b8b5c470a9b7dfdde0a21f49f;hb=04897e6ba579f0cfd11453f589fc1fb24be4e820;hp=4255e2b02cb376d1ed1e87bab894e58ec2aada7c;hpb=d349bbcc5736a3f09091788cbe6afe9cdef116cd;p=ric-plt%2Fricdms.git diff --git a/pkg/restful/restful.go b/pkg/restful/restful.go index 4255e2b..2670fb6 100644 --- a/pkg/restful/restful.go +++ b/pkg/restful/restful.go @@ -24,9 +24,11 @@ import ( "os" ph "gerrit.o-ran-sc.org/r/ric-plt/ricdms/pkg/health" + po "gerrit.o-ran-sc.org/r/ric-plt/ricdms/pkg/onboard" "gerrit.o-ran-sc.org/r/ric-plt/ricdms/pkg/restapi" "gerrit.o-ran-sc.org/r/ric-plt/ricdms/pkg/restapi/operations" "gerrit.o-ran-sc.org/r/ric-plt/ricdms/pkg/restapi/operations/health" + "gerrit.o-ran-sc.org/r/ric-plt/ricdms/pkg/restapi/operations/onboard" "gerrit.o-ran-sc.org/r/ric-plt/ricdms/pkg/resthooks" "gerrit.o-ran-sc.org/r/ric-plt/ricdms/pkg/ricdms" "github.com/go-openapi/loads" @@ -37,6 +39,7 @@ func NewRestful() *Restful { r := &Restful{ rh: resthooks.NewResthook( ph.NewHealthChecker(), + po.NewOnboarder(), ), } r.setupHandler() @@ -57,6 +60,12 @@ func (r *Restful) setupHandler() { return resp }) + api.OnboardPostOnboardxAppsHandler = onboard.PostOnboardxAppsHandlerFunc(func(poap onboard.PostOnboardxAppsParams) middleware.Responder { + ricdms.Logger.Debug("==> onboard API invoked.") + resp := r.rh.OnBoard(poap.Body) + return resp + }) + r.api = api }