Prepare for SdlInstance usage removal in xapp-frame 32/6732/1
authorTimo Tietavainen <timo.tietavainen@nokia.com>
Wed, 22 Sep 2021 22:34:07 +0000 (01:34 +0300)
committerTimo Tietavainen <timo.tietavainen@nokia.com>
Wed, 22 Sep 2021 22:34:07 +0000 (01:34 +0300)
commit8e5efa4f44f646b5389db3ccb5588d41a185e598
tree84d68e35b5da3b3fea0be70a4bf9276c93e3348f
parent40bc000e6cafe3a7eea32e4361268574050c12c4
Prepare for SdlInstance usage removal in xapp-frame

SdlInstance type with its API functions has been deprecated and its
source code will be removed at some point of time from sdlgo repository.
sdlgo repository provides the SyncStorage type what should be used
instead of the SdlInstance type.

With this commit add SDLStorage class type, which provides functions
to write and read by using SDL SyncStorage API services. Add a public
variable SdlStorage of the type SDLStorage to xapp-frame's xapp package.
Xapp developers can use SdlStorage and its write and read functions when
they need to operate with SDL DB.

Mark xapp-frame's types and functions to be deprecated, which are
related to old SDL SdlInstance type. This should be a heads up for xapp
developers to start using of SdlStorage instead of old deprecated
implementation. Deprecated xapp-frame types and functions will be
removed in a later release of the xapp-frame.

Add also xapp name to SDL namespace string what is used for
configuration updating via REST API feature in xapp-frame. Otherwise SDL
keys could collide if different xapps are updating their configuration
via REST API.

Issue-Id: RIC-805

Signed-off-by: Timo Tietavainen <timo.tietavainen@nokia.com>
Change-Id: I9c3a6616864eb967721b9b848cae56f9ef5f259f
pkg/xapp/config.go
pkg/xapp/db.go
pkg/xapp/xapp.go
pkg/xapp/xapp_test.go