blob: 6892d1514c818180246673617fcc8b7e520cf810 [file] [log] [blame]
Lott, Christopher (cl778h)2407cdc2020-04-29 09:58:37 -04001.. This work is licensed under a Creative Commons Attribution 4.0 International License.
Lott, Christopher (cl778h)ca170d32020-05-12 15:05:59 -04002.. SPDX-License-Identifier: CC-BY-4.0
3.. Copyright (C) 2020 AT&T Intellectual Property
Lott, Christopher (cl778h)2407cdc2020-04-29 09:58:37 -04004
5Developer Guide
6===============
7
Lott, Christopher (cl778h)ca170d32020-05-12 15:05:59 -04008This document explains how to maintain the RIC Xapp framework.
9Information for users of this framework (i.e., Xapp developers) is in the User Guide.
10
Lott, Christopher (cl778h)bbc90282020-05-07 08:39:49 -040011Tech Stack
12----------
13
14The framework requires Python version 3.7 or later, and depends on
15these packages provided by the O-RAN-SC project and third parties:
16
17* msgpack
18* mdclogpy
19* ricsdl
yc999.jang750eb5b2021-06-10 19:04:18 +090020* protobuf
Lott, Christopher (cl778h)bbc90282020-05-07 08:39:49 -040021
Lott, Christopher (cl778h)2407cdc2020-04-29 09:58:37 -040022
23Version bumping the framework
24-----------------------------
25
26This project follows semver. When changes are made, the versions are in:
27
Lott, Christopher (cl778h)bbc90282020-05-07 08:39:49 -040028#. ``docs/release-notes.rst``
29#. ``setup.py``
Lott, Christopher (cl778h)2407cdc2020-04-29 09:58:37 -040030
31Version bumping RMR
32-------------------
33
Lott, Christopher (cl778h)bbc90282020-05-07 08:39:49 -040034These 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)2407cdc2020-04-29 09:58:37 -040041
Naman Guptabac18952021-06-03 21:49:17 +053042Registration/Deregistartion of Xapp
43-----------------------------------
44
45For 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)2407cdc2020-04-29 09:58:37 -040051
52Unit Testing
53------------
54
Lott, Christopher (cl778h)bbc90282020-05-07 08:39:49 -040055Running the unit tests requires the python packages ``tox`` and ``pytest``.
56
57The 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
60Upon completion, view the test coverage like this:
Lott, Christopher (cl778h)2407cdc2020-04-29 09:58:37 -040061
62::
63
Lott, Christopher (cl778h)bbc90282020-05-07 08:39:49 -040064 tox
65 open htmlcov/index.html
66
67Alternatively, if you cannot install RMR locally, you can run the unit
68tests in Docker. This is somewhat less nice because you don't get the
69pretty HTML report on coverage.
70
71::
72
73 docker build --no-cache -f Dockerfile-Unit-Test .