-
Notifications
You must be signed in to change notification settings - Fork 6
NetSlice Instance API description
The following command allows you to launch an instantiation of a Network SLice Template (which contains might contain one or more Network Services inside).
curl -i -H "Content-Type:application/json" -X POST -d'{"name": "_nsiName_", "description": "_nsiDescription_", "nstId": "_nstID_"}' http://{base_url}:5998/api/nsilcm/v1/nsi
The following json structure shows the response of the previous curl command and what this module (tng-slice-mngr) returns to the portal. As described in this son-gkeeper, it might take some time to get the instantiation done (depending on the services inside the template). The status code of this response is equal to 201.
EXAMPLE
curl -i -H "Content-Type: application/json" -X POST -d'{"name": "NSI_name", "description": "NSI_descriptor", "nstId": "26c540a8-1e70-4242-beef-5e77dfa05a41"}' http://pre-int-sp-ath.5gtango.eu:5998/api/nsilcm/v1/nsi
{
"created_at": "2018-07-16T14:03:02.204+00:00",
"description": "NSI_descriptor",
"flavorId": "",
"instantiateTime": "2018-07-16T14:01:31.447547",
"name": "NSI_16072019_1600",
"netServInstance_Uuid": [
{
"servId": "4c7d854f-a0a1-451a-b31d-8447b4fd4fbc",
"servInstanceId": "e1547f09-e954-4299-bd62-138045566872",
"servName": "ns-squid-haproxy",
"workingStatus": "INSTANTIATED"
}
],
"nsiState": "INSTANTIATED",
"nstId": "26c540a8-1e70-4242-beef-5e77dfa05a41",
"nstName": "Example_NST",
"nstVersion": "1.0",
"sapInfo": "",
"scaleTime": "",
"terminateTime": "",
"updateTime": "",
"updated_at": "2018-07-16T14:03:02.204+00:00",
"uuid": "a75d1555-cc2c-4b96-864f-fa1ffe5c909a",
"vendor": "eu.5gTango"
}
The following command allows you to get the latest information of all existing Network Slice Instantiations.
curl -i -H "Accept: application/json" -H "Content-Type: application/json" -X GET http://{base_url}:5998/api/nsilcm/v1/nsi
The response of this command is a list of json elements like the one returned on the instantiation operation with a status code equal to 200.
The following command allows you to get the latest information of a specific Network Slice Instantiation selected with its "uuid - {nsiId}".
curl -i -H "Accept: application/json" -H "Content-Type: application/json" -X GET http://{base_url}:5998/api/nsilcm/v1/nsi/{nsiId}
The response of this command is a json element like the one returned on the instantiation operation with a status code equal to 200.
The following command allows you to terminate/delete the Network Slice instantiation and its related network services instances.
curl -i -H "Content-Type:application/json" -X POST -d '{"terminateTime": "_time_"}' http://{base_url}:5998/api/nsilcm/v1/nsi/<nsiId>/terminate
The response to this command should be empty with a status code equal to 204.
To terminate the instance instantly, simply give a value of 0.
_curl -i -H "Content-Type:application/json" -X POST -d '{"terminateTime": "0"}' http://{base_url}:5998/api/nsilcm/v1/nsi/deb3a1fc-2493-4d76-a65d-9ac129a213fb/terminate_