Update Documentation
[oam.git] / solution / dev / client-scripts-ves-v7 / README.md
1 # O-RAN Components interfacing with VES-Collector
2
3 Test scripts for interfacing with DCAE.
4
5 ONAP Honolulu DCAE VES-Collector supports the interface definition  [CommonEventFormat_30.2.1_ONAP.json](https://gerrit.onap.org/r/gitweb?p=dcaegen2/collectors/ves.git;a=blob;f=etc/CommonEventFormat_30.2.1_ONAP.json).
6
7 The ONAP VES version is described in [ONAP documentation](https://docs.onap.org/projects/onap-vnfrqts-requirements/en/latest/Chapter8/ves_7_2/ves_event_listener_7_2.html?highlight=dcae%20ves%20header#).
8
9 VES domain 'stndDefined' offers the capability to inject external schema definitions of the VES.
10 This way the 3GPP notification syntax can be transported. Please see [SA88-Rel16 schema](https://forge.3gpp.org/rep/sa5/MnS/tree/SA88-Rel16/OpenAPI).
11
12
13 ## Prerequisites
14
15 This git project must be cloned on a ubuntu machine in order to execute the bash scripts.
16 DCAE provide REST interfaces. In order to perform HTTP request [cURL](https://curl.haxx.se/) is used. 
17
18 In case cURL needs to be please use the following command in a terminal.
19
20 ```
21 sudo apt install curl 
22 ```
23
24 Python3 is expected to run some scripts.
25
26 ```
27 pip3 install requests
28 ```
29
30 It is necessary to configure the DCAE servers for valid execution of the bash scripts.
31 Please update the variables in [config](-/config) accordingly to the test environment.
32
33 ```
34 urlVes=http://localhost:8443/eventListener/v7
35 basicAuthVes=sample1:sample1
36 ```
37
38 ## Concept
39
40 Several tests scripts are available in the root of this project. 
41 The bash and python scripts will perform an HTTPS-POST request to a VES-Collector.
42
43 ## VES Domains
44
45 The syntax of a single VES event is devices into a common header and an event
46 specific body.
47
48 The event specific bodies are are identified by the VES domain.
49
50 ### VES Domain "fault"
51
52 This script 'sendFault' sends a VES message of domain "fault" to DCAE. It requires three command line parameters:
53
54 1. **equipmentType**: Valid equipment types for 1806 and 1810 are [1234, FYNG, R2D2, 7DEV, nSky, 1OSF] according to document "295672 SDN-R System Requirements".
55
56 2. **alarmType**: or alarm name. Any string which references a supported alarm name of the equipment type.
57
58 3. **severity**: The severity of tha alarm as defined by [VES schema](https://gerrit.onap.org/r/gitweb?p=dcaegen2/collectors/ves.git;a=blob;f=etc/CommonEventFormat_30.2.1_ONAP.json). 
59
60 The following example show the usage of this script. The alarm "lossOfSignal" for equipment type "nSky" with severity "CRITICAL" will be send.
61
62 ```
63 ./sendFault.sh nSky lossOfSignal CRITICAL
64 ```
65
66 ### VES Domain "heartbeat",
67
68 The script 'sendVesHeartbeat' simulates a VES event of domain "heartbeat" from SDN-R to DCAE VES-Collector.
69
70 The following example show the usage of this script:
71
72 ```
73 python3 sendVesHeartbeat.py
74 ```
75
76 ### VES Domain "measurement",
77
78 This script 'send15minPm' sends a VES message of domain "measurementsForVfScaling" to DCAE. The script requires one input parameter. This parameter defines the equipment type. Valid equipment types for 1806 and 1810 are [1234, FYNG, R2D2, 7DEV, nSky, 1OSF] according to document "295672 SDN-R System Requirements".
79
80 ```
81 ./send15minPm.sh FYNG
82 ```
83
84 ### VES Domain "mobileFlow",
85
86 Not required by O-RAN Alliance OAM specification. 
87
88 ### VES Domain "notification",
89
90 The script 'sendVesNotification' simulates a VES event of domain "notification" from a network-function to DCAE VES-Collector.
91
92 The following example show the usage of this script:
93
94 ```
95 python3 sendVesNotification.py --pnfId nSky
96 ```
97
98 ### VES Domain "other",
99
100 Not required by O-RAN Alliance OAM specification. 
101
102 ### VES Domain "perf3gpp",
103
104 Not required by O-RAN Alliance OAM specification. 
105
106 ### VES Domain "pnfRegistration",
107
108 The script 'pnfRegister' creates a PNF object in A&AI. The script requires one input parameter. This parameter defines the equipment type. Valid equipment types for 1806 and 1810 are [1234, FYNG, R2D2, 7DEV, nSky, 1OSF] according to document "295672 SDN-R System Requirements".
109
110 ```
111 ./pnfRegister.sh 7DEV
112 ```
113 ### VES Domain "sipSignaling",
114
115 Not required by O-RAN Alliance OAM specification. 
116
117 ### VES Domain "stateChange",
118
119 The script 'sendVesStateChange' simulates a VES event of domain "stateChange" from a network-function to DCAE VES-Collector.
120
121 The following example show the usage of this script:
122
123 ```
124 python3 sendVesStateChange.py --pnfId nSky
125 ```
126
127 ### VES Domain "stndDefined",
128
129 The script 'sendVesStndDefined' simulates a VES event of domain "stateChange" from a network-function to DCAE VES-Collector. Four schema definitions by 3GPP are supported:
130
131 - 3GPP-FaultSupervision
132 - 3GPP-Heartbeat
133 - 3GPP-PerformanceAssurance
134 - 3GPP-Provisioning
135
136 The following examples show the usage of this script:
137
138 ```
139 python sendVesStndDefined.py --pnfId nSky --body 3GPP-FaultSupervision
140 python sendVesStndDefined.py --pnfId nSky --body 3GPP-Heartbeat
141 python sendVesStndDefined.py --pnfId nSky --body 3GPP-PerformanceAssurance
142 python sendVesStndDefined.py --pnfId nSky --body 3GPP-Provisioning
143  ```
144
145 ### VES Domain "syslog",
146
147 Not required by O-RAN Alliance OAM specification. 
148
149 ### VES Domain "thresholdCrossingAlert",
150
151 This script 'sendTca' sends a VES message of domain "thresholdCrossingAlert" to DCAE. It requires three command line parameters:
152
153 1. **equipmentType**: Valid equipment types for 1806 and 1810 are [1234, FYNG, R2D2, 7DEV, nSky, 1OSF] according to document "295672 SDN-R System Requirements".
154
155 2. **alarmType**: or alarm name. Any string which references a supported alarm name (TCA) of the equipment type.
156
157 3. **alertAction**: The action of TCA as defined by [VES schema](https://gerrit.onap.org/r/gitweb?p=dcaegen2/collectors/ves.git;a=blob;f=etc/CommonEventFormat_30.2.1_ONAP.json). 
158
159 The following example show the usage of this script. The TCA with name "TCA" for equipment type "1234" with alarmAction "SET" will be send.
160
161 ```
162 ./sendTca.sh 1234 TCA SET
163 ```
164
165 ### VES Domain "voiceQuality"
166
167 Not required by O-RAN Alliance OAM specification. 
168
169 ### Sending a VES event list
170
171 This script send a VES message of domain "fault" AND "heartbeat" as event list to DCAE. It requires three command line parameters:
172
173 1. **equipmentType**: Valid equipment types for 1806 and 1810 are [1234, FYNG, R2D2, 7DEV, nSky, 1OSF] according to document "295672 SDN-R System Requirements".
174
175 2. **alarmType**: or alarm name. Any string which references a supported alarm name of the equipment type.
176
177 3. **severity**: The severity of tha alarm as defined by [VES schema](https://gerrit.onap.org/r/gitweb?p=dcaegen2/collectors/ves.git;a=blob;f=etc/CommonEventFormat_30.2.1_ONAP.json). 
178
179 The following example show the usage of this script. The alarm "lossOfSignal" for equipment type "nSky" with severity "CRITICAL" will be send.
180
181 ```
182 ./sendEventList.sh 1234 lossOfSignal CRITICAL
183 ```