CI: Add silent prescan SonarCloud job
[nonrtric/rapp/ransliceassurance.git] / smoversion / README.md
1 <!--
2  -
3    ========================LICENSE_START=================================
4    O-RAN-SC
5    %%
6    Copyright (C) 2022: Nordix Foundation
7    %%
8    Licensed under the Apache License, Version 2.0 (the "License");
9    you may not use this file except in compliance with the License.
10    You may obtain a copy of the License at
11
12         http://www.apache.org/licenses/LICENSE-2.0
13
14    Unless required by applicable law or agreed to in writing, software
15    distributed under the License is distributed on an "AS IS" BASIS,
16    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17    See the License for the specific language governing permissions and
18    limitations under the License.
19    ========================LICENSE_END===================================
20
21 -->
22 # O-RAN-SC Non-RealTime RIC O-DU Closed Loop use case Slice Assurance
23
24 ## Configuration
25
26 The consumer takes a number of environment variables, described below, as configuration.
27
28 >- MR_HOST              **Required**. The host for DMaaP Message Router.                           Example: `http://mrproducer`
29 >- MR_PORT              **Required**. The port for the DMaaP Message Router.                       Example: `8095`
30 >- SDNR_ADDR            Optional. The address for SDNR.                                            Defaults to `http://localhost:3904`.
31 >- SDNR_USER            Optional. The user for the SDNR.                                           Defaults to `admin`.
32 >- SDNR_PASSWORD        Optional. The password for the SDNR user.                                  Defaults to `Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U`.
33 >- LOG_LEVEL            Optional. The log level, which can be `Error`, `Warn`, `Info` or `Debug`.  Defaults to `Info`.
34 >- POLLTIME             Optional. Waiting time between one pull request to DMaaP and another.      Defaults to 10 sec
35
36 ## Functionality
37
38 There is a status call provided in a REST API on port 40936.
39
40 >- /status  OK
41
42 ## Development
43
44 To make it easy to test during development of the consumer, there is a stub provided in the `stub` folder.
45
46 This stub is used to simulate both received VES messages from DMaaP MR with information about performance measurements for the slices in a determined DU and also SDNR, that sends information about Radio Resource Management Policy Ratio and allows to modify value for RRM Policy Dedicated Ratio from default to higher value.
47
48 By default, SDNR stub listens to the port `3904`, but his can be overridden by passing a `--sdnr-port [PORT]` flag when starting the stub. For DMaaP MR stub default port is `3905` but it can be overridden by passing a `--dmaap-port [PORT]` flag when starting the stub.
49
50 To build and start the stub, do the following:
51
52 >1. cd stub
53 >2. go build
54 >3. ./stub [--sdnr-port <portNo>] [--dmaap-port <portNo>]