From 70ccfb715c0d017d1d9809844c5c903a886c45a5 Mon Sep 17 00:00:00 2001 From: K Sai Kiran Date: Fri, 20 Nov 2020 17:34:56 +0530 Subject: [PATCH 1/4] Added MD format documentation for current support of subscription and notification in osm --- 17-subscription-and-notification.md | 121 ++++++++++++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 17-subscription-and-notification.md diff --git a/17-subscription-and-notification.md b/17-subscription-and-notification.md new file mode 100644 index 0000000..eea6047 --- /dev/null +++ b/17-subscription-and-notification.md @@ -0,0 +1,121 @@ +# 17 Subscription and Notification support in OSM + +## Introduction + +ETSI NFV SOL005  defines a class of Northbound APIs through which entities can subscribe for changes in the Network Service (NS) life-cycle, Network service descriptor (NSD) and Virtual network service descriptor (VNFD). The entities get notified via HTTP REST APIs which those entities expose. + + Since the current support is for NS and NSD, VNFD are in roadmap. For here onwards we will refer subscription and notification for NS. + +- The entities which are interested to know the life-cycle changes of network service are called Subscribers. +- Subscribers receive messages called notifications when an event of their interest occurs. +- SOL005 specifies usage of filters in the registration phase, through which subscribers can select events and NS they are interested in. +- Subscribers can choose the authentication mechanism of their notification receiver endpoint. +- Events need to be notified with very little latency and make them near real-time. +- Deregistration of subscription should be possible however subscribers can not modify existing subscriptions as per SOL005. + +## NS Subscription And Notification + +### Steps for subscription + +Step 1: Get bearer token. + + NBI API: https://:9999/osm/admin/v1/tokens/ + Sample payload + { + "username": "admin", + "password": "admin", + "project": "admin" + } + +Step 2: Select for events for which you are intrested in and prepare payload. + +Please check the Kafka messages for the filter scenario. If kafka message is not of the format, which contain operation state and operation type. If message does not contain operation state and operation type notification will not be raised. + +Kafka messages will be improved in future. + + {_admin: {created: 1579592163.561016, modified: 1579592163.561016, projects_read: [ + 894160c9-1ead-4c85-9742-e7453260ea5f], projects_write: [894160c9-1ead-4c85-9742-e7453260ea5f]}, + _id: 5c53f989-defc-4f93-8ab9-93c62136c37e, id: 5c53f989-defc-4f93-8ab9-93c62136c37e, + isAutomaticInvocation: false, isCancelPending: false, lcmOperationType: instantiate, + links: {nsInstance: /osm/nslcm/v1/ns_instances/35f7ae25-2cf6-4a63-8388-a114513198ed, + self: /osm/nslcm/v1/ns_lcm_op_occs/5c53f989-defc-4f93-8ab9-93c62136c37e}, nsInstanceId: 35f7ae25-2cf6-4a63-8388-a114513198ed, + operationParams: {lcmOperationType: instantiate, nsDescription: testing, nsInstanceId: 35f7ae25-2cf6-4a63-8388-a114513198ed, + nsName: check, nsdId: f445b11a-63d8-44b3-85a8-b4b864ccccd6, nsr_id: 35f7ae25-2cf6-4a63-8388-a114513198ed, + ssh_keys: [], vimAccountId: d5d59b88-7015-4f4b-8df6-bd05765cfa25}, operationState: PROCESSING, + startTime: 1579592163.5609882, statusEnteredTime: 1579592163.5609882} + + +Refer ETSI SOL005 document for filter options +https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/005/02.04.01_60/gs_NFV-SOL005v020401p.pdf Page no 154 + + Sample payload + { + "filter": { + "nsInstanceSubscriptionFilter": { + "nsdIds": [ + "93b3c041-cac4-4ef3-8ad6-400fbad32a90" + ] + }, + "notificationTypes": [ + "NsLcmOperationOccurrenceNotification" + ], + "operationTypes": [ + "INSTANTIATE" + ], + "operationStates": [ + "PROCESSING" + ] + }, + "CallbackUri": "http://192.168.61.143:5050/notifications", + "authentication": { + "authType": "basic", + "paramsBasic": { + "userName": "user", + "password": "user" + } + } + } + + - This payload implies that, for nsd id 93b3c041-cac4-4ef3-8ad6-400fbad32a90 if operation state is PROCESSING and operation type is INSTANTIATE then, send a notification to http://192.168.61.143:5050/notifications using the "authentication" mechanism whose payload is of datatype NsLcmOperationOccurrenceNotification. + +Step 3: Send an HTTPS POST request to create subscription. + - Add the bearer token as authentication parameter from step 1. + - Payload from step 2 to https://:9999/osm/nslcm/v1/subscriptions + +Step 4: Verify successful regestration of subscription via HTTPS GET https://:9999/osm/nslcm/v1/subscriptions + +### Steps for notification + +Step 1: Create an event in osm satisfying the filter criteria. + + example: Launch any ns. + This event has operation state as PROCESSING and operation type as INSTANTIATE, when network service is just launched. + +Step 2: See the notification in notification recevier. + + +## Current support and future roadmap + +### Current support + + - Subscriptions for NS lifecycle​ + + - JSON schema validation.​ + - Pre-chech of notification endpoint.​ + - Duplicate subscription detection. + + - Notifications for NS lifecycle​ + + - SOL005 compliant structure for each subscriber according to their filters and authentication types.​ + - POST events to notification endpoints.​- Retry and backoff for failed notifications.​ + + + +### Future roadmap +- Integration of subscription steps in NG-UI. +- Support for OAuth and TLS authentication types for notification endpoint.​ +- Support for subscription and notification for NSD. +- Support for subscription and notification for VNFD. +- Cache to store subscribers.​ + + -- GitLab From 42480add70678b31e9e411e5ca472130be0b4f10 Mon Sep 17 00:00:00 2001 From: beierlm Date: Thu, 17 Jun 2021 16:59:55 +0200 Subject: [PATCH 2/4] Apply 1 suggestion(s) to 1 file(s) --- 17-subscription-and-notification.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/17-subscription-and-notification.md b/17-subscription-and-notification.md index eea6047..1fea9b2 100644 --- a/17-subscription-and-notification.md +++ b/17-subscription-and-notification.md @@ -29,7 +29,7 @@ Step 1: Get bearer token. Step 2: Select for events for which you are intrested in and prepare payload. -Please check the Kafka messages for the filter scenario. If kafka message is not of the format, which contain operation state and operation type. If message does not contain operation state and operation type notification will not be raised. +**Please check the Kafka messages for the filter scenario. If kafka message is not of the format, which contain operation state and operation type. If message does not contain operation state and operation type notification will not be raised.** Kafka messages will be improved in future. -- GitLab From 1c53a2bdc246423495a567f4038506d3651f8cb1 Mon Sep 17 00:00:00 2001 From: beierlm Date: Thu, 17 Jun 2021 16:59:59 +0200 Subject: [PATCH 3/4] Apply 1 suggestion(s) to 1 file(s) --- 17-subscription-and-notification.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/17-subscription-and-notification.md b/17-subscription-and-notification.md index 1fea9b2..abf6526 100644 --- a/17-subscription-and-notification.md +++ b/17-subscription-and-notification.md @@ -2,7 +2,7 @@ ## Introduction -ETSI NFV SOL005  defines a class of Northbound APIs through which entities can subscribe for changes in the Network Service (NS) life-cycle, Network service descriptor (NSD) and Virtual network service descriptor (VNFD). The entities get notified via HTTP REST APIs which those entities expose. +[ETSI NFV SOL005](https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/005/02.04.01_60/gs_NFV-SOL005v020401p.pdf) defines a class of Northbound APIs through which entities can subscribe for changes in the Network Service (NS) life-cycle, Network service descriptor (NSD) and Virtual network service descriptor (VNFD). The entities get notified via HTTP REST APIs which those entities expose. Since the current support is for NS and NSD, VNFD are in roadmap. For here onwards we will refer subscription and notification for NS. -- GitLab From 861c1d59f29a2829f376512c598d15db561c22d7 Mon Sep 17 00:00:00 2001 From: beierlm Date: Thu, 17 Jun 2021 17:00:10 +0200 Subject: [PATCH 4/4] Apply 1 suggestion(s) to 1 file(s) --- 17-subscription-and-notification.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/17-subscription-and-notification.md b/17-subscription-and-notification.md index abf6526..2d532da 100644 --- a/17-subscription-and-notification.md +++ b/17-subscription-and-notification.md @@ -46,7 +46,7 @@ Kafka messages will be improved in future. Refer ETSI SOL005 document for filter options -https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/005/02.04.01_60/gs_NFV-SOL005v020401p.pdf Page no 154 +[Page no 154](https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/005/02.04.01_60/gs_NFV-SOL005v020401p.pdf) Sample payload { -- GitLab