fbb5ed26dcb360f933be2218a69b0965b2b49ed2
[oam.git] / solution / dev / ves-test-collector / client-scripts-ves-v7 / README.md
1 # O-RAN Components interfacing with VES-Collector
2
3 Test scripts for interfacing with DCAE.
4
5 For ONAP Frankfurt the interface definition with DCAE is: [CommonEventFormat_30.1_ONAP.json](./json/schema/CommonEventFormat_30.1_ONAP.json).
6 The ONAP VES version are described in [ONAP documentation](https://onap.readthedocs.io/en/latest/submodules/vnfrqts/requirements.git/docs/Chapter8/ves7_1spec.html).
7
8 For ONAP Frankfurt the interface definition with A&AI is: [add link when known]().
9
10 ## Prerequisites
11
12 This git project must be cloned on a ubuntu machine in order to execute the bash scripts.
13 DCAE provide REST interfaces. In order to perform HTTP request [cURL](https://curl.haxx.se/) is used. 
14
15 In case cURL needs to be please use the following command in a terminal.
16
17 ```
18 sudo apt install curl 
19 ```
20
21 It is necessary to configure the DCAE servers for valid execution of the bash scripts.
22 Please update the variables in [config](-/config) accordingly to the test environment.
23
24 ```
25 urlVes=http://localhost:8443/eventListener/v7
26 basicAuthVes=ves:ves
27 ```
28
29 ## Concept
30
31 Several tests scripts are available in the root of this project. 
32 The bash scripts will perform a cURL command to send a REST request to the A&AI or DCAE server.
33
34 ![SDN-R NBIs](images/sndr-nbis.png "SDN-R NBIs" )
35
36 ## Scripts
37
38 This chapter describes the several test scripts its usage and functions.
39
40 ### _example
41
42 This scripts calls all the other scripts in order to give valid examples and to expain by examples the usage ot the other scripts.
43
44 ```
45 ./_example.sh 
46 ```
47
48 Please see valid examples using the following command (or continue reading):
49
50 ```
51 cat _example.sh 
52 ```
53
54 ### pnfRegistration
55
56 The script 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".
57
58 ```
59 ./pnfRegister.sh 7DEV
60 ```
61
62 ### sendHeartbeat
63
64 The script sends a "heartbeat" from SDN-R to DCAE VES-Collector.
65
66 The following example show the usage of this script:
67 ```
68 ./sendHeartbeat.sh
69 ```
70
71
72 ### sendFault
73
74 This script send a VES message of domain "fault" to DCAE. It requires three command line parameters:
75
76 1. **equipmentType**: Valid equipment types for 1806 and 1810 are [1234, FYNG, R2D2, 7DEV, nSky, 1OSF] according to document "295672 SDN-R System Requirements".
77
78 2. **alarmType**: or alarm name. Any string which references a supported alarm name of the equipment type.
79
80 3. **severity**: The severity of tha alarm as defined by [VES schema](./json/schema/CommonEventFormat_30.1_ONAP.json). 
81
82 The following example show the usage of this script. The alarm "lossOfSignal" for equipment type "nSky" with severity "CRITICAL" will be send.
83
84 ```
85 ./sendFault.sh nSky lossOfSignal CRITICAL
86 ```
87
88
89 ### sendTca
90
91 This script send a VES message of domain "thresholdCrossingAlert" to DCAE. It requires three command line parameters:
92
93 1. **equipmentType**: Valid equipment types for 1806 and 1810 are [1234, FYNG, R2D2, 7DEV, nSky, 1OSF] according to document "295672 SDN-R System Requirements".
94
95 2. **alarmType**: or alarm name. Any string which references a supported alarm name (TCA) of the equipment type.
96
97 3. **alertAction**: The action of TCA as defined by [VES schema](./json/schema/CommonEventFormat_28.4.1.json). 
98
99 The following example show the usage of this script. The TCA with name "TCA" for equipment type "1234" with alarmAction "SET" will be send.
100
101 ```
102 ./sendTca.sh 1234 TCA SET
103 ```
104
105
106 ### send15minPm
107
108 This script send 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".
109
110 ```
111 ./send15minPm.sh FYNG
112 ```
113
114 ### sendEventList
115
116 This script send a VES message of domain "fault" AND "heartbeat" as event list to DCAE. It requires three command line parameters:
117
118 1. **equipmentType**: Valid equipment types for 1806 and 1810 are [1234, FYNG, R2D2, 7DEV, nSky, 1OSF] according to document "295672 SDN-R System Requirements".
119
120 2. **alarmType**: or alarm name. Any string which references a supported alarm name of the equipment type.
121
122 3. **severity**: The severity of tha alarm as defined by [VES schema](./json/schema/CommonEventFormat_30.1_ONAP.json). 
123
124 The following example show the usage of this script. The alarm "lossOfSignal" for equipment type "nSky" with severity "CRITICAL" will be send.
125
126 ```
127 ./sendEventList.sh 1234 lossOfSignal CRITICAL
128 ```