bbd6fcce4ea5b40ac48b948bfb7c8503b5f01395
[nonrtric.git] / policy-agent / README.md
1 # O-RAN-SC NonRT RIC Dashboard Web Application
2
3 The O-RAN NonRT RIC PolicyAgent provides a REST API for management of policices.
4 It provides support for:
5  -Supervision of clients (R-APPs) to eliminate stray policies in case of failure
6  -Consistency monitoring of the SMO view of policies and the actual situation in the RICs
7  -Consistency monitoring of RIC capabilities (policy types)
8  -Policy configuration. This includes:
9   -One REST API towards all RICs in the network
10   -Query functions that can find all policies in a RIC, all policies owned by a service (R-APP),
11    all policies of a type etc.
12   -Maps O1 resources (ManagedElement) as defined in O1 to the controlling RIC
13
14 To Run Policy Agent in Local:
15 In the folder /opt/app/policy-agent/config/, create a soft link with below command,
16 ln -s <path to test_application_configuration.json> application_configuration.json
17
18 To Run Policy Agent in Local with the DMaaP polling turned on:
19 In the folder /opt/app/policy-agent/config/, create a soft link with below command,
20 ln -s <path to test_application_configuration_with_dmaap_config.json> application_configuration.json
21
22 The agent can be run stand alone in a simulated test mode. Then it simulates RICs.
23 The REST API is published on port 8081 and it is started by command:
24 mvn -Dtest=MockPolicyAgent test
25
26 The backend server publishes live API documentation at the
27 URL `http://your-host-name-here:8081/swagger-ui.html`
28
29 PolicyAgent uses A1-POLICY-AGENT-READ & A1-POLICY-AGENT-WRITE topic for subscribe & Publish to the DMaap.
30 Sample Request Message to DMaaP:
31 {
32   "type": "request",
33   "target": "policy-agent",
34   "timestamp": "2019-05-14T11:44:51.36Z",
35   "operation": "GET",
36   "correlationId": "c09ac7d1-de62-0016-2000-e63701125557-201",
37   "apiVersion": "1.0",
38   "originatorId": "849e6c6b420",
39   "requestId": "23343221",
40   "url": "/policies?type=type1&ric=ric1&service=service1"
41 }
42
43 Sample Response Message to DMaaP:
44 {
45   "type": "response",
46   "timestamp": "2019-05-14T11:44:51.36Z",
47   "correlationId": "c09ac7d1-de62-0016-2000-e63701125557-201",
48   "originatorId": "849e6c6b420",
49   "requestId": "23343221",
50   "status": "200 OK",
51   "message": []
52 }
53
54 ## License
55
56 Copyright (C) 2019 Nordix Foundation. All rights reserved.
57 Licensed under the Apache License, Version 2.0 (the "License");
58 you may not use this file except in compliance with the License.
59 You may obtain a copy of the License at
60
61      http://www.apache.org/licenses/LICENSE-2.0
62
63 Unless required by applicable law or agreed to in writing, software
64 distributed under the License is distributed on an "AS IS" BASIS,
65 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
66 See the License for the specific language governing permissions and
67 limitations under the License.