インスタンス化要求により、コールフローが VNF インスタンスを展開できるようにメッセージ交換がトリガーされます。VNF のリソースは、VNF インスタンスがインスタンス化されたときにのみ割り当てられます。この要求では、Create VNF 要求によって返され、要求の送信先の
URL にエンコードされる VNF インスタンス識別子が必要です。
フロー内のインスタンス化サブタスクには、次のものがあります。
-
NFVO から VNF 記述子(VNFD)テンプレートを取得する。
-
NFVO から許可を要求する(双方向付与フロー)。詳細については、「付与フローの要求」を参照してください。
SOL003 の例:
メソッドタイプ:
POST
VNFM エンドポイント:
/vnf_instances/{vnfInstanceId}/instantiate
HTTP 要求ヘッダー:
Content-Type:application/json
要求ペイロード(ETSI データ構造: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"
}
}
flavourId 値は、VNFD で指定された 1 つの flavour_id
と同じである必要があります。
前の例には、サブネットが定義された外部接続ポイントも含まれています。IP アドレスはそのサブネットから割り当てられます。固定 IP または MAC アドレスの詳細については、ETSI API を使用した仮想ネットワーク機能のスケーリングを参照してください。
(注) |
NFVO からの付与応答は、vimConnectionInfo を提供します。これは SOL002 ペイロードでは提供されません。SOL002 ペイロードに vimConnectionInfo 情報が含まれていないため、これが必要な場合があります。
|
VNFD テンプレートに変数を追加することで、インスタンス化の前に VNF をカスタマイズできます。これらの変数にマップされる値は、LCM 要求の additionalParams フィールドで提供されます。変数はキーと値のペアで、値はリスト、文字列、数値、またはブール値のいずれかです。
VNFM によって VNFD が取得されると、additionalParams 変数が、受信した元の要求からの VNF インスタンスデータにマージされて、インスタンス固有のデータが形成されます。
提供されるパラメータのリストは、VNFD のコンテンツによって決まります。要求で指定した additionalParams は、VNFD 内で get_input TOSCA メソッドを使用する VNFD によって使用されます。たとえば、cpus
および mem_size
変数は VNFD 内のプレースホルダとマージされます。次に例を示します。
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
新しい additionalParams 変数を含む変更リクエストが同じ VNF インスタンスに対して送信されると、新しい変数によってそれらのキーの既存の値が上書きされます。VNFM は、展開に新しい変数を使用します。
内部リンクはエフェメラルになるように設計されていますが、一部の展開シナリオでは、VNF を超えた外部リンクにバインドできます。次の VNFD フラグメントの例を考えます。
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
VNF 展開で automation_net の代わりに使用する外部仮想リンクを指定するには、次のデータ構造をインスタンス化要求の一部として使用する必要があります。
...
"extManagedVirtualLinks": [
{
"id": "net-5ddc8435-9d85-4560-8b95-bfcd3369c5c2",
"resourceId": "esc-net2",
"vimConnectionId":"default_openstack_vim",
"virtualLinkDescId": "automation_net"
}
],
...
ETSI 仕様ではエフェメラルボリュームの概念しかサポートしていませんが、多くのベンダーは永続的なボリュームの仕様を求めているため、シスコはこれをサポートする拡張機能を実装しました。次の例のように、永続ボリュームの VIM リソース ID を
additionalParams キー(VNFD の get_input と一致する)として指定し、オプションのプロパティを使用して VNFD のボリュームを置き換えることができます。
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
付与経由での許可の要求
ETSI API は、VNF インスタンスリソースのライフサイクル管理操作を完了するために NFVO からの許可を要求し、事前プロビジョニングされたリソースのリソース ID を取得します。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"
}
}
}
返された対応する付与は、次のようになります。
{
"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"
}
}
}
付与要求は、要求されたすべてのリソースが付与されている場合にのみ受け入れられます。そうでない場合、付与は拒否されます。