-
Task
-
Resolution: Done
-
High
-
None
-
None
to create service instance, the url is
/onap/so/infra/serviceInstantiation/v7/serviceInstances
to delete
onap/so/infra/serviceInstantiation/v7/serviceInstances/service instance id
About the headers parameters: have a look at the following examples
Some working examples
Create service instance
curl -X POST \
http://so.api.simpledemo.onap.org:30277/onap/so/infra/serviceInstantiation/v7/serviceInstances \
-H 'Accept: application/json' \
-H 'Authorization: Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA==' \
-H 'Content-Type: application/json' \
-H 'X-ONAP-PartnerName: NBI' \
-H 'cache-control: no-cache' \
-d '{
"requestDetails": {
"requestInfo":
{ "instanceName": "my_service_instance_005", "source": "VID", "suppressRollback": false, "requestorId": "demo", "productFamilyId": "1234" },
"modelInfo":
{ "modelType": "service", "modelInvariantId": "fbfa2dac-544f-4ff4-b4c5-5421af911004", "modelVersionId": "7813db26-be35-4eab-b90e-ae7ec1a1ab18", "modelName": "integration_test_service_ubuntu16", "modelVersion": "1.0" },
"cloudConfiguration":
{ "tenantId": "298060ea002941869871cb9ef464d2da", "cloudOwner": "ONAP", "lcpCloudRegionId": "RegionOne" },
"requestParameters":
{ "userParams": [], "testApi": "VNF_API", "subscriptionServiceType": "integration_test_service_ubuntu16", "aLaCarte": true },
"subscriberInfo":
{ "globalSubscriberId": "JohnDoe" },
"project":
{ "projectName": "integration_project" },
"owningEntity":
{ "owningEntityId": "6b5b6b70-4e9a-4f6f-8b7b-cbd7cf990c6e", "owningEntityName": "integration" }}
}'
Reponse
{
"requestReferences":
{ "requestId": "da51ddd2-a35f-4b2f-b164-7c7459af94d3", "instanceId": "1bce933c-8402-40d2-9f25-0b48f2db4f34", "requestSelfLink": "[http://so.api.simpledemo.onap.org:30277/orchestrationRequests/v7/da51ddd2-a35f-4b2f-b164-7c7459af94d3]" }}
Delete that service instance
curl -X DELETE \
-H 'Accept: application/json' \
-H 'Authorization: Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA==' \
-H 'Content-Type: application/json' \
-H 'X-ONAP-PartnerName: NBI' \
-H 'cache-control: no-cache' \
-d '{
"requestDetails": {
"requestInfo":
{ "source": "VID", "requestorId": "test" },
"modelInfo":
{ "modelType": "service", "modelInvariantId": "49f49564-ab51-48d0-a32f-8440cb572a1d", "modelVersionId": "8756ed23-9692-4fc7-9e01-6ce537cde846", "modelName": "ubuntutest01", "modelVersion": "1.0" },
"requestParameters":
{ "testApi": "VNF_API", "aLaCarte": true }}
}
'
Reponse
{"requestReferences":{"requestId":"b86e2f0c-0538-4b79-8937-780aeafb9346","instanceId":"1bce933c-8402-40d2-9f25-0b48f2db4f34","requestSelfLink":"http://so.api.simpledemo.onap.org:30277/orchestrationRequests/v7/b86e2f0c-0538-4b79-8937-780aeafb9346"}}
Get the request
curl -X GET \
-H 'Accept: application/json' \
-H 'Authorization: Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA==' \
-H 'Content-Type: application/json' \
-H 'X-ONAP-PartnerName: NBI' \
-H 'cache-control: no-cache'
Reponse
{
"request": {
"requestId": "b86e2f0c-0538-4b79-8937-780aeafb9346",
"startTime": "Mon, 21 Oct 2019 12:32:56 GMT",
"finishTime": "Mon, 21 Oct 2019 12:32:57 GMT",
"requestScope": "service",
"requestType": "deleteInstance",
"requestDetails": {
"modelInfo":
{ "modelInvariantId": "49f49564-ab51-48d0-a32f-8440cb572a1d", "modelType": "service", "modelName": "ubuntutest01", "modelVersion": "1.0", "modelVersionId": "8756ed23-9692-4fc7-9e01-6ce537cde846", "modelUuid": "8756ed23-9692-4fc7-9e01-6ce537cde846", "modelInvariantUuid": "49f49564-ab51-48d0-a32f-8440cb572a1d" },
"requestInfo":
{ "source": "VID", "suppressRollback": false, "requestorId": "test" },
"requestParameters":
{ "aLaCarte": true, "testApi": "VNF_API" }},
"instanceReferences":
{ "serviceInstanceId": "1bce933c-8402-40d2-9f25-0b48f2db4f34", "requestorId": "test" },
"requestStatus":
{ "requestState": "COMPLETE", "statusMessage": "STATUS: Service Instance was deleted successfully.", "percentProgress": 100, "timestamp": "Mon, 21 Oct 2019 12:32:57 GMT" }}
}