+ return nodebInfo, nbIdentity
+}
+
+func (h *SetupRequestHandler) connectExistingRanWithoutAssociatedE2TAddress(nodebInfo *entities.NodebInfo) error {
+ e2tAddress, err := h.e2tInstancesManager.SelectE2TInstance()
+
+ if err != nil {
+ h.logger.Errorf("#SetupRequestHandler.connectExistingRanWithoutAssociatedE2TAddress - RAN name: %s - failed selecting E2T instance", nodebInfo.RanName)
+
+ if nodebInfo.ConnectionStatus == entities.ConnectionStatus_DISCONNECTED{
+ return err
+ }
+
+ nodebInfo.ConnectionStatus = entities.ConnectionStatus_DISCONNECTED
+ updateError := h.rNibDataService.UpdateNodebInfo(nodebInfo)
+
+ if updateError != nil {
+ h.logger.Errorf("#SetupRequestHandler.connectExistingRanWithoutAssociatedE2TAddress - RAN name: %s - failed updating nodeb. error: %s", nodebInfo.RanName, updateError)
+ }
+
+ return err
+ }
+
+ err = h.e2tAssociationManager.AssociateRan(e2tAddress, nodebInfo)
+
+ if err != nil {
+ h.logger.Errorf("#SetupRequestHandler.connectExistingRanWithoutAssociatedE2TAddress - RAN name: %s - failed associating ran to e2t address %s. error: %s", nodebInfo.RanName, e2tAddress, err)
+ return err
+ }
+
+ h.logger.Infof("#SetupRequestHandler.connectExistingRanWithoutAssociatedE2TAddress - RAN name: %s - successfully updated nodeb in rNib", nodebInfo.RanName)
+
+ result := h.ranSetupManager.ExecuteSetup(nodebInfo, entities.ConnectionStatus_CONNECTING)
+ return result
+}
+
+func (h *SetupRequestHandler) connectExistingRanWithAssociatedE2TAddress(nodebInfo *entities.NodebInfo) error {