From: Timo Tietavainen Date: Mon, 14 Jun 2021 16:37:49 +0000 (+0300) Subject: Upgrade available Python SDL version to 3.0.0 X-Git-Tag: 2.0.0~1 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=581cf1ee882a6fd3b498cc04eccc1d6a18f30c73;p=ric-plt%2Fxapp-frame-py.git Upgrade available Python SDL version to 3.0.0 Update XAPP-FRAME-PY module dependencies to use latest SDL version 3.0.0 (RIC-699) what contains support for SDL multi-namespace and sentinel based DB capacity scaling features. Also Notification packing has been fixed in SDL version 3.0.0 (RIC-795). XAPP-FRAME API change: received SDL events are now returned as a list of strings, earlier only one event of type string was possible to return. This change applies to following XAPP-FRAME APIs: 'handle_events()' and a callback function registered by the 'subscribe_channel()' call. Bump XAPP-FRAME-PY version to 2.0.0. Issue-ID: RIC-699 Signed-off-by: Timo Tietavainen Change-Id: Ica3c89d5a47451874fbc5ccd9a6b021fd30f6a53 --- diff --git a/docs/release-notes.rst b/docs/release-notes.rst index b2f0dcc..1c06fc1 100644 --- a/docs/release-notes.rst +++ b/docs/release-notes.rst @@ -11,6 +11,13 @@ The format is based on `Keep a Changelog `__ and this project adheres to `Semantic Versioning `__. +[2.0.0] - 2021-06-14 +-------------------- +* Add Xapp registration/deregistration APIs (`RIC-706 `_) +* Upgrade SDL 3.0.0 version, SDL scaling (`RIC-699 `_) +* Upgrade SDL 3.0.0 version, notification fix (`RIC-795 `_) + + [1.6.0] - 2020-10-23 -------------------- * Add SDL wrapping API (`RIC-659 `_) diff --git a/ricxappframe/xapp_sdl.py b/ricxappframe/xapp_sdl.py index a1bf722..f4fd180 100644 --- a/ricxappframe/xapp_sdl.py +++ b/ricxappframe/xapp_sdl.py @@ -630,8 +630,8 @@ class SDLWrapper: def handle_events(self): """ handle_events is a non-blocking function that returns a tuple containing channel - name and message received from an event. The registered callback function will - still be called when an event is received. + name and a list of message(s) received from an event. The registered callback + function will still be called when an event is received. This function is called if SDL user decides to handle notifications in its own event loop. Calling this function after start_event_listener raises an exception. @@ -640,7 +640,7 @@ class SDLWrapper: Returns ------- Tuple: - (channel: str, message: str) + (channel: str, message: list of str) """ return self._sdl.handle_events() diff --git a/setup.py b/setup.py index b46715e..af334cf 100644 --- a/setup.py +++ b/setup.py @@ -32,12 +32,12 @@ def _long_descr(): setup( name="ricxappframe", - version="1.6.0", + version="2.0.0", packages=find_packages(exclude=["tests.*", "tests"]), author="O-RAN Software Community", description="Xapp and RMR framework for Python", url="https://gerrit.o-ran-sc.org/r/admin/repos/ric-plt/xapp-frame-py", - install_requires=["inotify_simple", "msgpack", "mdclogpy", "ricsdl>=2.1.0,<3.0.0", "requests"], + install_requires=["inotify_simple", "msgpack", "mdclogpy", "ricsdl>=3.0.0,<4.0.0", "requests"], classifiers=[ "Development Status :: 4 - Beta", "Intended Audience :: Telecommunications Industry", diff --git a/tests/test_sdl.py b/tests/test_sdl.py index 06c17c2..14b408b 100644 --- a/tests/test_sdl.py +++ b/tests/test_sdl.py @@ -139,7 +139,7 @@ def test_sdl_set_and_publish_with_handle_events(): # test is cb called CALLED = True assert channel == CH - assert event == EVENT + assert event[0] == EVENT sdl = SDLWrapper(use_fake_sdl=True) sdl.subscribe_channel(NS, cb, "channel") @@ -193,7 +193,7 @@ def test_sdl_remove_and_publish_with_start_event_listener(): nonlocal CALLED CALLED = True assert channel == CH - assert event == EVENT + assert event[0] == EVENT sdl = SDLWrapper(use_fake_sdl=True) sdl.subscribe_channel(NS, cb, "channel")