## Prerequisites
This git project must be cloned on a ubuntu machine in order to execute the bash scripts.
-DCAE provide REST interfaces. In order to perform HTTP request [cURL](https://curl.haxx.se/) is used.
+DCAE provide REST interfaces. In order to perform HTTP request [cURL](https://curl.haxx.se/) is used.
In case cURL needs to be please use the following command in a terminal.
```
-sudo apt install curl
+sudo apt install curl
```
Python3 is expected to run some scripts.
## Concept
-Several tests scripts are available in the root of this project.
+Several tests scripts are available in the root of this project.
The bash and python scripts will perform an HTTPS-POST request to a VES-Collector.
## VES Domains
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".
+1. **equipmentType**: Valid equipment types for 1806 and 1810 are [pnf2, 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).
+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.
### VES Domain "measurement",
-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".
+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 [pnf2, FYNG, R2D2, 7DEV, nSky, 1OSF] according to document "295672 SDN-R System Requirements".
```
./send15minPm.sh FYNG
### VES Domain "mobileFlow",
-Not required by O-RAN Alliance OAM specification.
+Not required by O-RAN Alliance OAM specification.
### VES Domain "notification",
### VES Domain "other",
-Not required by O-RAN Alliance OAM specification.
+Not required by O-RAN Alliance OAM specification.
### VES Domain "perf3gpp",
-Not required by O-RAN Alliance OAM specification.
+Not required by O-RAN Alliance OAM specification.
### VES Domain "pnfRegistration",
-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 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 [pnf2, FYNG, R2D2, 7DEV, nSky, 1OSF] according to document "295672 SDN-R System Requirements".
```
./pnfRegister.sh 7DEV
```
### VES Domain "sipSignaling",
-Not required by O-RAN Alliance OAM specification.
+Not required by O-RAN Alliance OAM specification.
### VES Domain "stateChange",
### VES Domain "syslog",
-Not required by O-RAN Alliance OAM specification.
+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".
+1. **equipmentType**: Valid equipment types for 1806 and 1810 are [pnf2, 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](https://gerrit.onap.org/r/gitweb?p=dcaegen2/collectors/ves.git;a=blob;f=etc/CommonEventFormat_30.2.1_ONAP.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.
+The following example show the usage of this script. The TCA with name "TCA" for equipment type "pnf2" with alarmAction "SET" will be send.
```
-./sendTca.sh 1234 TCA SET
+./sendTca.sh pnf2 TCA SET
```
### VES Domain "voiceQuality"
-Not required by O-RAN Alliance OAM specification.
+Not required by O-RAN Alliance OAM specification.
### 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:
-1. **equipmentType**: Valid equipment types for 1806 and 1810 are [1234, FYNG, R2D2, 7DEV, nSky, 1OSF] according to document "295672 SDN-R System Requirements".
+1. **equipmentType**: Valid equipment types for 1806 and 1810 are [pnf2, 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).
+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.
```
-./sendEventList.sh 1234 lossOfSignal CRITICAL
+./sendEventList.sh pnf2 lossOfSignal CRITICAL
```
################################################################################
# send pnf registration event
-./pnfRegister.sh 1234
+./pnfRegister.sh pnf2
./pnfRegister.sh FYNG
./pnfRegister.sh R2D2
./pnfRegister.sh 7DEV
################################################################################
# raise fault
-./sendFault.sh 1234 lossOfSignal CRITICAL
+./sendFault.sh pnf2 lossOfSignal CRITICAL
./sendFault.sh FYNG TCA MAJOR
./sendFault.sh R2D2 TCA MINOR
./sendFault.sh 7DEV signalIsLost CRITICAL
./sendFault.sh 1OSF HAAMRunningInLowerModulation MAJOR
./sendFault.sh SDNR connectionLossNe MAJOR
-################################################################################
-# raise stndDefined NotifyNewAlarm
-./sendStndDefinedNotifyNewAlarm.sh 1234 lossOfSignal CRITICAL
-./sendStndDefinedNotifyNewAlarm.sh FYNG TCA MAJOR
-./sendStndDefinedNotifyNewAlarm.sh R2D2 TCA MINOR
-./sendStndDefinedNotifyNewAlarm.sh 7DEV signalIsLost CRITICAL
-./sendStndDefinedNotifyNewAlarm.sh nSky LossOfSignalAlarm CRITICAL
-./sendStndDefinedNotifyNewAlarm.sh 1OSF HAAMRunningInLowerModulation MAJOR
-./sendStndDefinedNotifyNewAlarm.sh SDNR connectionLossNe MAJOR
-
################################################################################
# clear fault
-./sendFault.sh 1234 lossOfSignal NORMAL
+./sendFault.sh pnf2 lossOfSignal NORMAL
./sendFault.sh FYNG TCA NORMAL
./sendFault.sh R2D2 TCA NORMAL
./sendFault.sh 7DEV signalIsLost NORMAL
./sendFault.sh 1OSF HAAMRunningInLowerModulation NORMAL
./sendFault.sh SDNR connectionLossNe NORMAL
+################################################################################
+# raise stndDefined Alarm
+./sendStndDefinedNotifyAlarm.sh pnf2 lossOfSignal CRITICAL new
+./sendStndDefinedNotifyAlarm.sh FYNG TCA MAJOR new
+./sendStndDefinedNotifyAlarm.sh R2D2 TCA MINOR new
+./sendStndDefinedNotifyAlarm.sh 7DEV signalIsLost CRITICAL new
+./sendStndDefinedNotifyAlarm.sh nSky LossOfSignalAlarm CRITICAL new
+./sendStndDefinedNotifyAlarm.sh 1OSF HAAMRunningInLowerModulation MAJOR new
+./sendStndDefinedNotifyAlarm.sh SDNR connectionLossNe MAJOR new
+
+################################################################################
+# clear stndDefined Alarm
+./sendStndDefinedNotifyAlarm.sh pnf2 lossOfSignal CRITICAL cleared
+./sendStndDefinedNotifyAlarm.sh FYNG TCA MAJOR cleared
+./sendStndDefinedNotifyAlarm.sh R2D2 TCA MINOR cleared
+./sendStndDefinedNotifyAlarm.sh 7DEV signalIsLost CRITICAL cleared
+./sendStndDefinedNotifyAlarm.sh nSky LossOfSignalAlarm CRITICAL neclearedw
+./sendStndDefinedNotifyAlarm.sh 1OSF HAAMRunningInLowerModulation MAJOR cleared
+./sendStndDefinedNotifyAlarm.sh SDNR connectionLossNe MAJOR cleared
+
################################################################################
# raise threshold crossed alerts
-./sendTca.sh 1234 TCA CONT
+./sendTca.sh pnf2 TCA CONT
./sendTca.sh FYNG TCA SET
./sendTca.sh R2D2 TCA CONT
./sendTca.sh 7DEV thresholdCrossed SET
################################################################################
# clear threshold crossed alerts
-./sendTca.sh 1234 TCA CLEAR
+./sendTca.sh pnf2 TCA CLEAR
./sendTca.sh FYNG TCA CLEAR
./sendTca.sh R2D2 TCA CLEAR
./sendTca.sh 7DEV thresholdCrossed CLEAR
################################################################################
# send 15min performance measurement data
-./send15minPm.sh 1234
+./send15minPm.sh pnf2
./send15minPm.sh FYNG
./send15minPm.sh R2D2
./send15minPm.sh 7DEV
./send15minPm.sh nSky
./send15minPm.sh 1OSF
+
+################################################################################
+# send o1-notify-pnf-registration
+./sendStndDefinedO1NotifyPnfRegistration.sh pnf2
+./sendStndDefinedO1NotifyPnfRegistration.sh FYNG
+./sendStndDefinedO1NotifyPnfRegistration.sh R2D2
+./sendStndDefinedO1NotifyPnfRegistration.sh 7DEV
+./sendStndDefinedO1NotifyPnfRegistration.sh nSky
+./sendStndDefinedO1NotifyPnfRegistration.sh 1OSF
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
-#
+#
# https://www.apache.org/licenses/LICENSE-2.0
-#
+#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#
################################################################################
-# Configuration for interface tests
+# Configuration for interface tests
################################################################################
-# DCAE VES Collector communication end point
+# DCAE VES Collector communication end point
urlVes=https://localhost:8443/eventListener/v7
basicAuthVes=sample1:sample1
################################################################################
# Information from document: SDN-R System Requirements
#
-# a. VendorA 1234 BestInClass (1234)
+# a. VendorA pnf2 BestInClass (pnf2)
# b. VendorA FancyNextGeneration (FYNG)
# c. VendorB R2D2 NewFuture (R2D2)
# d. VendorB 7200DEV (7DEV)
# g. VendorA PNF5G (NO5G)
# h. VendorB PNF5G (VB5G)
-# i. VendorC NGCell (NGCE)
+# i. VendorC NGCell (NGCE)
# j. VendorC O-RU (SCRU)
#
# z. SDN-R Controller itself (SDNR)
declare -A interfaceByType;
pnfIdByType=(
- [1234]=NSHMRIACQ01M01123401
- [fyng]=LKCYFL79Q01M01FYNG01
- [r2d2]=MMTSIL02Q01M01R2D201
- [7dev]=PRTNILACQ01M017DEV01
- [nsky]=O-RAN-FH-IPv6-01
+ [pnf2]=NSHMRIACQ01M01pnf201
+ [fyng]=LKCYFL79Q01M01FYNG01
+ [r2d2]=MMTSIL02Q01M01R2D201
+ [7dev]=PRTNILACQ01M017DEV01
+ [nsky]=O-RAN-FH-IPv6-01
[1OSF]=SNSNFLR0Q01M011OSF01
- [no5g]=MMTSIL02Q01M01NO5G01
- [vb5g]=PRTNILACQ01M01VB5G01
- [ngce]=SEDNKSAHQ01M01NGCE01
+ [no5g]=MMTSIL02Q01M01NO5G01
+ [vb5g]=PRTNILACQ01M01VB5G01
+ [ngce]=SEDNKSAHQ01M01NGCE01
[scru]=SNSNFLR0Q01M01SCRU01
[sdnr]=$(hostname --fqdn)
);
modelByType=(
- [1234]="1234 BestInClass"
- [fyng]="FancyNextGeneration"
- [r2d2]="R2D2 NewFuture"
- [7dev]="7200DEV"
- [nsky]="TheSkyIsTheLimit"
+ [pnf2]="pnf2 BestInClass"
+ [fyng]="FancyNextGeneration"
+ [r2d2]="R2D2 NewFuture"
+ [7dev]="7200DEV"
+ [nsky]="TheSkyIsTheLimit"
[1OSF]="OpenSourceFirst"
- [no5g]="PNF5G"
- [vb5g]="PNF5G"
- [ngce]="NGCell"
+ [no5g]="PNF5G"
+ [vb5g]="PNF5G"
+ [ngce]="NGCell"
[scru]="O-RU"
[sdnr]="ONAP Controller for Radio"
);
oamIpByType=(
- [1234]=10.10.10.11
- [fyng]=10.10.10.12
- [r2d2]=10.10.10.13
- [7dev]=10.10.10.14
- [nsky]=10.10.10.15
+ [pnf2]=10.10.10.11
+ [fyng]=10.10.10.12
+ [r2d2]=10.10.10.13
+ [7dev]=10.10.10.14
+ [nsky]=10.10.10.15
[1OSF]=10.10.10.16
- [no5g]=10.10.10.17
- [vb5g]=10.10.10.18
- [ngce]=10.10.10.19
+ [no5g]=10.10.10.17
+ [vb5g]=10.10.10.18
+ [ngce]=10.10.10.19
[scru]=10.10.10.20
[sdnr]=127.0.0.1
);
vendorsByType=(
- [1234]=VendorA
- [fyng]=VendorA
- [r2d2]=VendorB
- [7dev]=VendorB
- [nsky]=VendorC
+ [pnf2]=VendorA
+ [fyng]=VendorA
+ [r2d2]=VendorB
+ [7dev]=VendorB
+ [nsky]=VendorC
[1OSF]=VendorC
- [no5g]=VendorA
- [vb5g]=VendorB
- [ngce]=VendorC
+ [no5g]=VendorA
+ [vb5g]=VendorB
+ [ngce]=VendorC
[scru]=VendorC
[sdnr]=ONAP
);
interfaceByType=(
- [1234]=LP-MWPS-RADIO
- [fyng]=LP-MWPS-RADIO
- [r2d2]=LP-MWPS-RADIO
- [7dev]=LP-MWPS-RADIO
- [nsky]=LP-MWPS-RADIO
- [1OSF]=LP-MWPS-RADIO
- [no5g]=LP-MWPS-RADIO
- [vb5g]=LP-MWPS-RADIO
- [ngce]=LP-MWPS-RADIO
- [scru]=LP-MWPS-RADIO
+ [pnf2]=4af8681f-f2e4-4058-8052-4e9343ee7bf2
+ [fyng]=4af8681f-f2e4-4058-8052-4e9343ee7bf2
+ [r2d2]=4af8681f-f2e4-4058-8052-4e9343ee7bf2
+ [7dev]=4af8681f-f2e4-4058-8052-4e9343ee7bf2
+ [nsky]=4af8681f-f2e4-4058-8052-4e9343ee7bf2
+ [1OSF]=4af8681f-f2e4-4058-8052-4e9343ee7bf2
+ [no5g]=4af8681f-f2e4-4058-8052-4e9343ee7bf2
+ [vb5g]=4af8681f-f2e4-4058-8052-4e9343ee7bf2
+ [ngce]=4af8681f-f2e4-4058-8052-4e9343ee7bf2
+ [scru]=4af8681f-f2e4-4058-8052-4e9343ee7bf2
[sdnr]=northbound-interface
)
################################################################################
-# Copyright 2021 highstreet technologies GmbH
+# Copyright 2022 highstreet technologies GmbH
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
-#
+#
# https://www.apache.org/licenses/LICENSE-2.0
-#
+#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#
################################################################################
-# Configuration for interface tests
+# Configuration for interface tests
################################################################################
# DCAE VES Collector communication end point
################################################################################
# Information from document: SDN-R System Requirements
#
-# a. VendorA 1234 BestInClass (1234)
+# a. VendorA pnf2 BestInClass (pnf2)
# b. VendorA FancyNextGeneration (FYNG)
# c. VendorB R2D2 NewFuture (R2D2)
# d. VendorB 7200DEV (7DEV)
# g. VendorA PNF5G (NO5G)
# h. VendorB PNF5G (VB5G)
-# i. VendorC NGCell (NGCE)
+# i. VendorC NGCell (NGCE)
# j. VendorC O-RU (SCRU)
#
# z. SDN-R Controller itself (SDNR)
pnfType:
- a234:
+ pnf2:
id: f2030d4a-8f0e-11eb-8dcd-0242ac130003
- model: "a234 BestInClass"
+ model: "pnf2 BestInClass"
oamIpv4: 10.10.10.11
- vendor: VendorA
- fyng:
- id: f2030f70-8f0e-11eb-8dcd-0242ac130003
- model: FancyNextGeneration
+ vendor: VendorA
+ fyng:
+ id: f2030f70-8f0e-11eb-8dcd-0242ac130003
+ model: FancyNextGeneration
oamIpv4: 10.10.10.11
- vendor: VendorA
- r2d2:
- id: f203111e-8f0e-11eb-8dcd-0242ac130003
- model: R2D2 NewFuture
+ vendor: VendorA
+ r2d2:
+ id: f203111e-8f0e-11eb-8dcd-0242ac130003
+ model: R2D2 NewFuture
oamIpv4: 10.10.10.11
vendor: VendorB
- 7dev:
- id: f203136c-8f0e-11eb-8dcd-0242ac130003
- model: 7200DEV
+ 7dev:
+ id: f203136c-8f0e-11eb-8dcd-0242ac130003
+ model: 7200DEV
oamIpv4: 10.10.10.11
vendor: VendorB
- nsky:
- id: f203143e-8f0e-11eb-8dcd-0242ac130003
- model: TheSkyIsTheLimit
+ nsky:
+ id: f203143e-8f0e-11eb-8dcd-0242ac130003
+ model: TheSkyIsTheLimit
oamIpv4: 10.10.10.11
vendor: VendorC
- 1OSF:
+ 1OSF:
id: f20317e0-8f0e-11eb-8dcd-0242ac130003
- model: OpenSourceFirst
+ model: OpenSourceFirst
oamIpv4: 10.10.10.11
vendor: VendorC
- no5g:
- id: f20318b2-8f0e-11eb-8dcd-0242ac130003
- model: PNF5G
+ no5g:
+ id: f20318b2-8f0e-11eb-8dcd-0242ac130003
+ model: PNF5G
oamIpv4: 10.10.10.11
- vendor: VendorA
- vb5g:
- id: f2031966-8f0e-11eb-8dcd-0242ac130003
- model: PNF5G
+ vendor: VendorA
+ vb5g:
+ id: f2031966-8f0e-11eb-8dcd-0242ac130003
+ model: PNF5G
oamIpv4: 10.10.10.11
vendor: VendorB
- ngce:
- id: f2031a2e-8f0e-11eb-8dcd-0242ac130003
+ ngce:
+ id: f2031a2e-8f0e-11eb-8dcd-0242ac130003
model: NGCell
oamIpv4: 10.10.10.11
vendor: VendorC
- scru:
+ scru:
id: 4365333e-8f0f-11eb-8dcd-0242ac130003
model: O-RU
oamIpv4: 10.10.10.11
vendor: VendorC
- interface: LP-MWPS-RADIO
- sdnr:
+ interface: 4af8681f-f2e4-4058-8052-4e9343ee7bf2
+ sdnr:
id: 4365360e-8f0f-11eb-8dcd-0242ac130003
- model: "ONAP SDN Controller for Radio"
+ model: "ONAP SDN Controller for Radio"
oamIpv4: 127.0.0.1
vendor: ONAP
interface: northbound-interface
--- /dev/null
+{
+ "event": {
+ "commonEventHeader": {
+ "domain": "@domain@",
+ "eventId": "@eventId@",
+ "eventName": "@domain@_@eventType@_heartbeat",
+ "eventType": "@eventType@_heartbeat",
+ "sequence": 0,
+ "priority": "Low",
+ "reportingEntityId": "",
+ "reportingEntityName": "@controllerName@",
+ "sourceId": "",
+ "sourceName": "@pnfId@",
+ "startEpochMicrosec": "@timestamp@",
+ "lastEpochMicrosec": "@timestamp@",
+ "nfNamingCode": "@type@",
+ "nfVendorName": "@vendor@",
+ "timeZoneOffset": "+00:00",
+ "version": "4.1",
+ "stndDefinedNamespace": "3GPP-Heartbeat",
+ "vesEventListenerVersion": "7.2.1"
+ },
+ "stndDefinedFields": {
+ "schemaReference": "https://forge.3gpp.org/rep/sa5/MnS/-/raw/Rel-16/OpenAPI/TS28532_HeartbeatNtf.yaml#components/schemas/NotifyHeartbeat",
+ "data": {
+ "href": "href1",
+ "notificationId": 0,
+ "notificationType": "notifyHeartbeat",
+ "eventTime": "@eventTime@",
+ "systemDN": "xyz",
+ "heartbeatNtfPeriod": 120
+ },
+ "stndDefinedFieldsVersion": "1.0"
+ }
+ }
+}
\ No newline at end of file
"commonEventHeader": {
"domain": "@domain@",
"eventId": "@eventId@",
- "eventName": "@domain@_@eventType@_Alarms_@alarm@",
- "eventType": "@eventType@_Alarms",
+ "eventName": "@domain@_@eventType@_pnf_registration",
+ "eventType": "@eventType@_pnf_registration",
"sequence": 0,
"priority": "Low",
"reportingEntityId": "",
--- /dev/null
+#!/bin/bash
+################################################################################
+#
+# Copyright 2022 highstreet technologies GmbH and others
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+################################################################################
+# Script to send an VES Message Event to VES-Collector
+
+. config;
+ pnfType=${1,,};
+ domain="stndDefined";
+
+declare -A mapping=(
+ [domain]=$domain
+ [controllerName]=$(hostname --fqdn)
+ [pnfId]=${pnfIdByType[$pnfType]}
+ [eventId]="${pnfIdByType[$pnfType]}_${interfaceByType[$pnfType]}_${alarmType}"
+ [eventType]=${eventType}
+ [type]=${pnfType^^}
+ [timestamp]=${timestamp}
+ [eventTime]=${eventTime}
+ [vendor]=${vendorsByType[$pnfType]^^}
+ [model]=${modelByType[$pnfType]}
+)
+
+echo "################################################################################";
+echo "# send O-RAN heartbeat";
+echo;
+for key in "${!mapping[@]}"
+do
+ #label=${${"$spaces$i"}:(-14)};
+ label=$spaces$key;
+ label=${label:(-16)};
+ echo "$label: ${mapping[$key]}";
+ if [ $key = "timestamp" ]; then
+ sequence="$sequence s/\"@$key@\"/${mapping[$key]}/g; "
+ else
+ sequence="$sequence s/@$key@/${mapping[$key]}/g; "
+ fi
+done
+echo;
+
+body="./json/examples/${pnfType^^}-${domain}-heartbeat.json"
+template="./json/templates/$domain-heartbeat.json"
+sed -e "$sequence" $template > $body;
+
+curl -i -k -u $basicAuthVes -X POST -d @${body} --header "Content-Type: application/json" $urlVes
echo "################################################################################";
echo "# send NotifyNewAlarm or NotifyClearedAlarm";
echo;
+echo " alarmEventType: $raised"
for key in "${!mapping[@]}"
do
#label=${${"$spaces$i"}:(-14)};
sed -e "$sequence" $template > $body;
curl -i -k -u $basicAuthVes -X POST -d @${body} --header "Content-Type: application/json" $urlVes
-
-#curl -i -k -u "sample1:sample1" -X POST -d @./json/examples/NSKY-lossOfSignal-CRITICAL-stndDefined.json --header "Content-Type: application/json" https://localhost:8443/eventListener/v7
\ No newline at end of file
initData['body']['event']['stndDefinedFields']['data']['eventTime'] = initData['eventTime']
initData['body']['event']['stndDefinedFields']['data']['eventTime'] = initData['interface']
-
+
# Save example body
saveExample(initData)
# Analysing command line parameters
def main(argv):
domain = 'stndDefined'
- usage = 'sendVesStndDefined.py --pnfId <physical-network-function-nwuid> --body <3gpp-Fault | 3GPP-Heartbeat | 3GPP-PerformanceAssurance | 3GPP-Provisioning>'
+ usage = 'python sendVesStndDefined.py --pnfId <physical-network-function-nwuid> --body <3gpp-Fault | 3GPP-Heartbeat | 3GPP-PerformanceAssurance | 3GPP-Provisioning>'
pnfId = ''
stdnBody = ''
try:
# NTS NG settings
NEXUS3_DOCKER_REPO=nexus3.o-ran-sc.org:10004/o-ran-sc/
NTS_MANAGER_PORT=8300
-NTS_BUILD_VERSION=1.5.0
+NTS_BUILD_VERSION=1.5.2
IPv6_ENABLED=true
SSH_CONNECTIONS=0
VES_ENDPOINT_PASSWORD: ${VES_ENDPOINT_PASSWORD}
x-du_env: &du_env
- NTS_NF_STANDALONE_START_FEATURES: "datastore-populate ves-heartbeat ves-file-ready ves-pnf-registration web-cut-through"
+ # NTS_NF_STANDALONE_START_FEATURES: "datastore-populate ves-heartbeat ves-file-ready ves-pnf-registration web-cut-through"
+ NTS_NF_STANDALONE_START_FEATURES: "datastore-populate ves-heartbeat ves-file-ready ves-pnf-registration ves-o1-pnf-registration web-cut-through"
x-ru-env: &ru_env
NTS_NF_STANDALONE_START_FEATURES: "datastore-populate netconf-call-home web-cut-through"
https://forge.3gpp.org/rep/sa5/MnS/tree/Rel-16/OpenAPI
```
-For E-Release only the following schemas ...
+For G-Release only the following schemas ...
* TS28623_ComDefs.yaml
* TS28532_FaultMnS.yaml
* TS28532_ProvMnS.yaml
.. are supported.
-
-Therefore the references (dependencies) in the file 'provMnS.yaml' to other schemas must be commanded, otherwise the schema itself would invalid.
-
-# Temporary modification for E-Release in 'provMnS.yaml'
-
-In this release only a subset of 3GPP Release 16 schema are supported. References to non supported schemas should be commanded, until those are supported.
-
-```
-developer @ localhost ~/workspace/_3gpp/MnS/OpenAPI (Rel-16)
-└─ $ ▶ git diff .
-diff --git a/OpenAPI/provMnS.yaml b/OpenAPI/provMnS.yaml
-index 1dd467e..699bdce 100644
---- a/OpenAPI/provMnS.yaml
-+++ b/OpenAPI/provMnS.yaml
-@@ -412,11 +412,11 @@ components:
- type: array
- items:
- type: object
-- - anyOf:
-- - $ref: 'genericNrm.yaml#/components/schemas/resources-genericNrm'
-- - $ref: 'nrNrm.yaml#/components/schemas/resources-nrNrm'
-- - $ref: '5gcNrm.yaml#/components/schemas/resources-5gcNrm'
-- - $ref: 'sliceNrm.yaml#/components/schemas/resources-sliceNrm'
-+ # - anyOf:
-+ # - $ref: 'genericNrm.yaml#/components/schemas/resources-genericNrm'
-+ # - $ref: 'nrNrm.yaml#/components/schemas/resources-nrNrm'
-+ # - $ref: '5gcNrm.yaml#/components/schemas/resources-5gcNrm'
-+ # - $ref: 'sliceNrm.yaml#/components/schemas/resources-sliceNrm'
-
- MoiChange:
- type: object
-```
ves.send_keys('docker logs -f ves-collector', enter=True)
env = ntsim.split_window(attach=False, vertical=False)
- env.send_keys('htop', enter=True)
+ env.send_keys('btop', enter=True)
# main
server = Server()