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
Removal of a committer
[ric-plt/ricdms.git]
/
pkg
/
restful
/
restful.go
diff --git
a/pkg/restful/restful.go
b/pkg/restful/restful.go
index
cde52e1
..
4e6f7a1
100644
(file)
--- a/
pkg/restful/restful.go
+++ b/
pkg/restful/restful.go
@@
-30,6
+30,7
@@
import (
ch "gerrit.o-ran-sc.org/r/ric-plt/ricdms/pkg/charts"
dm "gerrit.o-ran-sc.org/r/ric-plt/ricdms/pkg/deploy"
ph "gerrit.o-ran-sc.org/r/ric-plt/ricdms/pkg/health"
ch "gerrit.o-ran-sc.org/r/ric-plt/ricdms/pkg/charts"
dm "gerrit.o-ran-sc.org/r/ric-plt/ricdms/pkg/deploy"
ph "gerrit.o-ran-sc.org/r/ric-plt/ricdms/pkg/health"
+ "gerrit.o-ran-sc.org/r/ric-plt/ricdms/pkg/models"
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"
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"
@@
-122,6
+123,12
@@
func (r *Restful) setupHandler() {
api.ExperimentPostCustomOnboardHandler = experiment.PostCustomOnboardHandlerFunc(func(pcop experiment.PostCustomOnboardParams) middleware.Responder {
ricdms.Logger.Debug("==> invoked custom onboarding")
api.ExperimentPostCustomOnboardHandler = experiment.PostCustomOnboardHandlerFunc(func(pcop experiment.PostCustomOnboardParams) middleware.Responder {
ricdms.Logger.Debug("==> invoked custom onboarding")
+ if pcop.Helmpkg == nil {
+ errString := "formdata not provided with key helmpkg"
+ return experiment.NewPostCustomOnboardInternalServerError().WithPayload(&models.ErrorMessage{
+ ErrorMessage: &errString,
+ })
+ }
defer pcop.Helmpkg.Close()
return r.rh.Onboarder.CustomOnboard(pcop.Helmpkg)
})
defer pcop.Helmpkg.Close()
return r.rh.Onboarder.CustomOnboard(pcop.Helmpkg)
})