Code Review
/
ric-plt
/
xapp-frame.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
New API version with additional structures and params
[ric-plt/xapp-frame.git]
/
pkg
/
restapi
/
operations
/
xapp_framework_api.go
diff --git
a/pkg/restapi/operations/xapp_framework_api.go
b/pkg/restapi/operations/xapp_framework_api.go
index
5c85580
..
10da039
100644
(file)
--- a/
pkg/restapi/operations/xapp_framework_api.go
+++ b/
pkg/restapi/operations/xapp_framework_api.go
@@
-20,7
+20,6
@@
import (
"github.com/go-openapi/swag"
"gerrit.o-ran-sc.org/r/ric-plt/xapp-frame/pkg/restapi/operations/common"
"github.com/go-openapi/swag"
"gerrit.o-ran-sc.org/r/ric-plt/xapp-frame/pkg/restapi/operations/common"
- "gerrit.o-ran-sc.org/r/ric-plt/xapp-frame/pkg/restapi/operations/control"
"gerrit.o-ran-sc.org/r/ric-plt/xapp-frame/pkg/restapi/operations/policy"
"gerrit.o-ran-sc.org/r/ric-plt/xapp-frame/pkg/restapi/operations/query"
"gerrit.o-ran-sc.org/r/ric-plt/xapp-frame/pkg/restapi/operations/report"
"gerrit.o-ran-sc.org/r/ric-plt/xapp-frame/pkg/restapi/operations/policy"
"gerrit.o-ran-sc.org/r/ric-plt/xapp-frame/pkg/restapi/operations/query"
"gerrit.o-ran-sc.org/r/ric-plt/xapp-frame/pkg/restapi/operations/report"
@@
-49,9
+48,6
@@
func NewXappFrameworkAPI(spec *loads.Document) *XappFrameworkAPI {
QueryGetAllSubscriptionsHandler: query.GetAllSubscriptionsHandlerFunc(func(params query.GetAllSubscriptionsParams) middleware.Responder {
return middleware.NotImplemented("operation QueryGetAllSubscriptions has not yet been implemented")
}),
QueryGetAllSubscriptionsHandler: query.GetAllSubscriptionsHandlerFunc(func(params query.GetAllSubscriptionsParams) middleware.Responder {
return middleware.NotImplemented("operation QueryGetAllSubscriptions has not yet been implemented")
}),
- ControlSubscribeControlHandler: control.SubscribeControlHandlerFunc(func(params control.SubscribeControlParams) middleware.Responder {
- return middleware.NotImplemented("operation ControlSubscribeControl has not yet been implemented")
- }),
PolicySubscribePolicyHandler: policy.SubscribePolicyHandlerFunc(func(params policy.SubscribePolicyParams) middleware.Responder {
return middleware.NotImplemented("operation PolicySubscribePolicy has not yet been implemented")
}),
PolicySubscribePolicyHandler: policy.SubscribePolicyHandlerFunc(func(params policy.SubscribePolicyParams) middleware.Responder {
return middleware.NotImplemented("operation PolicySubscribePolicy has not yet been implemented")
}),
@@
-93,8
+89,6
@@
type XappFrameworkAPI struct {
CommonUnsubscribeHandler common.UnsubscribeHandler
// QueryGetAllSubscriptionsHandler sets the operation handler for the get all subscriptions operation
QueryGetAllSubscriptionsHandler query.GetAllSubscriptionsHandler
CommonUnsubscribeHandler common.UnsubscribeHandler
// QueryGetAllSubscriptionsHandler sets the operation handler for the get all subscriptions operation
QueryGetAllSubscriptionsHandler query.GetAllSubscriptionsHandler
- // ControlSubscribeControlHandler sets the operation handler for the subscribe control operation
- ControlSubscribeControlHandler control.SubscribeControlHandler
// PolicySubscribePolicyHandler sets the operation handler for the subscribe policy operation
PolicySubscribePolicyHandler policy.SubscribePolicyHandler
// ReportSubscribeReportHandler sets the operation handler for the subscribe report operation
// PolicySubscribePolicyHandler sets the operation handler for the subscribe policy operation
PolicySubscribePolicyHandler policy.SubscribePolicyHandler
// ReportSubscribeReportHandler sets the operation handler for the subscribe report operation
@@
-170,10
+164,6
@@
func (o *XappFrameworkAPI) Validate() error {
unregistered = append(unregistered, "query.GetAllSubscriptionsHandler")
}
unregistered = append(unregistered, "query.GetAllSubscriptionsHandler")
}
- if o.ControlSubscribeControlHandler == nil {
- unregistered = append(unregistered, "control.SubscribeControlHandler")
- }
-
if o.PolicySubscribePolicyHandler == nil {
unregistered = append(unregistered, "policy.SubscribePolicyHandler")
}
if o.PolicySubscribePolicyHandler == nil {
unregistered = append(unregistered, "policy.SubscribePolicyHandler")
}
@@
-290,11
+280,6
@@
func (o *XappFrameworkAPI) initHandlerCache() {
}
o.handlers["GET"]["/subscriptions"] = query.NewGetAllSubscriptions(o.context, o.QueryGetAllSubscriptionsHandler)
}
o.handlers["GET"]["/subscriptions"] = query.NewGetAllSubscriptions(o.context, o.QueryGetAllSubscriptionsHandler)
- if o.handlers["POST"] == nil {
- o.handlers["POST"] = make(map[string]http.Handler)
- }
- o.handlers["POST"]["/subscriptions/control"] = control.NewSubscribeControl(o.context, o.ControlSubscribeControlHandler)
-
if o.handlers["POST"] == nil {
o.handlers["POST"] = make(map[string]http.Handler)
}
if o.handlers["POST"] == nil {
o.handlers["POST"] = make(map[string]http.Handler)
}