-
- shouldSendSetup := len(e2tAddress) > 0
- if shouldSendSetup {
- err = m.ranSetupManager.ExecuteSetup(nodeb, entities.ConnectionStatus_CONNECTING)
- if err != nil {
- m.logger.Errorf("#E2TShutdownManager.associateAndSetupNodebs - Failed to execute Setup for nodeb %s.", ranName)
- continue
- }
- }
- }
- return nil
-}
-
-func (m E2TShutdownManager) reAssociateRanInMemory(ranName string, ranNamesToBeAssociated map[string][]string, ranNamesToBeDissociated []string) error {
- nodeb, err := m.rnibDataService.GetNodeb(ranName)
- if err != nil {
-
- _, ok := err.(*common.ResourceNotFoundError)
-
- if !ok {
- m.logger.Errorf("#E2TShutdownManager.reAssociateRanInMemory - Failed to get nodeb %s from db.", ranName)
- return err
- }
-
- m.logger.Errorf("#E2TShutdownManager.reAssociateRanInMemory - nodeb %s not found in db. dissociating it...", ranName)
- ranNamesToBeDissociated = append(ranNamesToBeDissociated, ranName)
- return nil
- }
-
- if nodeb.ConnectionStatus == entities.ConnectionStatus_SHUTTING_DOWN || nodeb.ConnectionStatus == entities.ConnectionStatus_SHUT_DOWN {
- m.logger.Errorf("#E2TShutdownManager.reAssociateRanInMemory - nodeb %s status is %s. dissociating it...", ranName, nodeb.ConnectionStatus)
- ranNamesToBeDissociated = append(ranNamesToBeDissociated, ranName)
- return nil
- }
-
- selectedE2tAddress, err := m.e2TInstancesManager.SelectE2TInstance()
- if err != nil {
- m.logger.Infof("#E2TShutdownManager.reAssociateRanInMemory - No selected E2T instance for nodeb %s found.", ranName)
- ranNamesToBeDissociated = append(ranNamesToBeDissociated, ranName)
- return nil