Update Committers - remove Henrik
[nonrtric/rapp/healthcheck.git] / README.md
1 # Use case Health Check test
2
3 ## General
4
5 The Health Check use case test provides a python script that regularly creates, reads, updates, and deletes a policy
6 in all Near-RT RICs that support the type used by the script. A self refreshing web page provides a view of statistics
7 for these regular checks.
8
9 ## Prerequisites
10
11 To run this script Python3 needs to be installed. To install the script's dependencies, run the following command from
12 the `src` folder: `pip install -r requirements.txt`
13
14 ## How to run
15
16 To start the Policy Management Service (PMS) and RIC simulators and install the default policy type, do the following:
17
18 1. Go to the `test` folder.
19 2. Check that the `start.sh` script has the correct versions of PMS and simulators. If not, update it to the correct versions.
20 3. Run the `start.sh` script.
21 4. The script will finnish when the policy type is registered and synched in PMS.
22
23 To start the use case, go to the `src/` folder and run `python3 main.py`. The script will start and run until stopped. Use the `-h` option to
24 see the options available for the script.
25
26 As default, the script uses the "Hello World" policy type with ID "2". To create the instances it uses the body file
27 `nonrtric/test/autotest/testdata/OSC/pihw_template.json`. The body file contains the string "XXX" as a parameter value.
28 This string will be replaced with dynamic data during creation. It is possible to provide a custom policy type and
29 body file to the script at startup.
30
31 To see the web page, navigate to `localhost:9990/stats`. The page refreshes itself with the same interval as the script
32 uses.
33
34 To stop PMS and the simulators, run the `stop.sh` script.
35
36 ## License
37
38 Copyright (C) 2020-2022 Nordix Foundation.
39 Licensed under the Apache License, Version 2.0 (the "License")
40 you may not use this file except in compliance with the License.
41 You may obtain a copy of the License at
42
43       http://www.apache.org/licenses/LICENSE-2.0
44
45 Unless required by applicable law or agreed to in writing, software
46 distributed under the License is distributed on an "AS IS" BASIS,
47 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
48 See the License for the specific language governing permissions and
49 limitations under the License.
50
51 For more information about license please see the [LICENSE](LICENSE.txt) file for details.