# ================================================================================== # Copyright (c) 2020 HCL Technologies Limited. # # Licensed under the Apache License, Version 2.0 (the “License”); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an “AS IS” BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ==================================================================================

AD xApp

Anomaly Detection Overview

Anomaly Detection (AD) is an Xapp in the Traffic Steering O-RAN use case, which perfrom the following tasks:

  1. Data will be inserted into influxDB when xApp starts. This will be removed in Future when data will be coming via KPIMON to influxDB.

  2. AD, which iterates per 10 mili-second, fetches UE information from databse and send prediction to Traffic Steering

  3. Traffic Steering send acknowldgement back to AD.

Expected Input

The AD Xapp expects input in following structure:

{ ‘du-id’ : 1003, ‘nrCellIdentity’ : “c3/B13”, ‘prb_usage’ : 23.0, ‘rsrp’ : 84.0, ‘rsrq’ : 65.0, ‘rssinr’:65.0, ‘targetTput’ : 0.1, ‘throughput’ : , ‘ue-id’ : “Waiting passenger 1”, ‘x’ : -556, ‘y’ : -1160, ‘measTimeStampRf’ : “2021-05-12T07:43:51.652” }

Expected Output

The AD Xapp should Detect Anomulous UE’s and send those UE’s information as a JSON message via RMR with the following structure:

{ ‘ue-id’ : “Waiting passenger 1”, ‘measTimeStampRf’ : “2021-05-12T07:43:51.652”, ‘du-id’ : 1003, ‘Degradation’: “RSRP RSSINR” }

# ================================================================================== # Copyright (c) 2020 HCL Technologies Limited. # # Licensed under the Apache License, Version 2.0 (the “License”); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an “AS IS” BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ==================================================================================

Developers Guide

Version bumping the Xapp

This project follows semver. When changes are made, update the version strings in:

  1. container-tag.yaml

  2. docs/release-notes.rst

  3. setup.py

  4. xapp-descriptor/config.json

Testing RMR Healthcheck

The following instructions should deploy the AD container in bare docker, and allow you to test that the RMR healthcheck is working.

docker build -t ad:latest -f  Dockerfile .
docker run -d --net=host -e USE_FAKE_SDL=1 ad:latest
docker exec -it CONTAINER_ID /usr/local/bin/rmr_probe -h 127.0.0.1:4560

Unit Testing

Running the unit tests requires the python packages tox and pytest.

The RMR library is also required during unit tests. If running directly from tox (outside a Docker container), install RMR according to its instructions.

Upon completion, view the test coverage like this:

tox
open htmlcov/index.html

Alternatively, if you cannot install RMR locally, you can run the unit tests in Docker. This is somewhat less nice because you don’t get the pretty HTML report on coverage.

docker build  --no-cache -f Dockerfile-Unit-Test .

.# ================================================================================== # Copyright (c) 2020 HCL Technologies Limited. # # Licensed under the Apache License, Version 2.0 (the “License”); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an “AS IS” BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ==================================================================================

Release Notes

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

[1.0.0] - 2022-12-09

[0.0.2] - 2021-07-5

[0.0.1] - 2020-08-11