generalConfiguration, err := h.rNibDataService.GetGeneralConfiguration()
if err != nil {
- h.logger.Errorf("#E2SetupRequestNotificationHandler.Handle - Failed retrieving e2m general configuration. error: %s", err)
+ h.logger.Errorf("#E2SetupRequestNotificationHandler.Handle - Failed retrieving e2m general configuration - quitting e2 setup flow. error: %s", err)
return
}
+ h.logger.Infof("#E2SetupRequestNotificationHandler.Handle - got general configuration from rnib - enableRic: %t", generalConfiguration.EnableRic)
+
if !generalConfiguration.EnableRic {
cause := models.Cause{Misc: &models.CauseMisc{OmIntervention: &struct{}{}}}
h.handleUnsuccessfulResponse(ranName, request, cause)
func (h *E2SetupRequestNotificationHandler) handleNewRan(ranName string, e2tIpAddress string, setupRequest *models.E2SetupRequestMessage) (*entities.NodebInfo, error) {
- nodebInfo, err := h.buildNodebInfo(ranName, e2tIpAddress, setupRequest)
-
- if err != nil {
- h.logger.Errorf("#E2SetupRequestNotificationHandler.handleNewRan - RAN name: %s - failed to build nodebInfo entity. Error: %s", ranName, err)
- return nil, err
- }
-
- nbIdentity := h.buildNbIdentity(ranName, setupRequest)
- err = h.rNibDataService.SaveNodeb(nbIdentity, nodebInfo)
+ nodebInfo := h.buildNodebInfo(ranName, e2tIpAddress, setupRequest)
+ err := h.rNibDataService.SaveNodeb(nodebInfo)
if err != nil {
- h.logger.Errorf("#E2SetupRequestNotificationHandler.handleNewRan - RAN name: %s - failed to save nodebInfo entity. Error: %s", ranName, err)
+ h.logger.Errorf("#E2SetupRequestNotificationHandler.handleNewRan - RAN name: %s - failed saving nodebInfo. Error: %s", ranName, err)
return nil, err
}
- err = h.ranConnectStatusChangeManager.ChangeStatus(nodebInfo, entities.ConnectionStatus_CONNECTED)
-
- if err != nil {
- return nil, err
- }
+ _ = h.buildNbIdentity(ranName, setupRequest) // TODO: add call to ranListManager
return nodebInfo, nil
}
return []byte(normalized)
}
-func (h *E2SetupRequestNotificationHandler) buildNodebInfo(ranName string, e2tAddress string, request *models.E2SetupRequestMessage) (*entities.NodebInfo, error) {
-
- var err error
+func (h *E2SetupRequestNotificationHandler) buildNodebInfo(ranName string, e2tAddress string, request *models.E2SetupRequestMessage) *entities.NodebInfo {
nodebInfo := &entities.NodebInfo{
AssociatedE2TInstanceAddress: e2tAddress,
RanName: ranName,
}
h.setGnbFunctions(nodebInfo, request)
- return nodebInfo, err
+ return nodebInfo
}
func (h *E2SetupRequestNotificationHandler) buildGlobalNbId(setupRequest *models.E2SetupRequestMessage) *entities.GlobalNbId {