X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=pkg%2Frestapi%2Foperations%2Fxapp_framework_api.go;h=10da0397f3dd2d8963e3e8572421b7d7d2218f33;hb=c0df1232a53358f58807320c09fe55fcbb185cd5;hp=28f71f259b6bdfd1a568f8136fbfd908da3c3385;hpb=3895a8c8775ef96652e6473414fdd7366c59f404;p=ric-plt%2Fxapp-frame.git diff --git a/pkg/restapi/operations/xapp_framework_api.go b/pkg/restapi/operations/xapp_framework_api.go index 28f71f2..10da039 100644 --- a/pkg/restapi/operations/xapp_framework_api.go +++ b/pkg/restapi/operations/xapp_framework_api.go @@ -20,8 +20,8 @@ import ( "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" ) @@ -45,8 +45,8 @@ func NewXappFrameworkAPI(spec *loads.Document) *XappFrameworkAPI { CommonUnsubscribeHandler: common.UnsubscribeHandlerFunc(func(params common.UnsubscribeParams) middleware.Responder { return middleware.NotImplemented("operation CommonUnsubscribe has not yet been implemented") }), - ControlSubscribeControlHandler: control.SubscribeControlHandlerFunc(func(params control.SubscribeControlParams) middleware.Responder { - return middleware.NotImplemented("operation ControlSubscribeControl has not yet been implemented") + QueryGetAllSubscriptionsHandler: query.GetAllSubscriptionsHandlerFunc(func(params query.GetAllSubscriptionsParams) middleware.Responder { + return middleware.NotImplemented("operation QueryGetAllSubscriptions has not yet been implemented") }), PolicySubscribePolicyHandler: policy.SubscribePolicyHandlerFunc(func(params policy.SubscribePolicyParams) middleware.Responder { return middleware.NotImplemented("operation PolicySubscribePolicy has not yet been implemented") @@ -87,8 +87,8 @@ type XappFrameworkAPI struct { // CommonUnsubscribeHandler sets the operation handler for the unsubscribe operation CommonUnsubscribeHandler common.UnsubscribeHandler - // ControlSubscribeControlHandler sets the operation handler for the subscribe control operation - ControlSubscribeControlHandler control.SubscribeControlHandler + // QueryGetAllSubscriptionsHandler sets the operation handler for the get all subscriptions operation + QueryGetAllSubscriptionsHandler query.GetAllSubscriptionsHandler // PolicySubscribePolicyHandler sets the operation handler for the subscribe policy operation PolicySubscribePolicyHandler policy.SubscribePolicyHandler // ReportSubscribeReportHandler sets the operation handler for the subscribe report operation @@ -160,8 +160,8 @@ func (o *XappFrameworkAPI) Validate() error { unregistered = append(unregistered, "common.UnsubscribeHandler") } - if o.ControlSubscribeControlHandler == nil { - unregistered = append(unregistered, "control.SubscribeControlHandler") + if o.QueryGetAllSubscriptionsHandler == nil { + unregistered = append(unregistered, "query.GetAllSubscriptionsHandler") } if o.PolicySubscribePolicyHandler == nil { @@ -275,10 +275,10 @@ func (o *XappFrameworkAPI) initHandlerCache() { } o.handlers["DELETE"]["/subscriptions/{subscriptionId}"] = common.NewUnsubscribe(o.context, o.CommonUnsubscribeHandler) - if o.handlers["POST"] == nil { - o.handlers["POST"] = make(map[string]http.Handler) + if o.handlers["GET"] == nil { + o.handlers["GET"] = make(map[string]http.Handler) } - o.handlers["POST"]["/subscriptions/control"] = control.NewSubscribeControl(o.context, o.ControlSubscribeControlHandler) + o.handlers["GET"]["/subscriptions"] = query.NewGetAllSubscriptions(o.context, o.QueryGetAllSubscriptionsHandler) if o.handlers["POST"] == nil { o.handlers["POST"] = make(map[string]http.Handler)