X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=E2Manager%2Fhttpserver%2Fhttp_server.go;h=3ee48efdcc639e327bfc8e85010001587ec6ed35;hb=a590417b434ba8e556f1a9b26ff7b6edbb2097ce;hp=320acd08ec3b29bfcd6403da12c8b98ee13e35fa;hpb=a07b8597afc9d063a7f37a376a5bcf29ba29b557;p=ric-plt%2Fe2mgr.git diff --git a/E2Manager/httpserver/http_server.go b/E2Manager/httpserver/http_server.go index 320acd0..3ee48ef 100644 --- a/E2Manager/httpserver/http_server.go +++ b/E2Manager/httpserver/http_server.go @@ -29,7 +29,7 @@ import ( func Run(log *logger.Logger, port int, rootController controllers.IRootController, nodebController controllers.INodebController, e2tController controllers.IE2TController) error { - router := mux.NewRouter(); + router := mux.NewRouter() initializeRoutes(router, rootController, nodebController, e2tController) addr := fmt.Sprintf(":%d", port) @@ -45,9 +45,12 @@ func initializeRoutes(router *mux.Router, rootController controllers.IRootContro r.HandleFunc("/health", rootController.HandleHealthCheckRequest).Methods(http.MethodGet) rr := r.PathPrefix("/nodeb").Subrouter() - rr.HandleFunc("/ids", nodebController.GetNodebIdList).Methods(http.MethodGet) + rr.HandleFunc("/states", nodebController.GetNodebIdList).Methods(http.MethodGet) rr.HandleFunc("/{ranName}", nodebController.GetNodeb).Methods(http.MethodGet) + rr.HandleFunc("/enb", nodebController.AddEnb).Methods(http.MethodPost) + rr.HandleFunc("/enb/{ranName}", nodebController.DeleteEnb).Methods(http.MethodDelete) rr.HandleFunc("/{ranName}/update", nodebController.UpdateGnb).Methods(http.MethodPut) + rr.HandleFunc("/enb/{ranName}", nodebController.UpdateEnb).Methods(http.MethodPut) rr.HandleFunc("/shutdown", nodebController.Shutdown).Methods(http.MethodPut) rr.HandleFunc("/parameters", nodebController.SetGeneralConfiguration).Methods(http.MethodPut) rrr := r.PathPrefix("/e2t").Subrouter()