Lott, Christopher (cl778h) | 2407cdc | 2020-04-29 09:58:37 -0400 | [diff] [blame] | 1 | .. This work is licensed under a Creative Commons Attribution 4.0 International License. |
Lott, Christopher (cl778h) | ca170d3 | 2020-05-12 15:05:59 -0400 | [diff] [blame] | 2 | .. SPDX-License-Identifier: CC-BY-4.0 |
| 3 | .. Copyright (C) 2020 AT&T Intellectual Property |
Lott, Christopher (cl778h) | 2407cdc | 2020-04-29 09:58:37 -0400 | [diff] [blame] | 4 | |
| 5 | Developer Guide |
| 6 | =============== |
| 7 | |
Lott, Christopher (cl778h) | ca170d3 | 2020-05-12 15:05:59 -0400 | [diff] [blame] | 8 | This document explains how to maintain the RIC Xapp framework. |
| 9 | Information for users of this framework (i.e., Xapp developers) is in the User Guide. |
| 10 | |
Lott, Christopher (cl778h) | bbc9028 | 2020-05-07 08:39:49 -0400 | [diff] [blame] | 11 | Tech Stack |
| 12 | ---------- |
| 13 | |
| 14 | The framework requires Python version 3.7 or later, and depends on |
| 15 | these packages provided by the O-RAN-SC project and third parties: |
| 16 | |
| 17 | * msgpack |
| 18 | * mdclogpy |
| 19 | * ricsdl |
yc999.jang | 750eb5b | 2021-06-10 19:04:18 +0900 | [diff] [blame] | 20 | * protobuf |
Lott, Christopher (cl778h) | bbc9028 | 2020-05-07 08:39:49 -0400 | [diff] [blame] | 21 | |
Lott, Christopher (cl778h) | 2407cdc | 2020-04-29 09:58:37 -0400 | [diff] [blame] | 22 | |
| 23 | Version bumping the framework |
| 24 | ----------------------------- |
| 25 | |
| 26 | This project follows semver. When changes are made, the versions are in: |
| 27 | |
Lott, Christopher (cl778h) | bbc9028 | 2020-05-07 08:39:49 -0400 | [diff] [blame] | 28 | #. ``docs/release-notes.rst`` |
| 29 | #. ``setup.py`` |
Lott, Christopher (cl778h) | 2407cdc | 2020-04-29 09:58:37 -0400 | [diff] [blame] | 30 | |
| 31 | Version bumping RMR |
| 32 | ------------------- |
| 33 | |
Lott, Christopher (cl778h) | bbc9028 | 2020-05-07 08:39:49 -0400 | [diff] [blame] | 34 | These items in this repo must be kept in sync with the RMR version: |
| 35 | |
| 36 | #. Dockerfile-Unit-Test |
| 37 | #. examples/Dockerfile-Ping |
| 38 | #. examples/Dockerfile-Pong |
| 39 | #. ``rmr-version.yaml`` controls what version of RMR is installed for |
| 40 | unit testing in Jenkins CI |
Lott, Christopher (cl778h) | 2407cdc | 2020-04-29 09:58:37 -0400 | [diff] [blame] | 41 | |
Naman Gupta | bac1895 | 2021-06-03 21:49:17 +0530 | [diff] [blame] | 42 | Registration/Deregistartion of Xapp |
| 43 | ----------------------------------- |
| 44 | |
| 45 | For registration and deregistration of Xapp following items need to be defined: |
| 46 | |
| 47 | #. CONFIG_FILE_PATH variable as a environment variable in Dockerfile if running |
| 48 | Xapp as a docker container or in configmap in case of Xapp as a pod. |
| 49 | #. Copy the xappConfig.json into the docker image in Dockerfile. |
| 50 | |
Lott, Christopher (cl778h) | 2407cdc | 2020-04-29 09:58:37 -0400 | [diff] [blame] | 51 | |
| 52 | Unit Testing |
| 53 | ------------ |
| 54 | |
Lott, Christopher (cl778h) | bbc9028 | 2020-05-07 08:39:49 -0400 | [diff] [blame] | 55 | Running the unit tests requires the python packages ``tox`` and ``pytest``. |
| 56 | |
| 57 | The RMR library is also required during unit tests. If running directly from tox |
| 58 | (outside a Docker container), install RMR according to its instructions. |
| 59 | |
| 60 | Upon completion, view the test coverage like this: |
Lott, Christopher (cl778h) | 2407cdc | 2020-04-29 09:58:37 -0400 | [diff] [blame] | 61 | |
| 62 | :: |
| 63 | |
Lott, Christopher (cl778h) | bbc9028 | 2020-05-07 08:39:49 -0400 | [diff] [blame] | 64 | tox |
| 65 | open htmlcov/index.html |
| 66 | |
| 67 | Alternatively, if you cannot install RMR locally, you can run the unit |
| 68 | tests in Docker. This is somewhat less nice because you don't get the |
| 69 | pretty HTML report on coverage. |
| 70 | |
| 71 | :: |
| 72 | |
| 73 | docker build --no-cache -f Dockerfile-Unit-Test . |