17 Subscription Operation (VNFM - V2)
Create Subscription
The following is a sample request for a Create New Subscription
Resource:
- Subscriptions API consumer can use this API to subscribe to notifications related to VNF lifecycle management. The data structure contains filtering criteria and a callback URI to which the VNFM subsequently sends notifications about events that match the filter.
- To test the notification endpoint that has been registered by the NFVO as part of the subscription, the VNFM sends a GET request to the notification endpoint URI.
- The NFVO returns a "204 No Content" response to indicate success.
- The VNFM creates a new subscription to notifications related to VNF lifecycle changes, and an "Individual subscription" resource that represents this subscription.
- The VNFM returns "201 Created" response to the NFVO when the subscription has been created.
- The Subscription response contains data representing the "Individual subscription" details created by the VNFM and provides the URI of the newly created resource in the "Location" HTTP header.
Note:
- When users delete the VNF instance, it is possible that users might create the new instance with the same instance name. The previous subscription becomes active and starts sending the notification for the same instance if all the filters are matching.
- The attributes "vnfdIds" and "vnfProductsFromProviders" are alternatives to reference to VNF instances that are based on certain VNFDs in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.
- The attributes "vnfInstanceIds" and "vnfInstanceNames" are alternatives to reference to particular VNF instances in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.
Query Individual Subscription
The following is a sample request for a Query Individual Subscription resource:
- GET operation to obtain the individual Subscription information by passing the subscription ID.
- The VNFM returns "200 OK" response to the NFVO when the individual subscriptions has been queried.
- The response body contains a representation of the "Individual subscription" resource.
Query All Subscription
The following is a sample request for a Query All Subscription resource:
- GET operation to obtain all Subscription information.
- VNFM returns a "200 OK" response to the NFVO when the list of subscriptions has been queried.
Delete Subscription
Delete operation deletes the individual subscription information, by passing the Subscription ID.
- If the NFVO does not need the subscription anymore, it terminates the subscription by sending a DELETE request to the resource that represents the individual subscription to remove.
- The VNFM returns a "204 No Content" response to the NFVO when the "Individual subscription" resource has been deleted and returns empty response body.
Notification
Precondition: The NFVO has subscribed previously to notifications related to VNF lifecycle management.
- VNFM sends notifications related to VNF lifecycle changes to a subscribed API consumer (NFVO), which has provided the URI of this resource during the subscription process.
- If an event occurs that matches the filtering criteria which are part of the subscription, the VNFM generates a notification that includes information about the event and sends it in the body of a POST request to the URI that the NFVO has registered as part of the subscription request.
- The NFVO acknowledges the successful delivery of the notification by returning a "204 No Content" response.
- If the VNFM does not receive the "204 No Content" response from the NFVO, it can retry sending the notification.