ric-plt/xapp-frame-py.git
3 years agoRelease ricxappframe version 1.1.1 to pypi.org 27/3627/1 1.1.1
Lott, Christopher (cl778h) [Thu, 7 May 2020 20:44:26 +0000 (16:44 -0400)]
Release ricxappframe version 1.1.1 to pypi.org

Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
Change-Id: Iafc80402684f58012985d5d104d9d1b4bbf06f48

3 years agoUse blocking get call w/ timeout to read msg queue 17/3617/5
Lott, Christopher (cl778h) [Thu, 7 May 2020 12:39:49 +0000 (08:39 -0400)]
Use blocking get call w/ timeout to read msg queue

Add parameters to the queue get method in the xapp_frame loop that reads
messages so it waits for a message to arrive and occasionally checks for
the end-loop flag, instead of spinning the CPU at 100% while waiting.

Upgrade all to use the latest RMR, version 4.0.5.

Tweak the example xapps to emit their names in log messages.

Improve documentation especially the package overview shown at PyPI.

Issue-ID: RIC-354
Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
Change-Id: I08692e6ef60d199cb0b92c1c99740ae808b8885c

3 years agoRelease ricxappframe version 1.1.0 to pypi.org 16/3616/1 1.1.0
Lott, Christopher (cl778h) [Thu, 7 May 2020 11:50:13 +0000 (07:50 -0400)]
Release ricxappframe version 1.1.0 to pypi.org

Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
Change-Id: I290e1e7b1d0d297dfd3d5b6133676f090138ac8f

3 years agoDefine message-summary dict keys as constants 94/3594/8
Lott, Christopher (cl778h) [Wed, 6 May 2020 13:23:55 +0000 (09:23 -0400)]
Define message-summary dict keys as constants

Refactor code to eliminate hardcoded strings like "message state".
Add wrapper method and test for method rmr_set_vlevel.
Unpin xappframepy version in Ping/Pong Dockerfiles.
Use constants for message-state values instead of integers.
Drop all mentions of NNG.
Bump version to 1.1.0.

Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
Change-Id: I27c0bcb4ae6d6a85b518510fd1a4c651d3445313

3 years agoBlock on RMR read to avoid 100% CPU usage on wait 89/3589/2
Lott, Christopher (cl778h) [Tue, 5 May 2020 22:31:54 +0000 (18:31 -0400)]
Block on RMR read to avoid 100% CPU usage on wait

Extend the receive-all helper method to accept a timeout parameter and
pass to rmr_torcv_msg so RMR waits for a notification that a message
has arrived, instead of spinning the processor while waiting.

Issue-ID: RIC-354
Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
Change-Id: I9149dcdad946f8bac1294eed28260b4c38d1056a

3 years agoPromote ricxappframe 1.0.2 to pypi.org 31/3531/3 1.0.2
Lott, Christopher (cl778h) [Wed, 29 Apr 2020 13:34:27 +0000 (09:34 -0400)]
Promote ricxappframe 1.0.2 to pypi.org

Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
Change-Id: Id8c60035fab0273203d30c3b56b9b8680c0c4ba5

3 years agoDrop clutter of PyPI release control files 30/3530/2
Lott, Christopher (cl778h) [Wed, 29 Apr 2020 13:30:49 +0000 (09:30 -0400)]
Drop clutter of PyPI release control files

Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
Change-Id: I08a0769a805c13de93b18fb2fc9593040425c1cc

4 years agoUpgrade to RMR version 4.0.2 32/3532/2
Lott, Christopher (cl778h) [Wed, 29 Apr 2020 13:58:37 +0000 (09:58 -0400)]
Upgrade to RMR version 4.0.2

Bump version to 1.0.3 and add release notes
Add developer guide with guidance on bumping the version

Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
Change-Id: If2fd64c1791c549c674c0779d58d2ac0d4cf1f72

4 years agoUpgrade to RMR version 3.8.0 from released image 86/3386/1
Lott, Christopher (cl778h) [Wed, 22 Apr 2020 13:52:23 +0000 (09:52 -0400)]
Upgrade to RMR version 3.8.0 from released image

Bump version to 1.0.2 and add release notes

Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
Change-Id: Ie7b9882106b6f6670312f6fa9187191fce104ab8

4 years agoReport python dependencies for CLM analysis 02/3302/2
Lott, Christopher (cl778h) [Thu, 16 Apr 2020 20:15:49 +0000 (16:15 -0400)]
Report python dependencies for CLM analysis

Define new environment 'clm' with command 'pip freeze' to report code
and test dependencies with version strings as installed by tox for
CLM analysis.

Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
Change-Id: Ic96e7f7940b39803c44655c9798bdd5dc98378ba

4 years agoRelease xapp-frame-py @ 1.0.1 to pypi 62/3262/1 1.0.1
Lott, Christopher (cl778h) [Tue, 14 Apr 2020 12:58:45 +0000 (08:58 -0400)]
Release xapp-frame-py @ 1.0.1 to pypi

Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
Change-Id: Idcd6aa46402114e19103af6787da059303c418c2

4 years agoRefactor definition of method restype & argtypes 48/3248/5
Lott, Christopher (cl778h) [Fri, 10 Apr 2020 20:02:11 +0000 (16:02 -0400)]
Refactor definition of method restype & argtypes

Use a helper method to set Ctype argument and response types.
Bump version to 1.0.1
Add release note for 1.0.1, generate API docs with autodoc.
Revise release notes to drop code-style formatting of English text.
Add link to RMR man pages at ReadTheDocs.io

Issue-ID: RIC-228
Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
Change-Id: I989566c93f25fa5555b306c569a4bf1d817be2fc

4 years agoMove wrapped C library to subpackage 38/3238/9
Lott, Christopher (cl778h) [Thu, 9 Apr 2020 22:25:19 +0000 (18:25 -0400)]
Move wrapped C library to subpackage

Create new subpackage rmr/rmrclib with the C library loaded via ctypes.
Add method to get constants from RMR library and detect mock objects.
Split test files into test_rmr and test_rmrclib.
Extend sphinx configuration to mock the rmrclib subpackage, so the
rmr package receives a mock instead of a real object.
This change allows generation of API documentation by Sphinx
when the .so file is not available and import fails, for example
at ReadTheDocs.

Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
Change-Id: Idb9bb1d7a534c4142ea0353b5a48d3132e55f6e6

4 years agoExtend doc of RMR python binding methods 37/3237/4
Lott, Christopher (cl778h) [Thu, 9 Apr 2020 18:49:02 +0000 (14:49 -0400)]
Extend doc of RMR python binding methods

Also add type hints to function definitions
No functional changes

Issue-ID: RIC-228
Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
Change-Id: I709a30a1bf3b3ab52701430ac0f9c01df6dea9d7

4 years agoAdd generated API doc to RST 21/3221/2
Lott, Christopher (cl778h) [Wed, 8 Apr 2020 16:41:07 +0000 (12:41 -0400)]
Add generated API doc to RST

The ReadTheDocs builder will never have RMR library installed,
so it's nearly impossible to use the sphinx autodoc API generator
to extract Pydoc strings from the code.  This hack adds the
generated strings to a static file which will require manual
maintenance, poor but an improvement on zero documentation.

Issue-ID: RIC-228
Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
Change-Id: Icf3121c960424eb5f83eac76dbcae55d2f64624b

4 years agoMove rmr python api docs over. 16/3216/3
Tommy Carpenter [Wed, 8 Apr 2020 11:04:51 +0000 (07:04 -0400)]
Move rmr python api docs over.

Issue-ID: RIC-228
Change-Id: I37772a558a316b12e424f12ad3523cb0a048abe6
Signed-off-by: Tommy Carpenter <tc677g@att.com>
4 years agoRelease 100 77/3177/1 1.0.0
Tommy Carpenter [Mon, 6 Apr 2020 23:26:32 +0000 (19:26 -0400)]
Release 100

Issue-ID: RIC-228
Change-Id: I96947579dc66fcda6c7c6a896309ff3ecf739c33
Signed-off-by: Tommy Carpenter <tc677g@att.com>
4 years agoMove rmr python here. 72/3172/3
Tommy Carpenter [Mon, 6 Apr 2020 18:42:57 +0000 (14:42 -0400)]
Move rmr python here.

The decision was made to move rmr python into the xapp frame.
The module name has not been changed otherwise, so apps transitioning
to this should only need to prefix "rmr" with "ricxappframe." to
transition (and, replace rmr with ricxappframe if they are not already
using the framework).

Some small changes have been made in the unit tests, such as port
numbers and monkeypatching statements, but otherwise all "new" code is
identical to rmr python.

Issue-ID: RIC-228
Change-Id: I5e80cfd39c1511db93b95ac5e442a2acfc0733a2
Signed-off-by: Tommy Carpenter <tc677g@att.com>
4 years agoRelease 070 33/3133/1 0.7.0
Tommy Carpenter [Fri, 3 Apr 2020 13:11:40 +0000 (09:11 -0400)]
Release 070

Issue-ID: RIC-228
Change-Id: Ieeda2adbdaef8832e416f3b8fc86e8859aea36a2
Signed-off-by: Tommy Carpenter <tc677g@att.com>
4 years agoImplement healthcheck handler 28/3128/4
Tommy Carpenter [Thu, 2 Apr 2020 23:45:19 +0000 (19:45 -0400)]
Implement healthcheck handler

Issue-ID: RIC-228
Change-Id: I1136cbc1fb3e9b7e542033e8cba8d23ba79b15bd
Signed-off-by: Tommy Carpenter <tc677g@att.com>
4 years agoRemove invalid key-value pair from .gitreview 25/3125/1
Lott, Christopher (cl778h) [Thu, 2 Apr 2020 19:45:31 +0000 (15:45 -0400)]
Remove invalid key-value pair from .gitreview

Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
Change-Id: I9817c3ad360ee7e394732d492ce364cec2adfff7

4 years agoNo code change; test with 3.6.3 only. 63/3063/1
Tommy Carpenter [Mon, 30 Mar 2020 20:17:51 +0000 (16:17 -0400)]
No code change; test with 3.6.3 only.

Issue-ID: RIC-228
Change-Id: I441f4473fbdbaf1af7077d607bf4724cc9835bd0
Signed-off-by: Tommy Carpenter <tc677g@att.com>
4 years agoRelease 060 70/2970/1 0.6.0
Tommy Carpenter [Wed, 25 Mar 2020 12:12:12 +0000 (08:12 -0400)]
Release 060

Issue-ID: RIC-228
Change-Id: I6adf0331c0bdfa684c25600e46ae05c418b538bc
Signed-off-by: Tommy Carpenter <tc677g@att.com>
4 years agoSwitch to SI95 24/2924/2
Tommy Carpenter [Mon, 23 Mar 2020 13:17:47 +0000 (09:17 -0400)]
Switch to SI95

Issue-ID: RIC-228
Change-Id: I806ad3f88eec550338ffba7812a6bd1e1ee3016f
Signed-off-by: Tommy Carpenter <tc677g@att.com>
4 years agoRelease 050 21/2921/1 0.5.0
Tommy Carpenter [Mon, 23 Mar 2020 12:07:46 +0000 (08:07 -0400)]
Release 050

Issue-ID: RIC-228
Change-Id: I59ec8c7e1e6f208401e0f78bea29051830df0b05
Signed-off-by: Tommy Carpenter <tc677g@att.com>
4 years agoXapps now have an accessible mdc logger. 48/2848/1
Tommy Carpenter [Wed, 18 Mar 2020 14:34:28 +0000 (10:34 -0400)]
Xapps now have an accessible mdc logger.

Issue-ID: RIC-228
Change-Id: Ic1a4a6931398535821db238ed0e67c8181c163bd
Signed-off-by: Tommy Carpenter <tc677g@att.com>
4 years agoSwitch to py38, latest go builder 36/2836/3
Tommy Carpenter [Tue, 17 Mar 2020 21:41:42 +0000 (17:41 -0400)]
Switch to py38, latest go builder

Issue-ID: RIC-228
Change-Id: I33910f9573e50b43eb1941c3178d2402ea88f0b9
Signed-off-by: Tommy Carpenter <tc677g@att.com>
4 years agoAdd Dockerized example (no code or version change) 06/2806/1
Tommy Carpenter [Mon, 16 Mar 2020 13:29:23 +0000 (09:29 -0400)]
Add Dockerized example (no code or version change)

Issue-ID: RIC-228
Change-Id: I69239ea7bb55b8e9962c62be1c12430fe2155448
Signed-off-by: Tommy Carpenter <tc677g@att.com>
4 years agoRelease 040 76/2776/2 0.4.0
Tommy Carpenter [Fri, 13 Mar 2020 15:17:02 +0000 (11:17 -0400)]
Release 040

Issue-ID: RIC-228
Change-Id: I8eddf555e3724f597f69e04b161d116be83d9d38
Signed-off-by: Tommy Carpenter <tc677g@att.com>
4 years agoDo not thread by default, but let the user choose. 72/2772/2
Tommy Carpenter [Fri, 13 Mar 2020 13:36:36 +0000 (09:36 -0400)]
Do not thread by default, but let the user choose.

Issue-ID: RIC-228
Change-Id: Iab4acea6b235cdf5acf734b23b0aa735ee41e19c
Signed-off-by: Tommy Carpenter <tc677g@att.com>
4 years agoRelease 030 47/2747/1 0.3.0
Tommy Carpenter [Wed, 11 Mar 2020 11:58:32 +0000 (07:58 -0400)]
Release 030

Issue-ID: RIC-228
Change-Id: Icfbedffbcab902bc50c6f11036847a70634959a0
Signed-off-by: Tommy Carpenter <tc677g@att.com>
4 years agoChanges to framework usage: 16/2716/6
Tommy Carpenter [Mon, 9 Mar 2020 17:46:37 +0000 (13:46 -0400)]
Changes to framework usage:

    * rather than subclass instantiation, xapps now use initialization and registration functions to register handlers
    * rmr xapps can now register handlers for specific message types (and they must prodive a default callback); if the user does this then "message to function routing" is now handled by the framework itself
    * RMRXapp now runs the polling loop in a thread, and returns execution back to the caller. The user is then free to loop, or do nothing, and call stop() when they want.
    * Raises tox coverage minimum to 70 from 50 (currently at 86)

Issue-ID: RIC-228
Change-Id: I15bfb708dbd14a46dc1207296e77383642d22b29
Signed-off-by: Tommy Carpenter <tc677g@att.com>
4 years agoRemove junit option from pytest invocation 92/2692/1
Lott, Christopher (cl778h) [Thu, 5 Mar 2020 20:08:50 +0000 (15:08 -0500)]
Remove junit option from pytest invocation

Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
Change-Id: I883197c58da7a57c7470f0b30ee6812298613cd2

4 years agoUpdate install docs (only). 88/2688/4
Tommy Carpenter [Thu, 5 Mar 2020 14:40:22 +0000 (09:40 -0500)]
Update install docs (only).

Issue-ID: RIC-228
Change-Id: I7cf31f1cf2e64cd459462a4268d06dd12d8966a3
Signed-off-by: Tommy Carpenter <tc677g@att.com>
4 years agoRelease 020 72/2672/1 0.2.0
Tommy Carpenter [Wed, 4 Mar 2020 14:31:57 +0000 (09:31 -0500)]
Release 020

Issue-ID: RIC-228
Change-Id: I184f09eb1abc8e6ea5868f32a9b84c116ca6df87
Signed-off-by: Tommy Carpenter <tc677g@att.com>
4 years agoFixes and enhancements: 37/2637/4
Tommy Carpenter [Tue, 3 Mar 2020 15:21:24 +0000 (10:21 -0500)]
Fixes and enhancements:

    * now allows for RMR Xapps to call code before entering the infinite loop
    * stop is now called before throwing NotImplemented in the case where the client fails to provide a must have callback; this ensures there is no dangling rmr thread
    * stop now calls rmr_close to correctly free up any port(s)
    * (breaking) renames `loop` to `entrypoint` since the function does not have to contain a loop (though it most likely does)
    * Changes wording around the two types of xapps (docs only)
    * Uses a new version of rmr python that crashes when the rmr mrc fails to init, which prevents an xapp trying to use an unusable rmr
    * more unit test code coverage
    * Adds more fields to setup like long_desc and classifiers so the pypi page looks nicer
    * Removes a bad release file (will be added back in subseq. commit)

Issue-ID: RIC-228
Change-Id: I2fa0fcce61f54d4ce1d6176ae71eb2139b1005a5
Signed-off-by: Tommy Carpenter <tc677g@att.com>
4 years agoRelease (by request) 30/2630/1
Tommy Carpenter [Mon, 2 Mar 2020 19:01:51 +0000 (14:01 -0500)]
Release (by request)

Change-Id: I3f6044e93fc6b1883a7ef3373061c00cae3f35bf
Signed-off-by: Tommy Carpenter <tc677g@att.com>
4 years agoAdd documentation in the required format. 17/2617/5
Tommy Carpenter [Fri, 28 Feb 2020 14:17:46 +0000 (09:17 -0500)]
Add documentation in the required format.

Also twiddles the tox to name the code job so that the verify job can be
changed to not run docs.

Issue-ID: RIC-228
Change-Id: I5ded9ae6d421f0906f9fb544ee78dfbf9e8f4291
Signed-off-by: Tommy Carpenter <tc677g@att.com>
4 years agoInitial pass of the py xapp frame 00/2600/11
Tommy Carpenter [Wed, 26 Feb 2020 19:12:54 +0000 (14:12 -0500)]
Initial pass of the py xapp frame

This is not yet completed:
- Docs will come soon
- More unit test coverage will come soon
- More functionality will come soon

However, to avoid a gargantuan commit at the beginning that solves world
hunger, we cut off here on a basically usable framework.

NOTE: a significant portion of this code is *already reviewed* as it
came out of A1. For example, the entire SDLWrapper class, and most of
the RMRLoop. This code will
be deleted from A1 when this is in pypi.

Issue-ID: RIC-228
Change-Id: I9f87b0178cf5fb1cb6b988c29ce11218ed575607
Signed-off-by: Tommy Carpenter <tc677g@att.com>
4 years agoAutomation adds INFO.yaml 89/2589/5
LF Jenkins CI [Wed, 26 Feb 2020 16:39:36 +0000 (16:39 +0000)]
Automation adds INFO.yaml

Change-Id: I322e5d24b4eee1d534198081023916d7d4805e22
Signed-off-by: lf-jobbuilder <releng+lf-jobbuilder@linuxfoundation.org>
4 years agoAutomation adds .gitreview 87/2587/2
LF Jenkins CI [Wed, 26 Feb 2020 16:25:59 +0000 (16:25 +0000)]
Automation adds .gitreview

Change-Id: I86d9bfb51aeaac3a794e398cd0ddbac038a51a68
Signed-off-by: lf-jobbuilder <releng+lf-jobbuilder@linuxfoundation.org>
4 years agoInitial empty repository
LF Jenkins CI [Thu, 6 Feb 2020 23:48:01 +0000 (23:48 +0000)]
Initial empty repository