X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=solution%2Fdev%2Fves-test-collector%2Fclient-scripts-ves-v7%2FREADME.md;h=3b33358ed41a271344362fae03df9721447d512e;hb=ec4103e68d56ea46532268efd7b59a42d1092530;hp=fbb5ed26dcb360f933be2218a69b0965b2b49ed2;hpb=a48b8d6f32b2a65316362f533a8e80641b196720;p=oam.git diff --git a/solution/dev/ves-test-collector/client-scripts-ves-v7/README.md b/solution/dev/ves-test-collector/client-scripts-ves-v7/README.md index fbb5ed2..3b33358 100644 --- a/solution/dev/ves-test-collector/client-scripts-ves-v7/README.md +++ b/solution/dev/ves-test-collector/client-scripts-ves-v7/README.md @@ -2,10 +2,13 @@ Test scripts for interfacing with DCAE. -For ONAP Frankfurt the interface definition with DCAE is: [CommonEventFormat_30.1_ONAP.json](./json/schema/CommonEventFormat_30.1_ONAP.json). -The ONAP VES version are described in [ONAP documentation](https://onap.readthedocs.io/en/latest/submodules/vnfrqts/requirements.git/docs/Chapter8/ves7_1spec.html). +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). + +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#). + +VES domain 'stndDefined' offers the capability to inject external schema definitions of the VES. +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). -For ONAP Frankfurt the interface definition with A&AI is: [add link when known](). ## Prerequisites @@ -18,83 +21,140 @@ In case cURL needs to be please use the following command in a terminal. sudo apt install curl ``` +Python3 is expected to run some scripts. + +``` +pip3 install requests +``` + It is necessary to configure the DCAE servers for valid execution of the bash scripts. Please update the variables in [config](-/config) accordingly to the test environment. ``` urlVes=http://localhost:8443/eventListener/v7 -basicAuthVes=ves:ves +basicAuthVes=sample1:sample1 ``` ## Concept Several tests scripts are available in the root of this project. -The bash scripts will perform a cURL command to send a REST request to the A&AI or DCAE server. +The bash and python scripts will perform an HTTPS-POST request to a VES-Collector. -![SDN-R NBIs](images/sndr-nbis.png "SDN-R NBIs" ) +## VES Domains -## Scripts +The syntax of a single VES event is devices into a common header and an event +specific body. -This chapter describes the several test scripts its usage and functions. +The event specific bodies are are identified by the VES domain. -### _example +### VES Domain "fault" -This scripts calls all the other scripts in order to give valid examples and to expain by examples the usage ot the other scripts. +This script 'sendFault' sends a VES message of domain "fault" to DCAE. It requires three command line parameters: + +1. **equipmentType**: Valid equipment types for 1806 and 1810 are [1234, FYNG, R2D2, 7DEV, nSky, 1OSF] according to document "295672 SDN-R System Requirements". + +2. **alarmType**: or alarm name. Any string which references a supported alarm name of the equipment type. + +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). + +The following example show the usage of this script. The alarm "lossOfSignal" for equipment type "nSky" with severity "CRITICAL" will be send. ``` -./_example.sh +./sendFault.sh nSky lossOfSignal CRITICAL ``` -Please see valid examples using the following command (or continue reading): +### VES Domain "heartbeat", + +The script 'sendVesHeartbeat' simulates a VES event of domain "heartbeat" from SDN-R to DCAE VES-Collector. + +The following example show the usage of this script: ``` -cat _example.sh +python3 sendVesHeartbeat.py ``` -### pnfRegistration +### VES Domain "measurement", -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". +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". ``` -./pnfRegister.sh 7DEV +./send15minPm.sh FYNG ``` -### sendHeartbeat +### VES Domain "mobileFlow", + +Not required by O-RAN Alliance OAM specification. + +### VES Domain "notification", -The script sends a "heartbeat" from SDN-R to DCAE VES-Collector. +The script 'sendVesNotification' simulates a VES event of domain "notification" from a network-function to DCAE VES-Collector. The following example show the usage of this script: + ``` -./sendHeartbeat.sh +python3 sendVesNotification.py --pnfId nSky ``` +### VES Domain "other", -### sendFault +Not required by O-RAN Alliance OAM specification. -This script send a VES message of domain "fault" to DCAE. It requires three command line parameters: +### VES Domain "perf3gpp", -1. **equipmentType**: Valid equipment types for 1806 and 1810 are [1234, FYNG, R2D2, 7DEV, nSky, 1OSF] according to document "295672 SDN-R System Requirements". +Not required by O-RAN Alliance OAM specification. -2. **alarmType**: or alarm name. Any string which references a supported alarm name of the equipment type. +### VES Domain "pnfRegistration", -3. **severity**: The severity of tha alarm as defined by [VES schema](./json/schema/CommonEventFormat_30.1_ONAP.json). +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". -The following example show the usage of this script. The alarm "lossOfSignal" for equipment type "nSky" with severity "CRITICAL" will be send. +``` +./pnfRegister.sh 7DEV +``` +### VES Domain "sipSignaling", + +Not required by O-RAN Alliance OAM specification. + +### VES Domain "stateChange", + +The script 'sendVesStateChange' simulates a VES event of domain "stateChange" from a network-function to DCAE VES-Collector. + +The following example show the usage of this script: ``` -./sendFault.sh nSky lossOfSignal CRITICAL +python3 sendVesStateChange.py --pnfId nSky ``` +### VES Domain "stndDefined", + +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: -### sendTca +- 3GPP-FaultSupervision +- 3GPP-Heartbeat +- 3GPP-PerformanceAssurance +- 3GPP-Provisioning -This script send a VES message of domain "thresholdCrossingAlert" to DCAE. It requires three command line parameters: +The following examples show the usage of this script: + +``` +python sendVesStndDefined.py --pnfId nSky --body 3GPP-FaultSupervision +python sendVesStndDefined.py --pnfId nSky --body 3GPP-Heartbeat +python sendVesStndDefined.py --pnfId nSky --body 3GPP-PerformanceAssurance +python sendVesStndDefined.py --pnfId nSky --body 3GPP-Provisioning + ``` + +### VES Domain "syslog", + +Not required by O-RAN Alliance OAM specification. + +### VES Domain "thresholdCrossingAlert", + +This script 'sendTca' sends a VES message of domain "thresholdCrossingAlert" to DCAE. It requires three command line parameters: 1. **equipmentType**: Valid equipment types for 1806 and 1810 are [1234, FYNG, R2D2, 7DEV, nSky, 1OSF] according to document "295672 SDN-R System Requirements". 2. **alarmType**: or alarm name. Any string which references a supported alarm name (TCA) of the equipment type. -3. **alertAction**: The action of TCA as defined by [VES schema](./json/schema/CommonEventFormat_28.4.1.json). +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). The following example show the usage of this script. The TCA with name "TCA" for equipment type "1234" with alarmAction "SET" will be send. @@ -102,16 +162,11 @@ The following example show the usage of this script. The TCA with name "TCA" for ./sendTca.sh 1234 TCA SET ``` +### VES Domain "voiceQuality" -### send15minPm - -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". - -``` -./send15minPm.sh FYNG -``` +Not required by O-RAN Alliance OAM specification. -### sendEventList +### Sending a VES event list This script send a VES message of domain "fault" AND "heartbeat" as event list to DCAE. It requires three command line parameters: @@ -119,7 +174,7 @@ This script send a VES message of domain "fault" AND "heartbeat" as event list t 2. **alarmType**: or alarm name. Any string which references a supported alarm name of the equipment type. -3. **severity**: The severity of tha alarm as defined by [VES schema](./json/schema/CommonEventFormat_30.1_ONAP.json). +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). The following example show the usage of this script. The alarm "lossOfSignal" for equipment type "nSky" with severity "CRITICAL" will be send.