インスタンス化要求によって多数のメッセージ交換がトリガーされ、VNF インスタンスをインスタンス化するためのコールフローが完了します。VNF インスタンスがインスタンス化されるときに、リソースが割り当てられます。これには、VNF 作成要求によって返され、要求がポストされる
URL にエンコードされた VNF インスタンス ID が必要です。
フロー内のインスタンス化要求サブタスクは次のとおりです。
-
NFVO から VNF 記述子テンプレートを取得する。
-
NFVO から許可を要求する(双方向付与フロー)。詳細については、「付与フローの要求」を参照してください。
メソッドタイプ:
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": [
{
"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": [
{
"accessInfo": {
"password": "*******,
"username": "admin",
"vim_project": "tenantName"
},
"extra": {
"name": "esc"
},
"id": "default_openstack_vim",
"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 に送信されると、変数は同じ VNF インスタンスにマージされます。additionalParams 変数は VNF 変数とマージされ、変数の実際の値はインスタンス化中にのみ提供されます。
提供されるパラメータのリストは、VNFD のコンテンツによって決まります。要求で指定した additionalParams は、VNFD 内で get_input TOSCA メソッドを使用する VNFD によって使用されます。たとえば、cpus
および mem_size 変数は VNFD 内のプレースホルダとマージされます。
tosca_definitions_version: tosca_simple_yaml_1_2
imports:
- cisco_nfv_sol001_types.yaml
- etsi_nfv_sol001_vnfd_0_10_0_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"
node_templates:
vdu1:
type: cisco.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 }
同じ VNF に対して additionalParams 変数を含むさらなる LCM 要求が送信されると、新しい変数が既存の変数を上書きします。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
VNF 展開で automation_net の代わりに使用する外部仮想リンクを指定するには、次のデータ構造をインスタンス化要求の一部として使用する必要があります。
...
"extManagedVirtualLinks": [
{
"id": "net-5ddc8435-9d85-4560-8b95-bfcd3369c5c2",
"resourceId": "esc-net2",
"vimConnectionId":"default_openstack_vim",
"virtualLinkDescId": "automation_net"
}
],
...
ETSI 仕様ではエフェメラルボリュームの概念しかサポートしていませんが、多くのベンダーは永続的なボリュームの仕様を求めているため、シスコはこれをサポートする拡張機能を実装しました。次の例に示すように、永続的なボリュームのリソース ID を additionalParam
として指定し、オプションのプロパティを使用して VNFD のボリュームに関連付けることができます。
example-volume:
type: cisco.nodes.nfv.Vdu.VirtualBlockStorage
properties:
resource_id: { get_input: EX_VOL_UUID }
virtual_block_storage_data:
size_of_storage: 200 GB
vdu_storage_requirements:
vol_id: 1
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/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"
}
}
}
返された対応する付与は、次のようになります。
{
"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"
}
}
}
付与要求は、要求されたすべてのリソースが付与されている場合にのみ受け入れられます。そうでない場合、付与は拒否されます。
ESC からの展開記述子の取得
NFVO は、ESC データモデルインスタンスを展開記述子の形式で取得できます。NFVO は、インスタンス化の際に提供されたすべての入力と、後で展開記述子に加えられた変更を表示できます。
展開記述子を取得するには、次の手順を実行する必要があります。
-
VNF の作成
-
vnfinstanceId を指定します
メソッドタイプ
GET
VNFM エンドポイント
/vnflcm/v1/ext/vnfinstances/{vnfInstanceId}/deployment
HTTP 要求ヘッダー
content-Type:application/xml
要求ペイロード
該当なし。