// See the License for the specific language governing permissions and
// limitations under the License.
+// This source code is part of the near-RT RIC (RAN Intelligent Controller)
+// platform project (RICP).
+
package httpmsghandlerprovider
import (
+ "e2mgr/clients"
"e2mgr/configuration"
"e2mgr/e2managererrors"
"e2mgr/handlers/httpmsghandlers"
"e2mgr/managers"
"e2mgr/services"
"e2mgr/services/rmrsender"
- "gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/entities"
)
type IncomingRequest string
const (
- ShutdownRequest IncomingRequest = "Shutdown"
- ResetRequest IncomingRequest = "Reset"
- X2SetupRequest IncomingRequest = "X2SetupRequest"
- EndcSetupRequest IncomingRequest = "EndcSetupRequest"
- GetNodebRequest IncomingRequest = "GetNodebRequest"
- GetNodebIdListRequest IncomingRequest = "GetNodebIdListRequest"
+ SetGeneralConfigurationRequest IncomingRequest = "SetGeneralConfiguration"
+ ShutdownRequest IncomingRequest = "Shutdown"
+ ResetRequest IncomingRequest = "Reset"
+ GetNodebRequest IncomingRequest = "GetNodebRequest"
+ GetNodebIdListRequest IncomingRequest = "GetNodebIdListRequest"
+ GetE2TInstancesRequest IncomingRequest = "GetE2TInstancesRequest"
+ UpdateGnbRequest IncomingRequest = "UpdateGnbRequest"
+ UpdateEnbRequest IncomingRequest = "UpdateEnbRequest"
+ AddEnbRequest IncomingRequest = "AddEnbRequest"
+ DeleteEnbRequest IncomingRequest = "DeleteEnbRequest"
)
type IncomingRequestHandlerProvider struct {
- requestMap map[IncomingRequest]httpmsghandlers.RequestHandler
- logger *logger.Logger
+ requestMap map[IncomingRequest]httpmsghandlers.RequestHandler
+ logger *logger.Logger
+ ranConnectStatusChangeManager managers.IRanConnectStatusChangeManager
}
-func NewIncomingRequestHandlerProvider(logger *logger.Logger, rmrSender *rmrsender.RmrSender, config *configuration.Configuration, rNibDataService services.RNibDataService, ranSetupManager *managers.RanSetupManager) *IncomingRequestHandlerProvider {
+func NewIncomingRequestHandlerProvider(logger *logger.Logger, rmrSender *rmrsender.RmrSender, config *configuration.Configuration, rNibDataService services.RNibDataService, e2tInstancesManager managers.IE2TInstancesManager, rmClient clients.IRoutingManagerClient, ranConnectStatusChangeManager managers.IRanConnectStatusChangeManager, nodebValidator *managers.NodebValidator, updateEnbManager managers.IUpdateNodebManager, ranListManager managers.RanListManager) *IncomingRequestHandlerProvider {
return &IncomingRequestHandlerProvider{
- requestMap: initRequestHandlerMap(logger, rmrSender, config, rNibDataService, ranSetupManager),
- logger: logger,
+ requestMap: initRequestHandlerMap(logger, rmrSender, config, rNibDataService, e2tInstancesManager, rmClient, ranConnectStatusChangeManager, nodebValidator, updateEnbManager, ranListManager),
+ logger: logger,
+ ranConnectStatusChangeManager: ranConnectStatusChangeManager,
}
}
-func initRequestHandlerMap(logger *logger.Logger, rmrSender *rmrsender.RmrSender, config *configuration.Configuration, rNibDataService services.RNibDataService, ranSetupManager *managers.RanSetupManager) map[IncomingRequest]httpmsghandlers.RequestHandler {
+func initRequestHandlerMap(logger *logger.Logger, rmrSender *rmrsender.RmrSender, config *configuration.Configuration, rNibDataService services.RNibDataService, e2tInstancesManager managers.IE2TInstancesManager, rmClient clients.IRoutingManagerClient, ranConnectStatusChangeManager managers.IRanConnectStatusChangeManager, nodebValidator *managers.NodebValidator, updateEnbManager managers.IUpdateNodebManager, ranListManager managers.RanListManager) map[IncomingRequest]httpmsghandlers.RequestHandler {
return map[IncomingRequest]httpmsghandlers.RequestHandler{
- ShutdownRequest: httpmsghandlers.NewDeleteAllRequestHandler(logger, rmrSender, config, rNibDataService), //TODO change to pointer
- ResetRequest: httpmsghandlers.NewX2ResetRequestHandler(logger, rmrSender, rNibDataService),
- X2SetupRequest: httpmsghandlers.NewSetupRequestHandler(logger, rNibDataService, ranSetupManager, entities.E2ApplicationProtocol_X2_SETUP_REQUEST),
- EndcSetupRequest: httpmsghandlers.NewSetupRequestHandler(logger, rNibDataService, ranSetupManager, entities.E2ApplicationProtocol_ENDC_X2_SETUP_REQUEST), //TODO change to pointer
- GetNodebRequest: httpmsghandlers.NewGetNodebRequestHandler(logger, rNibDataService),
- GetNodebIdListRequest: httpmsghandlers.NewGetNodebIdListRequestHandler(logger, rNibDataService),
+ ShutdownRequest: httpmsghandlers.NewDeleteAllRequestHandler(logger, rmrSender, config, rNibDataService, e2tInstancesManager, rmClient, ranConnectStatusChangeManager),
+ ResetRequest: httpmsghandlers.NewX2ResetRequestHandler(logger, rmrSender, rNibDataService),
+ SetGeneralConfigurationRequest: httpmsghandlers.NewSetGeneralConfigurationHandler(logger, rNibDataService),
+ GetNodebRequest: httpmsghandlers.NewGetNodebRequestHandler(logger, rNibDataService),
+ GetNodebIdListRequest: httpmsghandlers.NewGetNodebIdListRequestHandler(logger, rNibDataService),
+ GetE2TInstancesRequest: httpmsghandlers.NewGetE2TInstancesRequestHandler(logger, e2tInstancesManager),
+ UpdateGnbRequest: httpmsghandlers.NewUpdateGnbRequestHandler(logger, rNibDataService),
+ UpdateEnbRequest: httpmsghandlers.NewUpdateNodebRequestHandler(logger, rNibDataService, updateEnbManager),
+ AddEnbRequest: httpmsghandlers.NewAddEnbRequestHandler(logger, rNibDataService, nodebValidator, ranListManager),
+ DeleteEnbRequest: httpmsghandlers.NewDeleteEnbRequestHandler(logger, rNibDataService),
}
}