# The Jenkins job uses this string for the tag in the image name
# for example nexus3.o-ran-sc.org:10004/my-image-name:my-tag
---
-tag: 1.0.8
+tag: 1.0.9
#. ``container-tag.yaml``
#. ``docs/release-notes.rst``
#. ``setup.py``
+#. ``xapp-descriptor/config.json``
Testing RMR Healthcheck
docker build -t qpd:latest -f Dockerfile .
docker run -d --net=host -e USE_FAKE_SDL=1 qpd:latest
- docker exec -it CONTAINER_ID /usr/local/bin/rmr_probe -h 127.0.0.1:4562
+ docker exec -it CONTAINER_ID /usr/local/bin/rmr_probe -h 127.0.0.1:4560
+
Unit Testing
------------
The format is based on `Keep a Changelog <http://keepachangelog.com/>`__
and this project adheres to `Semantic Versioning <http://semver.org/>`__.
+
+[1.0.9] - 2020-06-02
+--------------------
+* Change RMR listen port to 4560 (`RICAPP-112 <https://jira.o-ran-sc.org/browse/RICAPP-112>`_)
+
+
[1.0.8] - 2020-05-22
--------------------
* Revise static route table (`RICAPP-108 <https://jira.o-ran-sc.org/browse/RICAPP-108>`_)
-"""
-qpdriver entrypoint module
-"""
# ==================================================================================
# Copyright (c) 2020 AT&T Intellectual Property.
#
# See the License for the specific language governing permissions and
# limitations under the License.
# ==================================================================================
-import json
-from os import getenv
-from ricxappframe.xapp_frame import RMRXapp, rmr
-from qpdriver import data
-from qpdriver.exceptions import UENotFound
-
"""
+qpdriver entrypoint module
+
RMR Messages
#define TS_UE_LIST 30000
#define TS_QOE_PRED_REQ 30001
30000 is the message type QPD receives; sends out type 30001, which should be routed to QP.
"""
+import json
+from os import getenv
+from ricxappframe.xapp_frame import RMRXapp, rmr
+from qpdriver import data
+from qpdriver.exceptions import UENotFound
+
+# pylint: disable=invalid-name
rmr_xapp = None
def post_init(self):
+ """
+ Function that runs when xapp initialization is complete
+ """
self.def_hand_called = 0
self.traffic_steering_requests = 0
def default_handler(self, summary, sbuf):
+ """
+ Function that processes messages for which no handler is defined
+ """
self.def_hand_called += 1
- self.logger.info("QP Driver received an unexpected message of type: {}, dropping.".format(summary[rmr.RMR_MS_MSG_TYPE]))
+ self.logger.warning("QP Driver received an unexpected message of type: {}".format(summary[rmr.RMR_MS_MSG_TYPE]))
self.rmr_free(sbuf)
try:
to_qpp = data.form_qp_pred_req(self, ueid)
payload = json.dumps(to_qpp).encode()
- ok = self.rmr_send(payload, 30001)
- if not ok:
+ success = self.rmr_send(payload, 30001)
+ if not success:
self.logger.debug("QP Driver was unable to send to QP!")
except UENotFound:
self.logger.debug("Received a TS Request for a UE that does not exist!")
"""
global rmr_xapp
fake_sdl = getenv("USE_FAKE_SDL", None)
- rmr_xapp = RMRXapp(default_handler, post_init=post_init, use_fake_sdl=True if fake_sdl else False)
+ rmr_xapp = RMRXapp(default_handler, rmr_port=4560, post_init=post_init, use_fake_sdl=bool(fake_sdl))
rmr_xapp.register_callback(steering_req_handler, 30000)
rmr_xapp.run(thread)
def get_stats():
- # hacky for now, will evolve
- return {"DefCalled": rmr_xapp.def_hand_called, "SteeringRequests": rmr_xapp.traffic_steering_requests}
+ """
+ hacky for now, will evolve
+ """
+ return {"DefCalled": rmr_xapp.def_hand_called,
+ "SteeringRequests": rmr_xapp.traffic_steering_requests}
setup(
name="qpdriver",
- version="1.0.8",
+ version="1.0.9",
packages=find_packages(exclude=["tests.*", "tests"]),
author="Tommy Carpenter",
description="QP Driver Xapp for traffic steering",
newrt|start
-rte|30001|service-ricxapp-qp-rmr.ricxapp.svc.cluster.local:4562
+rte|30001|service-ricxapp-qp-rmr.ricxapp.svc.cluster.local:4560
newrt|end
# do NOT use localhost, seems unresolved on jenkins VMs
newrt|start
-mse| 30000 | -1 | 127.0.0.1:4562
+mse| 30000 | -1 | 127.0.0.1:4560
mse| 30001 | -1 | 127.0.0.1:4666
-mse| 60001 | -1 | 127.0.0.1:4562
+mse| 60001 | -1 | 127.0.0.1:4560
newrt|end
-{\r
- "xapp_name": "qpdriver",\r
- "version": "1.0.0",\r
- "containers": [\r
- {\r
- "name": "qpdriver",\r
- "image": {\r
- "registry": "nexus3.o-ran-sc.org:10002",\r
- "name": "o-ran-sc/ric-app-qp-driver",\r
- "tag": "1.0.8"\r
- }\r
- }\r
- ],\r
- "messaging": {\r
- "ports": [\r
- {\r
- "name": "rmr-data-in",\r
- "container": "qpdriver",\r
- "port": 4562,\r
- "rxMessages": ["TS_UE_LIST"],\r
- "txMessages": [ "TS_QOE_PRED_REQ" ],\r
- "policies": [],\r
- "description": "rmr receive data port for qpdriver"\r
- },\r
- {\r
- "name": "rmr-route",\r
- "container": "qpdriver",\r
- "port": 4561,\r
- "description": "rmr route port for qpdriver"\r
- }\r
- ]\r
- },\r
- "rmr": {\r
- "protPort": "tcp:4562",\r
- "maxSize": 2072,\r
- "numWorkers": 1,\r
- "txMessages": ["TS_QOE_PRED_REQ"],\r
- "rxMessages": ["TS_UE_LIST"],\r
- "policies": []\r
- }\r
- }\r
+{
+ "xapp_name": "qpdriver",
+ "version": "1.0.9",
+ "containers": [
+ {
+ "name": "qpdriver",
+ "image": {
+ "registry": "nexus3.o-ran-sc.org:10002",
+ "name": "o-ran-sc/ric-app-qp-driver",
+ "tag": "1.0.9"
+ }
+ }
+ ],
+ "messaging": {
+ "ports": [
+ {
+ "name": "rmr-data",
+ "container": "qpdriver",
+ "port": 4560,
+ "rxMessages": ["TS_UE_LIST"],
+ "txMessages": ["TS_QOE_PRED_REQ"],
+ "policies": [],
+ "description": "rmr receive data port for qpdriver"
+ },
+ {
+ "name": "rmr-route",
+ "container": "qpdriver",
+ "port": 4561,
+ "description": "rmr route port for qpdriver"
+ }
+ ]
+ },
+ "rmr": {
+ "protPort": "tcp:4560",
+ "maxSize": 2072,
+ "numWorkers": 1,
+ "txMessages": ["TS_QOE_PRED_REQ"],
+ "rxMessages": ["TS_UE_LIST"],
+ "policies": []
+ }
+ }