ETSI NFV-SOL VNF Deployment as VM with LCM Operation User Data

This document describes how to deploy VNF as VM with LCM operation user data in Tacker using CLI commands. Please check LCM-user-data spec and NFV-SOL014 v2.8.1 for more information on LCM operation user data.

Note

Most of the content is the same as ETSI NFV-SOL VNF Deployment as VM with TOSCA, but some have ‘LCM operation user data’ specific descriptions. The part will be clarified with the notation [This is UserData specific part].

Overview

The diagram below shows an overview of the VNF deployment.

  1. Request create VNF

    A user requests tacker-server to create a VNF with tacker-client by uploading a VNF Package and requesting create VNF. The VNF Package should contain BaseHOT and UserData in addition to VNFD. The detailed explanation of these contents can be found in VNF Package.

  2. Request instantiate VNF

    A user requests tacker-server to instantiate the created VNF by requesting instantiate VNF with instantiate parameters.

  3. Call OpenStack Heat API

    Upon receiving a request, tacker-server redirects it to tacker-conductor. In tacker-conductor, the request is redirected again to an appropriate infra-driver (in this case OpenStack infra-driver) according to the contents of the instantiate parameters. Then, OpenStack infra-driver calls OpenStack Heat APIs to create a VM as a VNF.

  4. Create a VM

    OpenStack Heat creates a VM according to the API calls.

../_images/etsi_vnf_deployment_as_vm_with_user_data.png

Prerequisites

The following packages should be installed:

  • tacker

  • python-tackerclient

A default VIM should be registered according to VIM Management.

The VNF Package(sample_vnf_pkg.zip) used below is prepared by referring to VNF Package.

Note

[This is UserData specific part] In order to deploy VNF using LCM operation user data, it is necessary to include BaseHOT and UserData in the VNF Package, which are optional in VNF Package.

VNF Deployment Procedure as VM

In order to deploy VNF as a VM, it is necessary to execute the following procedure. Details of CLI commands are described in VNF Package Management and VNF Lifecycle Management.

Many procedures are the same as ETSI NFV-SOL VNF Deployment as VM with TOSCA, so refer to the doc for those procedures.

1. Create VNF Package Info

See procedure in ETSI NFV-SOL VNF Deployment as VM with TOSCA.

2. Upload VNF Package

See procedure in ETSI NFV-SOL VNF Deployment as VM with TOSCA.

3. Create VNF Identifier

See procedure in ETSI NFV-SOL VNF Deployment as VM with TOSCA.

4. Instantiate VNF

Create a sample_param_file.json file with the following format. This is the file that defines the parameters for an instantiate request. These parameters will be set in the body of the instantiate request.

Required parameter:

  • flavourId

  • additionalParams

Note

Details of flavourId is described in VNF Descriptor (VNFD) based on ETSI NFV-SOL001.

Note

[This is UserData specific part] additionalParams is a parameter that can be described by KeyValuePairs. By setting the following two parameters in this parameter, instantiate using LCM operation user data becomes possible. For file_name.py and class_name, set the file name and class name described in Prerequisites.

  • lcm-operation-user-data: ./UserData/file_name.py

  • lcm-operation-user-data-class: class_name

Optional parameters:

  • instantiationLevelId

  • extVirtualLinks

  • extManagedVirtualLinks

  • vimConnectionInfo

Note

You can skip vimConnectionInfo only when you have the default VIM described in VIM Management.

Param file with only required parameters:

{
  "flavourId":"simple",
  "additionalParams": {
    "lcm-operation-user-data": "./UserData/lcm_user_data.py",
    "lcm-operation-user-data-class": "SampleUserData"
  }
}

Param file with optional parameters:

{
  "flavourId": "simple",
  "instantiationLevelId": "instantiation_level_1",
  "extVirtualLinks": [
    {
      "id": "net0",
      "resourceId": "4bf3e646-7a24-4f04-a985-d8f4bb1203de", #Set the uuid of the network to use
      "extCps": [
        {
          "cpdId": "CP1",
          "cpConfig": [
            {
              "cpProtocolData": [
                {
                  "layerProtocol": "IP_OVER_ETHERNET"
                }
              ]
            }
          ]
        }
      ]
    }
  ],
  "vimConnectionInfo": [
    {
      "id": "e24f9796-a8e9-4cb0-85ce-5920dcddafa1",    #Set a random uuid.
      "vimId": "8a0fd79d-e224-4c27-85f5-ee79c6e0d870", #Set the uuid of the VIM to use
      "vimType": "ETSINFV.OPENSTACK_KEYSTONE.v_2"
    }
  ],
  "additionalParams": {
    "lcm-operation-user-data": "./UserData/lcm_user_data.py",
    "lcm-operation-user-data-class": "SampleUserData"
  }
}

Execute the following CLI command to instantiate the VNF instance.

$ openstack vnflcm instantiate VNF_INSTANCE_ID \
     ./sample_param_file.json

Result:

Instantiate request for VNF Instance 725f625e-f6b7-4bcd-b1b7-7184039fde45 has been accepted.

After that, execute the following CLI command and confirm that VNF instance instantiation was successful.

  • Confirm that the ‘Instantiation State’ is ‘INSTANTIATED’.

$ openstack vnflcm show VNF_INSTANCE_ID \
    -c 'Instantiation State'

Result:

+---------------------+--------------+
| Field               | Value        |
+---------------------+--------------+
| Instantiation State | INSTANTIATED |
+---------------------+--------------+

5. Terminate VNF

See procedure in ETSI NFV-SOL VNF Deployment as VM with TOSCA.

6. Delete VNF Identifier

See procedure in ETSI NFV-SOL VNF Deployment as VM with TOSCA.