Code Review
/
ric-plt
/
ricdms.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Implement Onboarding of xApp
[ric-plt/ricdms.git]
/
pkg
/
restful
/
restful.go
diff --git
a/pkg/restful/restful.go
b/pkg/restful/restful.go
index
4255e2b
..
2670fb6
100644
(file)
--- 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"
"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"
"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"
"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(),
r := &Restful{
rh: resthooks.NewResthook(
ph.NewHealthChecker(),
+ po.NewOnboarder(),
),
}
r.setupHandler()
),
}
r.setupHandler()
@@
-57,6
+60,12
@@
func (r *Restful) setupHandler() {
return resp
})
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
}
r.api = api
}