X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=E2Manager%2Fmanagers%2Fran_setup_manager.go;h=89bdcc88470cb9fb30e46083acd63aac7636af8f;hb=ffd085dd7f0654b84b163a7bfedd3fa89e7b8a71;hp=9329411e177527683f42ad5e737d5a775e7aa5bb;hpb=33f84e1a0998af025880be3e8eb087fac34af731;p=ric-plt%2Fe2mgr.git diff --git a/E2Manager/managers/ran_setup_manager.go b/E2Manager/managers/ran_setup_manager.go index 9329411..89bdcc8 100644 --- a/E2Manager/managers/ran_setup_manager.go +++ b/E2Manager/managers/ran_setup_manager.go @@ -25,9 +25,7 @@ import ( "e2mgr/rNibWriter" "e2mgr/rmrCgo" "e2mgr/services" - "e2mgr/sessions" "gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/entities" - "time" ) type RanSetupManager struct { @@ -92,20 +90,14 @@ func (m *RanSetupManager) prepareSetupRequest(nodebInfo *entities.NodebInfo) (in // ExecuteSetup updates the connection status and number of attempts in the nodebInfo and send an endc/x2 setup request to establish a connection with the RAN func (m *RanSetupManager) ExecuteSetup(nodebInfo *entities.NodebInfo, status entities.ConnectionStatus) error { - //Fill details for the response handler - requestDetails := models.SetupRequest{RanName: nodebInfo.RanName, RanPort: uint16(nodebInfo.Port), RanIp: nodebInfo.Ip} - m.rmrService.E2sessions[nodebInfo.RanName] = sessions.E2SessionDetails{SessionStart: time.Now(), Request: &requestDetails} - // Update retries and connection status if err := m.updateConnectionStatus(nodebInfo, status); err != nil { - delete(m.rmrService.E2sessions, nodebInfo.RanName) return e2managererrors.NewRnibDbError() } // Build the endc/x2 setup request rmrMsgType, request, err := m.prepareSetupRequest(nodebInfo) if err != nil { - delete(m.rmrService.E2sessions, nodebInfo.RanName) return err } @@ -114,8 +106,6 @@ func (m *RanSetupManager) ExecuteSetup(nodebInfo *entities.NodebInfo, status ent if err := m.rmrService.SendRmrMessage(response); err != nil { m.logger.Errorf("#RanSetupManager.ExecuteSetup - failed sending setup request to RMR: %s", err) - delete(m.rmrService.E2sessions, nodebInfo.RanName) - // Decrement retries and connection status (disconnected) if err := m.updateConnectionStatusDisconnected(nodebInfo); err != nil { return e2managererrors.NewRnibDbError()