Fix sdlcli healthcheck DBAAS status in SEP install 52/7152/3
authorTimo Tietavainen <timo.tietavainen@nokia.com>
Sun, 28 Nov 2021 21:05:08 +0000 (23:05 +0200)
committerTimo Tietavainen <timo.tietavainen@nokia.com>
Wed, 1 Dec 2021 08:56:01 +0000 (10:56 +0200)
commit6f724aa3950cdc01246351644348fdc0f6e9ca4a
tree8fd899fa365cfb7c0a73f5c42ae8950fb27d935e
parentee834c59a83cdd10889b3439a281fe43b9f98839
Fix sdlcli healthcheck DBAAS status in SEP install

Implement reading of the new environment variable 'DBAAS_NODE_COUNT'
what defines how many DBAAS nodes there has been configured to be in
one SDL cluster group. For the time being in HA deployment value is 3
and in standalone deployment 1. With help of this variable sdlcli
'healthcheck' -command is able to show NOK status in case any configured
DBAAS pod is not present.
Refactor also output writing of the sdlcli 'healthcheck' -command to
show health status in a table layout.

Issue-Id: RIC-113

Signed-off-by: Timo Tietavainen <timo.tietavainen@nokia.com>
Change-Id: I1d677c6a78eda67e3bcfdf814654710b00dac270
internal/cli/healthcheck.go
internal/cli/healthcheck_test.go
internal/sdlgoredis/dbstate.go
internal/sdlgoredis/dbstate_test.go
internal/sdlgoredis/sdlgoredis.go
internal/sdlgoredis/sdlgoredis_test.go
internal/sdlgoredis/sdlgosentinel.go