2 // Copyright 2019 AT&T Intellectual Property
3 // Copyright 2019 Nokia
5 // Licensed under the Apache License, Version 2.0 (the "License");
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
17 // This source code is part of the near-RT RIC (RAN Intelligent Controller)
18 // platform project (RICP).
23 * This is the Swagger/OpenAPI 2.0 definition of Routing Manager's Northbound API.
26 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
36 "github.com/gorilla/mux"
43 HandlerFunc http.HandlerFunc
48 func NewRouter() *mux.Router {
49 router := mux.NewRouter().StrictSlash(true)
50 for _, route := range routes {
51 var handler http.Handler
52 handler = route.HandlerFunc
53 handler = Logger(handler, route.Name)
56 Methods(route.Method).
65 func Index(w http.ResponseWriter, r *http.Request) {
66 fmt.Fprintf(w, "Hello World!")
78 "AssociateRanToE2tHandle",
79 strings.ToUpper("Post"),
80 "/ric/v1/handles/associate-ran-to-e2t",
81 AssociateRanToE2tHandle,
86 strings.ToUpper("Post"),
87 "/ric/v1/handles/e2t",
93 strings.ToUpper("Delete"),
94 "/ric/v1/handles/e2t",
99 "DeleteXappSubscriptionHandle",
100 strings.ToUpper("Delete"),
101 "/ric/v1/handles/xapp-subscription-handle",
102 DeleteXappSubscriptionHandle,
107 strings.ToUpper("Post"),
108 "/ric/v1/handles/dissociate-ran",
114 strings.ToUpper("Get"),
121 strings.ToUpper("Post"),
122 "/ric/v1/handles/xapp-handle",
127 "ProvideXappSubscriptionHandle",
128 strings.ToUpper("Post"),
129 "/ric/v1/handles/xapp-subscription-handle",
130 ProvideXappSubscriptionHandle,
134 "UpdateXappSubscriptionHandle",
135 strings.ToUpper("Put"),
136 "/ric/v1/handles/xapp-subscription-handle/{subscription_id}",
137 UpdateXappSubscriptionHandle,
142 strings.ToUpper("Get"),