Update documentation
[oam.git] / solution / dev / ves-test-collector / client-scripts-ves-v7 / README.md
1 # O-RAN Components interfaceing with VES-Collector
2
3 Test scripts for interfaceing 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 maschine 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-get install curl 
19 ```
20
21 For interfacing with cert (https) and key must be extracted acoording to
22 https://wiki.web.att.com/pages/viewpage.action?spaceKey=SDNCDEV&title=Query+AAI+Using+Postman.
23 ```
24 ./_extractCertAndKey.sh
25 ```
26 You will be ask to enter the "Input Password". 
27 The password must not be shared here, please ask your admin.
28
29 It is nessary to configure the DCAE servers for valid excecution of the bash scripts.
30 Please update the varables in [config](-/config) accordintly to the test enviroment.
31
32 ```
33 urlVes=http://localhost:8443/eventListener/v7
34 basicAuthVes=ves:ves
35 ```
36
37 ## Concept
38
39 Several tests scripts are avialable in the root of this project. 
40 The bash scripts will perform a cURL command to send a REST request to the A&AI or DCAE server.
41
42 ![SDN-R NBIs](images/sndr-nbis.png "SDN-R NBIs" )
43
44 ## Scripts
45
46 This chapter descibes the several test scripts its usage and functions.
47
48 ### _example
49
50 This scripts calls all the other scripts in order to give valid examples and to expain by examples the usage ot the other scripts.
51
52 ```
53 ./_example.sh 
54 ```
55
56 Please see valid examples using the followfing command (or continue reading):
57
58 ```
59 cat _example.sh 
60 ```
61
62 ### createPnf
63
64 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".
65
66 ```
67 ./createPnf.sh 7DEV
68 ```
69
70 ### sendHeartbeat
71
72 The script sends a "heardbeat" from SDN-R to DCAE.
73
74 The following example show the usage of this script:
75 ```
76 ./sendHeartbeat.sh
77 ```
78
79
80 ### sendFault
81
82 This script send a VES message of domain "fault" to DCAE. It requires three command line parameters:
83
84 1. **equipmentType**: Valid equipment types for 1806 and 1810 are [1234, FYNG, R2D2, 7DEV, nSky, 1OSF] according to document "295672 SDN-R System Requirements".
85
86 2. **alarmType**: or alarm name. Any string which references a supported alarm name of the equipment type.
87
88 3. **severity**: The severity of tha alarm as defined by [VES schema](./json/schema/CommonEventFormat_30.1_ONAP.json). 
89
90 The following example show the usage of this script. The alarm "lossOfSignal" for equipment type "nSky" with severtiy "CRITICAL" will be send.
91
92 ```
93 ./sendFault.sh nSky lossOfSignal CRITICAL
94 ```
95
96
97 ### sendTca
98
99 This script send a VES message of domain "thresholdCrossingAlert" to DCAE. It requires three command line parameters:
100
101 1. **equipmentType**: Valid equipment types for 1806 and 1810 are [1234, FYNG, R2D2, 7DEV, nSky, 1OSF] according to document "295672 SDN-R System Requirements".
102
103 2. **alarmType**: or alarm name. Any string which references a supported alarm name (TCA) of the equipment type.
104
105 3. **alertAction**: The action of TCA as defined by [VES schema](./json/schema/CommonEventFormat_28.4.1.json). 
106
107 The following example show the usage of this script. The TCA with name "TCA" for equipment type "1234" with alarmAction "SET" will be send.
108
109 ```
110 ./sendTca.sh 1234 TCA SET
111 ```
112
113
114 ### send15minPm
115
116 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".
117
118 ```
119 ./send15minPm.sh FYNG
120 ```
121
122 ### sendEventList
123
124 This script send a VES message of domain "fault" AND "heartbeat" as event list to DCAE. It requires three command line parameters:
125
126 1. **equipmentType**: Valid equipment types for 1806 and 1810 are [1234, FYNG, R2D2, 7DEV, nSky, 1OSF] according to document "295672 SDN-R System Requirements".
127
128 2. **alarmType**: or alarm name. Any string which references a supported alarm name of the equipment type.
129
130 3. **severity**: The severity of tha alarm as defined by [VES schema](./json/schema/CommonEventFormat_30.1_ONAP.json). 
131
132 The following example show the usage of this script. The alarm "lossOfSignal" for equipment type "nSky" with severtiy "CRITICAL" will be send.
133
134 ```
135 ./sendEventList.sh 1234 lossOfSignal CRITICAL
136 ```