X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=E2Manager%2Fmanagers%2Fran_reconnection_manager.go;h=b733142d58e5cf13b32460e7c5301f5ef73cee9d;hb=refs%2Fchanges%2F21%2F2121%2F1;hp=530131fd0889ba5d4ebf111f0f2be23239a25007;hpb=0c747ac879f6b50089ca7317f4d85a4b69175237;p=ric-plt%2Fe2mgr.git diff --git a/E2Manager/managers/ran_reconnection_manager.go b/E2Manager/managers/ran_reconnection_manager.go index 530131f..b733142 100644 --- a/E2Manager/managers/ran_reconnection_manager.go +++ b/E2Manager/managers/ran_reconnection_manager.go @@ -94,14 +94,10 @@ func (m *RanReconnectionManager) canReconnectRan(nodebInfo *entities.NodebInfo) int(nodebInfo.GetConnectionAttempts()) < m.config.MaxConnectionAttempts } -func (m *RanReconnectionManager) updateNodebInfo(nodebInfo *entities.NodebInfo, connectionStatus entities.ConnectionStatus, resetE2tAddress bool) error { +func (m *RanReconnectionManager) updateNodebInfo(nodebInfo *entities.NodebInfo, connectionStatus entities.ConnectionStatus) error { nodebInfo.ConnectionStatus = connectionStatus; - if resetE2tAddress { - nodebInfo.AssociatedE2TInstanceAddress = "" - } - err := m.rnibDataService.UpdateNodebInfo(nodebInfo) if err != nil { @@ -123,12 +119,12 @@ func (m *RanReconnectionManager) updateUnconnectableRan(nodebInfo *entities.Node if connectionStatus == entities.ConnectionStatus_SHUTTING_DOWN { m.logger.Warnf("#RanReconnectionManager.updateUnconnectableRan - RAN name: %s - Cannot reconnect RAN. Reason: connection status is SHUTTING_DOWN", nodebInfo.RanName) - return m.updateNodebInfo(nodebInfo, entities.ConnectionStatus_SHUT_DOWN, false) + return m.updateNodebInfo(nodebInfo, entities.ConnectionStatus_SHUT_DOWN) } if m.isRanExceededConnectionAttempts(nodebInfo) { m.logger.Warnf("#RanReconnectionManager.updateUnconnectableRan - RAN name: %s - Cannot reconnect RAN. Reason: RAN's connection attempts exceeded the limit (%d)", nodebInfo.RanName, m.config.MaxConnectionAttempts) - return m.updateNodebInfo(nodebInfo, entities.ConnectionStatus_DISCONNECTED, true) + return m.updateNodebInfo(nodebInfo, entities.ConnectionStatus_DISCONNECTED) } return nil