X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=internal%2Fsdlgoredis%2Fsdlgosentinel.go;h=19468d748dab37e4a1893ab3fe9294d05a70a6d3;hb=refs%2Fchanges%2F52%2F7152%2F3;hp=f4395700d1e6e5799ba0ad17afcb7b6965e2cd40;hpb=ee834c59a83cdd10889b3439a281fe43b9f98839;p=ric-plt%2Fsdlgo.git diff --git a/internal/sdlgoredis/sdlgosentinel.go b/internal/sdlgoredis/sdlgosentinel.go index f439570..19468d7 100644 --- a/internal/sdlgoredis/sdlgosentinel.go +++ b/internal/sdlgoredis/sdlgosentinel.go @@ -23,7 +23,9 @@ package sdlgoredis import ( + "fmt" "github.com/go-redis/redis/v7" + "strconv" ) type Sentinel struct { @@ -61,6 +63,14 @@ func (s *Sentinel) GetDbState() (*DbState, error) { state.PrimaryDbState = *pState state.ReplicasDbState = rState state.SentinelsDbState = sState + + cnt, err := strconv.Atoi(s.Cfg.nodeCnt) + if err != nil { + state.Err = fmt.Errorf("Sentinel DBAAS_NODE_COUNT configuration value '%s' conversion to integer failed", s.Cfg.nodeCnt) + return state, state.Err + } + state.ConfigNodeCnt = cnt + if pErr != nil { return state, pErr }