X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=test%2Fusecases%2Flinkfailure%2FREADME.md;h=f9e02482611404cf513750d6ae5d92f2e396ba03;hb=refs%2Fchanges%2F44%2F6044%2F1;hp=76c22d94d51ba82d5fb21e0df07d19859f112dbb;hpb=c4d4c18bdac10d5ae35f24d8bcd9db2271124c0b;p=nonrtric.git diff --git a/test/usecases/linkfailure/README.md b/test/usecases/linkfailure/README.md index 76c22d94..f9e02482 100644 --- a/test/usecases/linkfailure/README.md +++ b/test/usecases/linkfailure/README.md @@ -4,7 +4,7 @@ The Link Failure use case test provides a python script that regularly polls DMaaP Message Router (MR) for "CUS Link Failure" messages. -When such a message appears with the "eventSeverity" set to "CRITICAL" a configuration change message with the +When such a message appears with the "eventSeverity" set to anything but "NORMAL", a configuration change message with the "administrative-state" set to "UNLOCKED" will be sent to the O-DU mapped to the O-RU that sent the alarm. When such a message appears with the "eventSeverity" set to "NORMAL" a printout will be made to signal that the @@ -12,18 +12,47 @@ alarm has been cleared, provided that the verbose option has been used when the # Prerequisits To run this script Python3 needs to be installed. To install the script's dependencies, run the following command from -the `src` folder: `pip install -r requirements.txt` +the `app` folder: `pip install -r requirements.txt` Also, the MR needs to be up and running with a topic created for the alarms and there must be an endpoint for the configuration change event that will accept these. +The host names and the ports to the MR and SDNR services can be provided when the container is started if the default +values are not correct. The topic can also be changed. + +The mapping from O-RU ID to O-DU ID is specified in the file `o-ru-to-o-du-map.txt`. This can be replaced by providing +a different file when starting the application. + For convenience, a message generator and a change event endpoint simulator are provided. -# How to run -Go to the `src/` folder and run `python3 main.py`. The script will start and run until stopped. Use the `-h` option to +# How to run from command line +Go to the `app/` folder and run `python3 main.py`. The script will start and run until stopped. Use the `-h` option to see the options available for the script. +# How to run in Docker +Go to the `app/` folder and run `docker build -t oru-app .`. + +The container must be connected to the same network as the MR and SDNR are running in. Some of the parameters to the application +can be provided with the `-e PARAM_NAME=PARAM_VALUE` notation. Start the container by using the command, with available params listed: + `docker run --network [NETWORK NAME] --name oru-app -e VERBOSE=on -e MR-HOST=[HOST NAME OF MR] -e MR-PORT=[PORT OF MR] -e SDNR-HOST=[HOST NAME OF SDNR] -e SDNR-PORT=[PORT OF SDNR] oru-app`. + +To build the image for the message generator, run the following command from the `simulators` folder: +`docker build -f Dockerfile-message-generator -t message-generator .` + +The message generator's container must be connected to the same network as the other components are running in. Some of the +parameters to the application can be provided with the `-e PARAM_NAME=PARAM_VALUE` notation. Start the container by +using the command, with available params listed: + `docker run --network [NETWORK NAME] --name message-generator -e MR-HOST=[HOST NAME OF MR] -e MR-PORT=[PORT OF MR] message-generator`. + +To build the image for the SDNR simulator, run the following command from the `simulators` folder: +`docker build -f Dockerfile-sdnr-sim -t message-generator .` + +The SDNR simulator's container must be connected to the same network as the the other components are running in. Some of the +parameters to the application can be provided with the `-e PARAM_NAME=PARAM_VALUE` notation. Start the container by +using the command, with available params listed: + `docker run --network [NETWORK NAME] --name sdnr-simulator -e MR-HOST=[HOST NAME OF MR] -e MR-PORT=[PORT OF MR] sdnr-simulator`. + ## License Copyright (C) 2021 Nordix Foundation.