X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=pkg%2Frestful%2Frestful.go;h=acfd65afce18952b3115dbfaff5cce30dfca346d;hb=refs%2Fchanges%2F89%2F9189%2F2;hp=4255e2b02cb376d1ed1e87bab894e58ec2aada7c;hpb=cd6cc6ad28c32ccce6a2833917f7408a798e45fc;p=ric-plt%2Fricdms.git diff --git a/pkg/restful/restful.go b/pkg/restful/restful.go index 4255e2b..acfd65a 100644 --- a/pkg/restful/restful.go +++ b/pkg/restful/restful.go @@ -23,10 +23,14 @@ import ( "log" "os" + ch "gerrit.o-ran-sc.org/r/ric-plt/ricdms/pkg/charts" 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/charts" "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 +41,8 @@ func NewRestful() *Restful { r := &Restful{ rh: resthooks.NewResthook( ph.NewHealthChecker(), + po.NewOnboarder(), + ch.NewChartmgr(), ), } r.setupHandler() @@ -57,6 +63,18 @@ 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 + }) + + api.ChartsGetChartsListHandler = charts.GetChartsListHandlerFunc(func(param charts.GetChartsListParams) middleware.Responder { + ricdms.Logger.Debug("==> GetChartList") + resp := r.rh.GetCharts() + return resp + }) + r.api = api }