Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This document describes the procedure for sending notifications related to VNF package management.

Precondition: The subscribed API consumer has subscribed previously for notifications related to VNF package management.

...

1.VnfPackage Onboarding Notification

When the vnf package performs the Onboarding operation onboarding VNF package successfully, Etsicatalog will filter all Subscriptions records:

...

  • VnfPackage‘s vnfdId / vnfPkgId / vnfProductsFromProviders matching subscription.filters

If there are some matching subscription records,  Etsicatalog will send a notification to the URI which is provided by the Client in its subscription request.

...

PlantUML Macro
aligncenter
@startuml
SOL003_AdapterClient -> ETSICatalog: Post /Subscriptions\n(callbackUri=/URI-is-provided-by-the-client\nfilters.notificationTypes=VnfPackageOnboardingNotification)
note over ETSICatalog: test notification endpoint
ETSICatalog->SOL003_Adapter>Client: Get /URI-is-provided-by-the-client
ETSICatalog<-SOL003_AdapterClient: 204 No Content
note over ETSICatalog:  Creates a new subscription
ETSICatalog->SOL003_Adapter>Client: 201 Created
alt
SOL003_AdapterClient -> ETSICatalog: Put /vnf_packages/(vnfPkgId)/package_content
else
SOL003_AdapterClient -> ETSICatalog: Put /vnf_packages/(vnfPkgId)/package_content/upload_from_uri
end
ETSICatalog->SOL003_Adapter>Client: 202 Accepted
note over ETSICatalog: Uploading of VNF package content
note over ETSICatalog: Filter Subscriptions
alt  Filted by Subscriptions.filters
ETSICatalog->SOL003_Adapter>Client: Post /URI-is-provided-by-the-client
ETSICatalog<-SOL003_AdapterClient: 204 No Content
end
@enduml

...

1.3 Notification API example:

POST http://URI-is-provided-by-the-client-when-creating-the-subscription-VnfPackageOnboardingNotification

For this example, the URI provided by client is http://www.vnf1.com/notification according to the subscription request above.

Code Block
curl -X POST -u username:userpwd http://www.vnf1.com/notification
  http:// 
  -H 'Content-Type: application/json' 
  -d '{
  "id":"notify_id",
  "notificationType":"VnfPackageOnboardingNotification",
  "timeStamp":"nowtime()2019-12-16 14:41:16",
  "vnfPkgId":"vnfPackage_uuid",
  "vnfdId":"vnfdId_uuid",
  "subscriptionId":"subscription_id",
  "_links":{
    "subscription":{
      "href":"http://subscriptionuri"
    },
    "vnfPackage":{
      "href":"http://vnfPackageuri"
    }
  }
}'

...

2.VnfPackage Change Notification

When the vnf package performs the Deleting or Patching operation successfullyVNF package is modified or deleted, Etsicatalog will filter all Subscriptions records:

...

PlantUML Macro
aligncenter
@startuml
SOL003_AdapterClient -> ETSICatalog: Post /Subscriptions\n(callbackUri=/URI-is-provided-by-the-client\nfilters.notificationTypes=VnfPackageChangeNotification)
note over ETSICatalog: test notification endpoint
ETSICatalog->SOL003_Adapter>Client: Get /URI-is-provided-by-the-client
ETSICatalog<-SOL003_AdapterClient: 204 No Content
note over ETSICatalog:  Creates a new subscription
ETSICatalog->SOL003_Adapter>Client: 201 Created
alt
SOL003_AdapterClient -> ETSICatalog: Delete /vnf_packages/(vnfPkgId)
note over ETSICatalog: Deletes the VNF package
ETSICatalog->SOL003_Adapter>Client: 200 OK
else
SOL003_AdapterClient -> ETSICatalog: Patch /vnf_packages/(vnfPkgId)
note over ETSICatalog: Updates the information of the VNF package
ETSICatalog->SOL003_Adapter>Client: 204 No Content
end
note over ETSICatalog: Filter Subscriptions
alt  Filted by Subscriptions.filters
ETSICatalog->SOL003_Adapter>Client: Post /URI-is-provided-by-the-client
ETSICatalog<-SOL003_AdapterClient: 204 No Content
end
@enduml

...

Code Block
languagepy
curl -X POST 
  http://{{baseUrl}}/api/vnfpkgm/v1/subscriptions 
  -H 'Content-Type: application/json' 
  -d '{
    "filters": {
        "notificationTypes": [
            "VnfPackageChangeNotification"
        ],
        "vnfdId": [
            "uuid_vnfdid"
        ]
    },
    "callbackUri": "http://www.vnf1.com/notification",
    "authentication": {
        "authType": [
            "BASIC"
        ],
        "paramsBasic": {
            "userName": "stringusername",
            "password": "stringuserpwd"
        }
    }
}'

2.3 Notification API example:

POST http://URI-is-provided-by-the-client-when-creating-the-sbuscriptionsubscription-VnfPackageChangeNotification 

For this example, the URI provided by client is http://www.vnf1.com/notification according to the subscription request above.

Code Block
curl -X POST -u username:userpwd
  http://www.vnf1.com/notification 
  -H 'Content-Type: application/json' \
  -d '{
  "id":"notify_id",
  "notificationType":"VnfPackageChangeNotification",
  "timeStamp":"nowtime()2019-12-16 14:41:16",
  "vnfPkgId":"vnfPackage_uuid",
  "vnfdId":"vnfdIduuid_uuidvnfdid",
  "subscriptionId":"subscription_id",
  "changeType":"OP_STATE_CHANGE",
  "operationalState":"ENABLED",
  "_links":{
    "subscription":{
      "href":"http://subscriptionuri"
    },
    "vnfPackage":{
      "href":"http://vnfPackageuri"
    }
  }
}'

3. Client APIs 

The client should implement the followed APIs when creating the subscription:

Client_API_notify_v1.yaml