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
/
resthooks
/
resthooks.go
diff --git
a/pkg/resthooks/resthooks.go
b/pkg/resthooks/resthooks.go
index
500b32e
..
072fa1d
100644
(file)
--- a/
pkg/resthooks/resthooks.go
+++ b/
pkg/resthooks/resthooks.go
@@
-22,14
+22,17
@@
package resthooks
import (
ph "gerrit.o-ran-sc.org/r/ric-plt/ricdms/pkg/health"
import (
ph "gerrit.o-ran-sc.org/r/ric-plt/ricdms/pkg/health"
+ "gerrit.o-ran-sc.org/r/ric-plt/ricdms/pkg/models"
+ "gerrit.o-ran-sc.org/r/ric-plt/ricdms/pkg/onboard"
"gerrit.o-ran-sc.org/r/ric-plt/ricdms/pkg/restapi/operations/health"
"gerrit.o-ran-sc.org/r/ric-plt/ricdms/pkg/ricdms"
"github.com/go-openapi/runtime/middleware"
)
"gerrit.o-ran-sc.org/r/ric-plt/ricdms/pkg/restapi/operations/health"
"gerrit.o-ran-sc.org/r/ric-plt/ricdms/pkg/ricdms"
"github.com/go-openapi/runtime/middleware"
)
-func NewResthook(h ph.IHealthChecker) *Resthook {
+func NewResthook(h ph.IHealthChecker
, o onboard.IOnboarder
) *Resthook {
return &Resthook{
HealthChecker: h,
return &Resthook{
HealthChecker: h,
+ Onboarder: o,
}
}
}
}
@@
-37,3
+40,8
@@
func (rh *Resthook) GetDMSHealth() (resp middleware.Responder) {
ricdms.Logger.Debug("healthchecker : %v\n", rh.HealthChecker)
return health.NewGetHealthCheckOK().WithPayload(rh.HealthChecker.GetStatus())
}
ricdms.Logger.Debug("healthchecker : %v\n", rh.HealthChecker)
return health.NewGetHealthCheckOK().WithPayload(rh.HealthChecker.GetStatus())
}
+
+func (rh *Resthook) OnBoard(params *models.Descriptor) (resp middleware.Responder) {
+ ricdms.Logger.Debug("onboarder: invoked")
+ return rh.Onboarder.Onboard(params)
+}