-
Notifications
You must be signed in to change notification settings - Fork 6
How to use this component
This page describes the processes to create, get and remove a Network Slice Template (NST) and also to create/instantiate, get, terminate and delete a Network Slice Instance (NSI) based on the previous NST.
AUTHOR'S NOTE *Pay attention to the uuids of the json_responses presented and the curls done right after to see the realtionship between all the objects created.
-
Step 0: Define your NST Using any JSON IDE, write your Network Slice Template descriptor; fill in the NST information, add the Network Services information (check the services are uploaded in your SP) to be used and finally, define the VLDs to link the previous NSs among them. Check the following json example:
{ "name": "NST_3_Example1", "description": "This is the description of a NST.", "version": "3.0", "author": "CTTC", "vendor": "5GTango", "SNSSAI_identifier": { "slice-service-type": "eMBB" }, "onboardingState": "ENABLED", "operationalState": "ENABLED", "usageState": "NOT_IN_USE", "5qi_value": 3, "slice_ns_subnets": [ { "id": "Service_subnet_1", "nsd-name": "ns-2-vnf-2-vdu", "nsd-vendor": "eu.5gtango", "nsd-version": "0.1", "sla-name": "None", "sla-ref": "None", "is-shared": false }, { "id": "Service_subnet_2", "nsd-name": "ns-2-vnf-2-vdu", "nsd-vendor": "eu.5gtango", "nsd-version": "0.1", "sla-name": "None", "sla-ref": "None", "is-shared": true }, { "id": "Service_subnet_3", "nsd-name": "ns-2-vnf-2-vdu", "nsd-vendor": "eu.5gtango", "nsd-version": "0.1", "sla-name": "None", "sla-ref": "None", "is-shared": false } ], "slice_vld": [ { "id": "mgmt", "name": "mgmt", "mgmt-network": true, "type": "E-LAN", "nsd-connection-point-ref": [ { "subnet-ref": "Service_subnet_1", "nsd-cp-ref": "mgmt" }, { "subnet-ref": "Service_subnet_2", "nsd-cp-ref": "mgmt" }, { "subnet-ref": "Service_subnet_3", "nsd-cp-ref": "mgmt" } ] }, { "id": "slice_input", "name": "slice_input", "type": "E-LAN", "nsd-connection-point-ref": [ { "subnet-ref": "Service_subnet_1", "nsd-cp-ref": "input" } ] }, { "id": "slice_output", "name": "slice_output", "mgmt-network": true, "type": "E-LAN", "nsd-connection-point-ref": [ { "subnet-ref": "Service_subnet_3", "nsd-cp-ref": "output" } ] } ] }
Before writing your NST, be sure to udnerstand how the vld make reference to the different Network Services composing the NST.
-
Step 1: Create and ask for a Network Slice Template Once the NST is ready, let's create a NetSlice Template by simply using the following command. IMPORTANT The parameter "<json_with_nst_information>", has to be substituted with your json (as string format):
curl -i -H "Content-Type: application/json" -X POST http://{SP_IP@}:5998/api/nst/v1/descriptors -d '<json_with_nst_information>'
To check if the previous NST has been created, use one of the following commands:
-
To GET ALL existing NSTs curl -i -H "Accept: application/json" -H "Content-Type: application/json" -X GET http://{SP_IP@}:5998/api/nst/v1/descriptors
-
To GET a SINGLE NST curl -i -H "Accept: application/json" -H "Content-Type: application/json" -X GET http://{SP_IP@}:5998/api/nst/v1/descriptors/
-
Step 2: Check the NST is created and create a NSI To create a NSI based on the previous NST, use the following command:
http {SP_IP@}:32002/api/v3/requests nst_id=<nst_uuid> name="<nsi_name>" request_type=CREATE_SLICE description="<nsi_description>"
For example, if the uuid of the created NST woudl be e7ccef1b-a4eb-4437-9aad-3170eeebf43f, the command to use would be: http {SP_IP@}:32002/api/v3/requests nst_id=e7ccef1b-a4eb-4437-9aad-3170eeebf43f name="NST_1" request_type=CREATE_SLICE description="This is a description"
IMPORTANT: The time to deploy a slice depends on the deployment time of all the Network Services Composing that Network Slice. To check the deployemnt process, please read the next step.
- Step 3: Check if the NSI is deployed or not To check if the previous NSI has been created, use one of the following commands:
-
To GET ALL existing NSIs curl -i -H "Content-Type: application/json" -X GET http://{SP_IP@}:5998/api/nsilcm/v1/nsi
-
To GET a SINGLE NSI curl -i -H "Accept: application/json" -H "Content-Type: application/json" -X GET http://{SP_IP@}:5998/api/nsilcm/v1/nsi/
-
Step 4: Terminate a Network Slice Instantiation Similar to the command to instantiate, to terminate a NSI, simply look for its uuid value and use the following command:
http {SP_IP@}:32002/api/v3/requests instance_uuid=<nsi_uuid> request_type=TERMINATE_SLICE
Use step 3 commands to check its status becomes "TERMINATED".
-
Step 5: Remove NSI object from the database In case a NSI has to be compeltely removed, use this command:
curl -X DELETE http://{SP_IP@}:5998/api/nsilcm/v1/nsi/<nsiId>
-
Step 6: Remove a NST object from the database To fully remove a NST object, use the following command: curl -X DELETE http://{SP_IP@}:5998/api/nst/v1/descriptors/<nst_uuid>