ric-plt/sdl.git
4 years agoUse boolean expects in unit tests 88/988/1
Rolf Badorek [Fri, 20 Sep 2019 11:20:05 +0000 (14:20 +0300)]
Use boolean expects in unit tests

Certain gcc versions will give (per my understanding false positive)
warning when 'EXPECT_EQ' macro is used so that other argument is
'true' or 'false'.

For example, Ubuntu 16.04 has by default such a gcc version.

See some related discussion below:
https://github.com/google/googletest/issues/322

We have defined all compiler warning to be treated as errors, thus
above issue will lead to compilation error.

Simple fix is to use 'EXPECT_TRUE' or 'EXPECT_FALSE' instead. Those are
more readable, and thus better choice anyway.

Signed-off-by: Rolf Badorek <rolf.badorek@nokia.com>
Change-Id: Ib0f3841c1b6fe2cf95eac3e4dc0cbcba9c3c8268

4 years agoAdd Redis Sentinel based database discovery 64/964/1
Rolf Badorek [Tue, 17 Sep 2019 13:47:20 +0000 (16:47 +0300)]
Add Redis Sentinel based database discovery

This is first step to support forthcoming Redis HA (Sentinel) DBaaS
deployment.

If sentinel-based database discovery is used (currently still disabled
by configure option), current master is asked from Sentinel.

In case that Sentinel can't be connected, re-try will be triggered
after one second delay. If reply parsing fails, it is considered as
non-recoverable bug and execution is aborted.

Currently, Sentinel address and Redis master name are still hard coded,
will be made configurable in a separate commit soon. Also ordering
change notifications from Sentinel will be implemented separately.

Added new discovery type "SENTINEL" to 'sdltool test-connectivity'
command output.

Refactoring for 'AsyncStorageImpl' class unit tests, so that those will
use database discovery mock implementation. Earlier implementation did
have assumptions for database discovery behavior, which were not
fulfilled any more when sentinel database discovery is used.

Added option to 'AsyncCommandDispatcher' which defines if commands
will be sent to Redis or to Sentinel. In latter case existence checking
for Redis module extension commands is skipped.

Signed-off-by: Rolf Badorek <rolf.badorek@nokia.com>
Change-Id: Id7507844c9b74115e52d6f8eaf9cb18198c5dc63

4 years agoAdd first version 59/859/5
Rolf Badorek [Tue, 20 Aug 2019 08:17:15 +0000 (11:17 +0300)]
Add first version

First version of C++ SDL API.

Refer README file for instructions how to generate API documentation.

Current version will find database via environment variables, thus RIC
DBaaS service must be up and running before starting the application
pod which uses SDL C++ API.

Change-Id: Ia3c95ac856b293827b680a9f6451a229f69f35f9
Signed-off-by: Rolf Badorek <rolf.badorek@nokia.com>
5 years agoInitial empty repository
Andrew Grimberg [Thu, 21 Mar 2019 23:55:44 +0000 (23:55 +0000)]
Initial empty repository