From c14f920415db0de169e0826e0d746cf80757b1f4 Mon Sep 17 00:00:00 2001 From: Hesam Rahimi Date: Wed, 2 Mar 2022 16:32:14 -0500 Subject: Sending "subscribe" command to a restconf server to receive event notifications. Implementing a callback DG to be called by CCSDK upon receiving event notifications. Also calling VES to send bandwidth information. Issue-ID: SDNC-1669 Signed-off-by: Hesam Rahimi Change-Id: I058c405a14d78e264761367dd4b46d6e9a600182 Former-commit-id: 13b89ec32d7d0074117b3f136800bc93f67bf0f8 --- .../src/main/json/cll-call-ves.json | 34 ++++++++++++++++++++++ .../src/main/json/cll-create-pm-data.json | 17 +++++++++++ .../src/main/json/cll-ethernet-service-loop.json | 3 +- .../src/main/json/cll-subscribe-notification.json | 1 + .../src/main/json/cll-terminate-notification.json | 1 + 5 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 platform-logic/restapi-templates/src/main/json/cll-call-ves.json create mode 100644 platform-logic/restapi-templates/src/main/json/cll-create-pm-data.json create mode 100644 platform-logic/restapi-templates/src/main/json/cll-subscribe-notification.json create mode 100644 platform-logic/restapi-templates/src/main/json/cll-terminate-notification.json (limited to 'platform-logic/restapi-templates') diff --git a/platform-logic/restapi-templates/src/main/json/cll-call-ves.json b/platform-logic/restapi-templates/src/main/json/cll-call-ves.json new file mode 100644 index 00000000..0074c34c --- /dev/null +++ b/platform-logic/restapi-templates/src/main/json/cll-call-ves.json @@ -0,0 +1,34 @@ +{ + "event": { + "commonEventHeader": { + "version": "4.0.1", + "vesEventListenerVersion": "7.0.1", + "domain": "ccvpnNotification", + "eventName": "ccvpnNotification_CloudLeaseLine_BandwidthChanged", + "eventId": ${eventIdUuid}, + "lastEpochMicrosec": 8745745764578, + "priority": "Normal", + "reportingEntityName": "onap-sdnc", + "sequence": 0, + "sourceName": "onap-sdnc", + "startEpochMicrosec": 8745745764578, + "timeZoneOffset": "UTC-05.00" + }, + "ccvpnNotificationFields": { + "changeIdentifier": "PM_BW_UPDATE", + "changeType": "BandwidthChanged", + "ccvpnNotificationFieldsVersion": "2.0", + "arrayOfNamedHashMap": [ + { + "name": ${eventNameUuid}, + "hashMap": { + "cllId": ${cclId}, + "uniId": ${uniId}, + "bandwidthValue": ${bandwidthValue}, + "time": "2022-02-08T11:13:34.781-05:00" + } + } + ] + } + } +} \ No newline at end of file diff --git a/platform-logic/restapi-templates/src/main/json/cll-create-pm-data.json b/platform-logic/restapi-templates/src/main/json/cll-create-pm-data.json new file mode 100644 index 00000000..101e9b9d --- /dev/null +++ b/platform-logic/restapi-templates/src/main/json/cll-create-pm-data.json @@ -0,0 +1,17 @@ +{ + "ietf-service-pm:performance-monitoring": { + "service-pm": [ + { + "service-name": ${eth-service-name}, + "task-pm-enable": true, + "granularity": "ietf-service-pm:granularity-1min", + "performance-data-config": [ + { + "parameter-name": "ietf-service-pm:ingress-bandwidth", + "measure-method": "ietf-service-pm:measure-at-ingress" + } + ] + } + ] + } +} diff --git a/platform-logic/restapi-templates/src/main/json/cll-ethernet-service-loop.json b/platform-logic/restapi-templates/src/main/json/cll-ethernet-service-loop.json index b058169d..24968f71 100644 --- a/platform-logic/restapi-templates/src/main/json/cll-ethernet-service-loop.json +++ b/platform-logic/restapi-templates/src/main/json/cll-ethernet-service-loop.json @@ -1,6 +1,6 @@ { "ietf-eth-tran-service:etht-svc":{ - "etht-svc-instances":[ + "etht-svc-instances": [ { "etht-svc-name": ${eth-service-name}, "ietf-optical-slice:slice-id": ${slice-id}, @@ -34,6 +34,7 @@ ${repeat:ethernet-srv-end-points-list_length: { "etht-svc-end-point-name": ${ethernet-srv-end-points-list[${1}].ethernet-end-point-name}, + "etht-svc-end-point-descr": ${service-instance-id-or-cll-id}, "etht-svc-access-points":[ { "access-point-id": ${ethernet-srv-end-points-list[${1}].index-number}, diff --git a/platform-logic/restapi-templates/src/main/json/cll-subscribe-notification.json b/platform-logic/restapi-templates/src/main/json/cll-subscribe-notification.json new file mode 100644 index 00000000..02fd8a54 --- /dev/null +++ b/platform-logic/restapi-templates/src/main/json/cll-subscribe-notification.json @@ -0,0 +1 @@ +{ "ietf-subscribed-notifications:input": { "encoding": "encode-json" } } \ No newline at end of file diff --git a/platform-logic/restapi-templates/src/main/json/cll-terminate-notification.json b/platform-logic/restapi-templates/src/main/json/cll-terminate-notification.json new file mode 100644 index 00000000..1b407a3d --- /dev/null +++ b/platform-logic/restapi-templates/src/main/json/cll-terminate-notification.json @@ -0,0 +1 @@ +{ "ietf-subscribed-notifications:input": { "identifier": ${subscriptionId} } } \ No newline at end of file -- cgit 1.2.3-korg