The instantiation request triggers a number of message exchanges, which allows the call flow to be completed in order to instantiate
a VNF instance. The resources are allocated when the VNF instance is instantiated. It requires the VNF instance identifier,
returned by the create VNF request, encoded into the URL to which the request is posted.
The instatiation request sub-tasks within the flow include:
-
Retrieving the VNF Descriptor template from the NFVO.
-
Requesting permission from the NFVO (bi-directional Grant flow). For more information see, Requesting Grant Permission.
Typically, the request permission, and retrieve messages are customized for the NFVO.
Method type:
POST
VNFM Endpoint:
/vnf_instances/{vnfInstanceId}/instantiate
HTTP Request Header:
Content-Type:application/json
Request Payload (ETSI data structure: InstantiateVnfRequest)
{
"flavourId": "vdu_node1",
"extManagedVirtualLinks": [
{
"id": "my-network",
"resourceId": "RES1",
"virtualLinkDescId": "VLD1"
}
],
"vimConnectionInfo": [
{
"accessInfo": {
"resourceGroupId": "tenantName"
},
"id": "vimConnId",
"vimType": "Openstack"
}
]
}
The flavourId value must be same as the flavour_id specified in the VNFD file under properties.
Response Headers:
HTTP/1.1 202
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Application-Context: application:8250
Accept-Ranges: none
Location: http://localhost:8250/vnflcm/v1/vnf_lcm_op_occs/457736f0-c877-4e07-8055-39dd406c616b
Content-Length: 0
Date: Thu, 04 Jan 2018 12:20:40 GMT
Response Body:
not applicable.
Note |
If there are multiple vm groups within the VNFD in a single ETSI deployment, they must all use the same VIM.
|
You can customize the VNF before instantiation by adding variables to the VNFD template. Specify the variables in the additionalParams field of the LCM request. The variables are name-value pairs, where the value can be either string, numeric or boolean. In
the example below, the cpus, and mem_size
additionalParams are defined in the VNFD template using the get_input: <TOSCA method>.
Method type:
POST
VNFM Endpoint:
/vnf_instances/{vnfInstanceId}/instantiate
HTTP Request Header:
Content-Type:application/json
Request Payload (ETSI data structure: InstantiateVnfRequest)
{
"flavourId": "default",
"additionalParams": {
"CPUS": 2,
"MEM_SIZE": "512 MB"
}
}'
The additionalParams variables are merged with the VNF variables, and actual values for the variables are provided only during instantiation.
node_templates:
my_server:
type: tosca.nodes.Compute
capabilities:
host:
properties:
num_cpus: { get_input CPUS }
mem_size: { get_input MEM_SIZE }
disk_size: 10 GB
topology_template:
inputs:
CPUS
description: Number of CPUs
MEM_SIZE
description: Memory size
If further LCM requests with additionalParams variables are submitted for the same VNF, then the new variables overwrite the existing variables. The VNFM uses the new
variables for instantiation.
Note |
The additional variables must be initially defined in the VNFD template, so that it can be used during instantiation.
|
ESC supports internal virtual links while instantiating a VNF using the TOSCA VNFD template.
Example for Virtual Internal Links from a TOSCA VNFD template:
esc-test-net:
type: tosca.nodes.nfv.VnfVirtualLinkDesc
properties:
connectivity_type:
layer_protocol: ipv4
description: VDU Internal Network VL
EtsiTestInternalVL-Net-1:
type: tosca.nodes.nfv.VnfVirtualLinkDesc
properties:
connectivity_type:
layer_protocol: ipv4
description: VDU Internal Network VL
externally_managed: false
Requesting Grant Permission
The ETSI API requests for permission from the NFVO for lifecycle management operations to complete the operations in progress
for the VNF instance resources.
{
"flavourId": "default",
"instantiationLevelId": "default",
"isAutomaticInvocation": false,
"operation": "INSTANTIATE",
"vnfInstanceId": "e426a94e-7963-430c-96ee-778dde5bd021",
"vnfLc mOpOccId": "06fe989b-7b0b-40dc-afb3-de26c18651ae",
"vnfdId": "6940B47B-B0D0-48CB-8920-86BC23F91B16",
"addResources": [
{
"id": "res-1abb1609-a1f3-418a- a7a0-2692a5e53311",
"resourceTemplateId": "vdu1",
"type": "COMPUTE",
"vduId": "vdu1"
},
{
"id": "res-c5ece35c-89e3-4d29-b594-ee9f6591f061",
"resourceTemplateI d": "node_1_nic0",
"type": "LINKPORT",
"vduId": "vdu1"
},
{
"id": "res-e88d8461-5f5a-4dba-af14-def82ce894e5",
"resourceTemplateId": "automation_net",
"type": "VL"
}
],
"_links": {
"vnfInstance": {
"href": "https://172.16 .255.8:8251/vnflcm/v1/vnf_instances/14924fca-fb10-45da-bcf5-59c581d675d8"
},
"vnfLcmOpOcc": {
"href": "https://172.16.255.8:8251/vnflcm/v1/vnf_lcm_op_occs/457736f0-c877-4e07-8055-39dd406c616b"
}
}
}
The corresponding Grant returned may look like the following:
{
"id": "grant-0b7d3420-e6ee-4037-b116-18808dea4e2a",
"vnfInstanceId": "14924fca-fb10-45da-bcf5-59c581d675d8",
"vnfLcmOpOccId": "457736f0-c877-4e07-8055-39dd406c616b",
"addResources": [
{
"resourceDefinitionId": "res-1abb1609-a1f3-418a-a7a0-2692a5e53311",
"vimConnectionId": "esc-005e4412-e056-43a9-8bc0-d6699c968a3c"
},
{
"resourceDefinitionId": "res-c5ece35c-89e3-4d29-b594-ee9f6591f061",
"vimConnectionId": "esc-005e4412-e056-43a9-8bc0-d6699c968a3c"
},
{
"resourceDefinitionId": "res-e88d8461-5f5a-4dba-af14-def82ce894e5",
"vimConnectionId": "esc-005e4412-e056-43a9-8bc0-d6699c968a3c"
}
],
"vimAssets": {
"computeResourceFlavours": [
{
"vimConnectionId": "esc-005e4412-e056-43a9-8bc0-d6699c968a3c",
"vimFlavourId": "Automation-Cirros-Flavor",
"vnfdVirtualComputeDescId": "vdu1"
}
],
"softwareImages": [
{
"vimConnectionId": "esc-005e4412-e056-43a9-8bc0-d6699c968a3c",
"vimSoftwareImageId": "Automation-Cirros-DHCP-2-IF",
"vnfdSoftwareImageId": "vdu1"
}
]
},
"vimConnections": [
{
"id": "esc-005e4412-e056-43a9-8bc0-d6699c968a3c",
"vimId": "default_openstack_vim",
"vimType": "OPENSTACK",
"accessInfo": {
"vim_project": "admin"
}
}
],
"zones": [
{
"id": "zone-c9f79460-7a23-43e4-bb6d-0683e2cdb3d4",
"vimConnectionId": "default_openstack_vim",
"zoneId": "default"
},
{
"id": "zone-4039855e-a2cb-48f8-996d-b328cdf9889a",
"vimConnectionId": "default_openstack_vim",
"zoneId": "nova"
}
],
"_links": {
"self": {
"href": "http://localhost:8280/grant/v1/grants/grant-0b7d3420-e6ee-4037-b116-18808dea4e2a"
},
"vnfInstance": {
"href": "https://172.16 .255.8:8251/vnflcm/v1/vnf_instances/14924fca-fb10-45da-bcf5-59c581d675d8"
},
"vnfLcmOpOcc": {
"href": "https://172.16.255.8:8251/vnflcm/v1/vnf_lcm_op_occs/457736f0-c877-4e07-8055-39dd406c616b"
}
}
}
Retrieving the Deployment Descriptor from ESC
The NFVO can retrieve the ESC datamodel instance in the form of a deployment descriptor. The NFVO can view all the inputs
provided at the time of instantiation and changes made later to the deployment descriptor.
To retrieve the deployment descriptor, you must:
Method Type
GET
VNFM Endpoint
/vnflcm/v1/ext/vnfinstances/{vnfInstanceId}/deployment
HTTP Request Header
content-Type:application/xml
Request Payload
NA