Skip to content

NetSlice Template API description

Pol Alemany edited this page Jul 23, 2018 · 7 revisions

Create a new Network Slice Template

The following command allows you to create a Network SLice Template and define which Network Services will compose it by using their uuids.

  curl -i -H "Content-Type:application/json" -X POST -d'{"nstName":"_NSTName_", "nstVersion":"_versionNum_", "author":"_designerName_", "nstNsdIds":[{"nstNsdId":"_NSuuid_"},{"nstNsdId":"_NSuuid_"}]}' http://{base_url}:5998/api/nst/v1/descriptors

The following json structure shows the response of the previous curl command and what this module (tng-slice-mngr) returns to the portal with a status code equal to 201.

EXAMPLE

curl -i -H "Content-Type:application/json" -X POST -d'{"nstName":"tango_NST", "nstVersion":"1.0", "author":"5gTango", "nstNsdIds":[{"nstNsdId":"6a01afdc-9d42-4bc9-866c-a8a3868fdf5e"}]}' http://{base_url}:5998/api/nst/v1/descriptors

  {
   "created_at": "2018-07-19T12:40:41.419+00:00",
   "md5": "42510e3a015bd1468b85987763566376",
   "nstd": {
      "author": "Pol Alemany, CTTC",
      "name": "NST_Example_MYNS",
      "notificationTypes": "",
      "nstNsdIds": [
           "2abe20a7-6751-436a-bd8d-8206589e2e7a"
      ],
      "onboardingState": "ENABLED",
      "operationalState": "ENABLED",
      "referencedNSIs": [],
      "usageState": "IN_USE",
      "userDefinedData": "",
      "vendor": "5gTango",
      "version": "1.0"
  },
 "signature": null,
 "status": "active",
 "updated_at": "2018-07-19T12:43:06.691+00:00",
 "username": null,
 "uuid": "66a1c857-76d7-48db-98a1-6674b531b010"
 }

Request the information of all Network Slice Templates:

The following command allows you to get the latest information of all existing Network Slice Templates.

  curl -i -H "Accept: application/json" -H "Content-Type: application/json" -X GET http://{base_url}:5998/api/nst/v1/descriptors

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.

Request the information of a Network Slice Template:

The following command allows you to get the latest information of a specific Network Slice Template selected with its "uuid - {nstId}".

  curl -i -H "Accept: application/json" -H "Content-Type: application/json" -X GET http://{base_url}:5998/api/nst/v1/descriptors/{nstId}

The response of this command is a json element like the one returned on the instantiation operation with a status code equal to 200.

Delete a Network Slice Template:

The following command allows you to terminate/delete the Network Slice Template by using its nstId (uuid).

  curl -X DELETE http://{base_url}:5998/api/nst/v1/descriptors/{nstId}

The response to this command should be empty with a status code equal to 204.