X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=pkg%2Fcontrol%2Fe2if_state.go;fp=pkg%2Fcontrol%2Fe2if_state.go;h=525961852c5694031db9faee1e36b0b04c4a7d78;hb=4b1ff2caedf6814946263792275b027f824f9b69;hp=0f4305656e1ae8088a6b6a2559ef877fbe2f367a;hpb=7c6f0f1bc39f43cbba119bbdd48e1c93efc0de49;p=ric-plt%2Fsubmgr.git diff --git a/pkg/control/e2if_state.go b/pkg/control/e2if_state.go index 0f43056..5259618 100644 --- a/pkg/control/e2if_state.go +++ b/pkg/control/e2if_state.go @@ -67,7 +67,8 @@ func (e *E2IfState) NotificationCb(ch string, events ...string) { return } - if strings.Contains(events[0], "_CONNECTED") { + if strings.Contains(events[0], "_CONNECTED") && !strings.Contains(events[0], "_CONNECTED_SETUP_FAILED") { + e.control.UpdateCounter(cE2StateChangedToUp) nbId, err := ExtractNbiIdFromString(events[0]) if err != nil { xapp.Logger.Error("NotificationCb CONNECTED len(nbId) == 0 ") @@ -76,6 +77,7 @@ func (e *E2IfState) NotificationCb(ch string, events ...string) { xapp.Logger.Debug("E2 CONNECTED. NbId=%s", nbId) e.NbIdMap[nbId] = nbId } else if strings.Contains(events[0], "_DISCONNECTED") { + e.control.UpdateCounter(cE2StateChangedToDown) nbId, err := ExtractNbiIdFromString(events[0]) if err != nil { xapp.Logger.Error("NotificationCb DISCONNECTED len(nbId) == 0 ") @@ -113,7 +115,6 @@ func (e *E2IfState) ReadE2ConfigurationFromRnib() { if e.isNodeBActive(nbIdentity.InventoryName) == false { if _, ok := e.NbIdMap[nbIdentity.InventoryName]; ok { delete(e.NbIdMap, nbIdentity.InventoryName) - e.control.UpdateCounter(cE2StateChangedToDown) xapp.Logger.Debug("E2 connection DISCONNETED: %v", nbIdentity.InventoryName) // Delete all subscriptions related to InventoryName/nbId @@ -124,7 +125,6 @@ func (e *E2IfState) ReadE2ConfigurationFromRnib() { if _, ok := e.NbIdMap[nbIdentity.InventoryName]; !ok { e.NbIdMap[nbIdentity.InventoryName] = nbIdentity.InventoryName - e.control.UpdateCounter(cE2StateChangedToDown) xapp.Logger.Debug("E2 connection CONNECTED: %v", nbIdentity.InventoryName) } }