The instantiation request triggers several message exchanges, which allow the call flow to deploy a VNF instance. The resources
for the VNF are only allocated when the VNF instance is instantiated. The request requires the VNF instance identifier, returned
by the Create VNF request to be encoded into the URL to which the request is posted.
The instantiation sub-tasks within the flow include:
-
Retrieving the VNF Descriptor (VNFD) template from the NFVO.
-
Requesting permission from the NFVO (bi-directional Grant flow). For more information see, Requesting Grant Permission.
Example for SOL003:
Method type:
POST
VNFM Endpoint:
/vnf_instances/{vnfInstanceId}/instantiate
HTTP Request Header:
Content-Type:application/json
Request Payload (ETSI data structure: InstantiateVnfRequest)
{
"flavourId": "default",
"extVirtualLinks": [
{
"id": "extVL-dbf477ad-199a-47ff-939a-cb0101c92585",
"resourceId": "ext-net",
"extCps": [
{
"cpdId": "ecp_1_vdu_node_1",
"cpConfig": {
"cp1": {
"cpProtocolData": [
{
"layerProtocol": "IP_OVER_ETHERNET",
"ipOverEthernet": {
"ipAddresses": [
{
"numDynamicAddresses": "1",
"subnetId": "23bb3-742aa-8213eb-dded2"
"type": "IPV4"
}
]
}
}
]
}
}
}
],
"extManagedVirtualLinks": [
{
"id": "my-network",
"resourceId": "93fb90ae-0ec1-4a6e-8700-bf109a0f4fba",
"virtualLinkDescId": "VLD1"
}
],
"vimConnectionInfo": {
"default_openstack_vim": {
"accessInfo": {
"password": "*******,
"username": "admin",
"vim_project": "tenantName"
},
"extra": {
"name": "esc"
},
"interfaceInfo": {
"baseUrl": "http://localhost:8080"
},
"vimId": "default_openstack_vim",
"vimType": "OPENSTACK"
}
}
"additionalParams": {
"CPUS": 2,
"MEM_SIZE": "512 MB",
"VIM_FLAVOR": "Automation-Cirros-Flavor",
"BOOTUP_TIME": "1800"
}
}
The flavourId value must be the same as a single flavour_id
specified in the VNFD.
The previous example also includes an external connection point with a subnet defined. The IP addresses are allocated from
that subnet. For information on fixed IP or MAC addresses, see Scaling Virtual Network Functions Using ETSI API.
Note
|
The Grant response from the NFVO provides the vimConnectionInfo. It is not provided in the SOL002 payload. This is required in some cases since the SOL002 payloads do not include the vimConnectionInfo information.
|
You can customize the VNF before instantiation by adding variables to the VNFD template. The values that map to those variables
are supplied in the additionalParams field of the LCM request. The variables are key-value pairs, where the value can be either a list, string, numeric or boolean.
When the VNFD is retrieved by the VNFM, the additionalParams variables are merged into the VNF instance data from the original request received to form instance-specific data.
The list of parameters supplied is driven by the contents of the VNFD; the additionalParams specified in the request are used by the VNFD using the get_input TOSCA method within the VNFD. For example, the cpus
, and mem_size
variables are merged with the placeholders within the VNFD. For example:
tosca_definitions_version: tosca_simple_yaml_1_3
imports:
- cisco_nfv_sol001_types.yaml
- etsi_nfv_sol001_vnfd_3_3_1_types.yaml
metadata:
template_name: Example
template_author: Cisco Systems
template_version: '1.0'
topology_template:
inputs:
CPUS:
description: Number of CPUs
type: string
default: "2"
MEM_SIZE:
description: Memory size
type: string
default: "512 MB"
VIM_FLAVOR:
description: VIM Flavor
type: string
default: "Automation-Cirros-Flavour"
BOOTUP_TIME:
description: Time taken to boot the VNF
type: string
default: "1800"
substitution_mappings:
node_type: cisco.1VDU.1_0.1_0
requirements:
- virtual_link: [ node_1_nic0, virtual_link ]
node_templates:
vdu1:
type: tosca.nodes.nfv.Vdu.Compute
properties:
name: vdu1
description: Example
configurable_properties:
additional_vnfc_configurable_properties:
vim_flavor: { get_input: VIM_FLAVOR }
bootup_time: { get_input: BOOTUP_TIME }
...
vdu_profile:
min_number_of_instances: 1
max_number_of_instances: 1
capabilities:
virtual_compute:
properties:
virtual_cpu:
num_virtual_cpu: { get_input: CPUS }
virtual_memory:
virtual_mem_size: { get_input: MEM_SIZE }
node_1_nic0:
type: tosca.nodes.nfv.VduCp
properties:
order: 0
layer_protocols: [ ipv4 ]
protocol:
- associated_layer_protocol: ipv4
trunk_mode: false
virtual_network_interface_requirements:
- support_mandatory: true
network_interface_requirements:
management: "false"
name_override: { get_input: SRIOV_A_INT_NAME }
iface_type: "direct"
requirements:
- virtual_binding: vdu_1
If a modification request with new additionalParams variables is submitted for the same VNF instance, then the new variables overwrites the existing values for those keys. The
VNFM uses the new variables for deployment.
Although internal links are designed to be ephemeral, in some deployment scenarios they can be bound to external links that
outlive the VNF. Consider the following example VNFD fragment:
automation_net:
type: tosca.nodes.nfv.VnfVirtualLink
properties:
connectivity_type:
layer_protocols: [ ipv4 ]
description: Internal Network VL
vl_profile:
max_bitrate_requirements:
root: 10000
min_bitrate_requirements:
root: 0
virtual_link_protocol_data:
- associated_layer_protocol: ipv4
l3_protocol_data:
ip_version: ipv4
cidr: 1.180.10.0/29
dhcp_enabled: true
To specify an external virtual link to be used in place of automation_net in the VNF deployment, the following data structure
is used as part of the instantiation request:
...
"extManagedVirtualLinks": [
{
"id": "net-5ddc8435-9d85-4560-8b95-bfcd3369c5c2",
"resourceId": "esc-net2",
"vimConnectionId":"default_openstack_vim",
"virtualLinkDescId": "automation_net"
}
],
...
Although the ETSI specifications only support the concept of ephemeral volumes, many vendors require the specification of
a persistent volume and so Cisco has implemented an extension to support this. The VIM resource Id of the persistent volume
can be supplied as an additionalParams key (that matches the get_input in the VNFD) and replace a volume in the VNFD using an optional property, as per the following
example:
example-volume:
type: tosca.nodes.nfv.Vdu.VirtualBlockStorage
properties:
virtual_block_storage_data:
size_of_storage: 200 GB
vdu_storage_requirements:
resource_id: { get_input: EX_VOL_UUID }
vol_id: "0"
bus: ide
type: LUKS
Requesting Permission via Grant
The ETSI API requests permission from the NFVO to complete lifecycle management operations for the VNF instance resources
and gets resource Ids for any resources pre-provisioned. Following is an example of GrantRequest:
{
"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/v2/vnf_instances/14924fca-fb10-45da-bcf5-59c581d675d8"
},
"vnfLcmOpOcc":
{
"href": "https://172.16.255.8:8251/vnflcm/v2/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": {
"default_openstack_vim": {
"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"
}
}
}
The grant request is accepted only if all the requested resources have been granted, else the grant is rejected.