...
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":"2019-12-16 14:41:16",
"vnfPkgId":"vnfPackage_uuid",
"vnfdId":"vnfdId_uuid",
"subscriptionId":"subscription_id",
"_links":{
"subscription":{
"href":"http://subscriptionuri"
},
"vnfPackage":{
"href":"http://vnfPackageuri"
}
}
}' |
...
Code Block | ||
---|---|---|
| ||
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:
...
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":"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" } } }' |
...
The client should implement the followed APIs when creating the subscription:
etsicatalog.swagger.notification.jsonClient_API_notify_v1.yaml