Upgrade available Python SDL version to 3.0.0 18/6318/1
authorTimo Tietavainen <timo.tietavainen@nokia.com>
Mon, 14 Jun 2021 16:37:49 +0000 (19:37 +0300)
committerTimo Tietavainen <timo.tietavainen@nokia.com>
Mon, 14 Jun 2021 16:37:49 +0000 (19:37 +0300)
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 <timo.tietavainen@nokia.com>
Change-Id: Ica3c89d5a47451874fbc5ccd9a6b021fd30f6a53

docs/release-notes.rst
ricxappframe/xapp_sdl.py
setup.py
tests/test_sdl.py

index b2f0dcc..1c06fc1 100644 (file)
@@ -11,6 +11,13 @@ The format is based on `Keep a Changelog <http://keepachangelog.com/>`__
 and this project adheres to `Semantic Versioning <http://semver.org/>`__.
 
 
+[2.0.0] - 2021-06-14
+--------------------
+* Add Xapp registration/deregistration APIs (`RIC-706 <https://jira.o-ran-sc.org/browse/RIC-706>`_)
+* Upgrade SDL 3.0.0 version, SDL scaling (`RIC-699 <https://jira.o-ran-sc.org/browse/RIC-699>`_)
+* Upgrade SDL 3.0.0 version, notification fix (`RIC-795 <https://jira.o-ran-sc.org/browse/RIC-795>`_)
+
+
 [1.6.0] - 2020-10-23
 --------------------
 * Add SDL wrapping API (`RIC-659 <https://jira.o-ran-sc.org/browse/RIC-659>`_)
index a1bf722..f4fd180 100644 (file)
@@ -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()
 
index b46715e..af334cf 100644 (file)
--- 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",
index 06c17c2..14b408b 100644 (file)
@@ -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")