Skip to content

How to use this component

Pol Alemany edited this page May 10, 2019 · 17 revisions

This page describes the process you have to follow to create a Network Slice Template and its related Network Slice Instances.

Either if you use the "Real" or the "Emulation" mode, the process is the same. The only difference between modes is on Step 0: Check there are available services; if you use the "Real" mode, you must have a service available in the Sonata SP. Otherwise ("Emulation" mode), simply generate one or a set of fake uuids (search "uuid generator" in a web search) to use on the Template creation process.

When you read the following procedure, pelase 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: Check there are available services The first step to do is to have a service ready to be deployed with its uuid ("Real" mode) or a fake uuid ("Emulation" mode) to create a template with at least one Network Service. To make it easy, the slice manager has the option to check the services available in the Sonata SP. NOTE: This feature will be deleted in the future as this command doesn't belong to this component, but for current development is useful as the response format makes easy to read the basic information of a service for the next step.

Further information:

  • Step 1: Create a Network Slice Template Now that we have a service or a fake uuid, let's create a NetSlice Template, simply use the following command...

    Request: curl -i -H "Content-Type: application/json" -X POST -d'{"name":"NST_Example_1", "version":"1.0", "author":"Author name, Company", "vendor":"5gTango", "nstNsdIds":[{"NsdId":"1efe07ab-7ada-42b0-bec0-a5bb1ab091fc"}]}' http://<base_address>:5998/api/nst/v1/descriptors
    
    Response example:
    
    [
     {
      "created_at": "2018-07-26T07:24:59.561+00:00",
      "md5": "bf62b1db3d0fdcdcc3f79692f990ebdf",
      "nstd": {
        "NSI_list_ref": [],
        "author": "Pol Alemany, CTTC",
        "name": "NST_squi_haproxy_example_1",
        "notificationTypes": "",
        "nstNsdIds": [
          "1efe07ab-7ada-42b0-bec0-a5bb1ab091fc"
        ],
        "onboardingState": "ENABLED",
        "operationalState": "ENABLED",
        "usageState": "IN_USE",
        "userDefinedData": "",
        "vendor": "5gTango",
        "version": "1.0"
      },
      "signature": null,
      "status": "active",
      "updated_at": "2018-07-26T07:40:23.980+00:00",
      "username": null,
      "uuid": "794a7cac-9de9-4ad6-a560-2f47ab0142e9"
     }
    ]
    
  • Step 2: Create a Network Slice Instantiation

    Request: curl -i -H "Content-Type: application/json" -X POST -d'{"name": "NSI_Example_1", "description": "NSI_descriptor", "nstId": "794a7cac-9de9-4ad6-a560-2f47ab0142e9"}' http://<base_address>:5998/api/nsilcm/v1/nsi
    
    Response example:
    
    [
     {
      "created_at": "2018-07-26T07:33:24.138+00:00",
      "description": "NSI_descriptor",
      "flavorId": "",
      "instantiateTime": "2018-07-26T07:25:41.079735",
      "name": "NSI_Example_1",
      "netServInstance_Uuid": [
        "e7ccef1b-a4eb-4437-9aad-3170eeebf43f"
      ],
      "nsiState": "INSTANTIATED",
      "nstId": "794a7cac-9de9-4ad6-a560-2f47ab0142e9",
      "nstName": "NST_squi_haproxy_example_1",
      "nstVersion": "1.0",
      "sapInfo": "",
      "scaleTime": "",
      "terminateTime": "2018-07-26T07:32:23.854086",
      "updateTime": "",
      "updated_at": "2018-07-26T07:33:24.138+00:00",
      "uuid": "fe752414-c3a9-4cb7-b9bb-241696ec9f3c",
      "vendor": "5gTango"
     }
    ]
    
  • Step 3: Terminate a Network Slice Instantiation

    Request: curl -i -H "Content-Type: application/json" -X POST -d '{"terminateTime": "0"}' http://<base_address>:5998/api/nsilcm/v1/nsi/fe752414-c3a9-4cb7-b9bb-241696ec9f3c/terminate
    
    Response example:
    
    [
     {
      "created_at": "2018-07-26T07:33:24.138+00:00",
      "description": "NSI_descriptor",
      "flavorId": "",
      "instantiateTime": "2018-07-26T07:25:41.079735",
      "name": "NSI_Example_1",
      "netServInstance_Uuid": [
        "e7ccef1b-a4eb-4437-9aad-3170eeebf43f"
      ],
      "nsiState": "TERMINATED",
      "nstId": "794a7cac-9de9-4ad6-a560-2f47ab0142e9",
      "nstName": "NST_squi_haproxy_example_1",
      "nstVersion": "1.0",
      "sapInfo": "",
      "scaleTime": "",
      "terminateTime": "2018-07-26T07:32:23.854086",
      "updateTime": "",
      "updated_at": "2018-07-26T07:33:24.138+00:00",
      "uuid": "fe752414-c3a9-4cb7-b9bb-241696ec9f3c",
      "vendor": "5gTango"
     }
    ]
    

NOTE: In a future release, it will be possible to define a date & time when to terminate a slice instead. But for the current release, the termination is done whent he request is sent that's why the value is "0".