VNF のインポート
アクティブ VNF をインポートするには、次の手順を実行します。
-
RPC ロードを通じて、ランタイムデータを含む XML を ESC に送信します。
次に例を示します。 esc_nc_cli --user <username> --password <password> import-deployment-data CREATE admin name-dep /opt/cisco/existing_vms.xml
-
次のコマンドを使用して、関連する
dep.xml
ファイルを ESC に展開します。esc_nc_cli --user <username> --password <password> edit-config dep.xml
-
必要に応じて、展開の問題を修正します。問題を修正するには、次の手順を実行します。
-
インポートしたデータを再発行します(ステップ 1)。
-
dep.xml
ファイルを展開解除します。次に例を示します。 esc_cli --user <username> --password <password> delete-dep aTenantName aDeploymentName
-
CLI を使用して
dep.xml
を再展開します。次に例を示します。 esc_cli --user <username> --password <password> edit-config dep.xml
-
必要に応じてステップ a ~ c を繰り返します。
-
-
RPC を呼び出して、ESC が VNF を完全に管理することを宣言します。
次に例を示します。 esc_nc_cli --user <username> --password <password> import-deployment-data FINALIZE admin name-dep
import.xml
の例<import>
<vms>
<vm_details> <!--First VM details-->
<flavor/>
<host/>
<host_id/>
<image/>
<port/>
<uuid>1bb008e1-d4dd-4107-bc45-7e298a5ac510</uuid>
<name>parvmoha-bf-vm</name>
<attached_volume/>
</vm_details>
<vm_details>
........ <!–-add more vms using vm_details tag-->
</vm_details>
</vms>
<deployment_name>parvmoha-dep</deployment_name>
<project_name>admin</project_name>
<project_uuid>563fba7044c847a6a370cc10d5ef7d57</project_uuid>
</import>
dep.xml
の例:<?xml version="1.0" encoding="UTF-8"?>
<esc_datamodel xmlns="http://www.cisco.com/esc/esc">
<tenants>
<tenant>
<name>aTenantName</name>
<managed_resource>false</managed_resource>
<deployments>
<deployment>
<name>brownfield-deployment</name>
<vm_group>
<name>g2</name>
<vim_vm_name>vm-cirros</vim_vm_name>
<image>Automation-Cirros-Image</image>
<flavor>Automation-Cirros-Flavor</flavor>
<bootup_time>100</bootup_time>
<recovery_wait_time>0</recovery_wait_time>
<interfaces>
<interface>
<nicid>0</nicid>
<network>esc-net</network>
<vim_interface_name>vm-cirros-interface</vim_interface_name>
</interface>
</interfaces>
<kpi_data>
<kpi>
<event_name>VM_ALIVE</event_name>
<metric_value>1</metric_value>
<metric_cond>GT</metric_cond>
<metric_type>UINT32</metric_type>
<metric_occurrences_true>2</metric_occurrences_true>
<metric_occurrences_true>3</metric_occurrences_true>
<metric_collector>
<nicid>0</nicid>
<type>ICMPPing</type>
<poll_frequency>3</poll_frequency>
<polling_unit>seconds</polling_unit>
<continuous_alarm>false</continuous_alarm>
</metric_collector>
</kpi>
</kpi_data>
<rules>
<admin_rules>
<rule>
<event_name>VM_ALIVE</event_name>
<action>ALWAYS log</action>
<action>TRUE servicebooted.sh</action>
<action>FALSE recover autohealing</action>
</rule>
</admin_rules>
</rules>
<config_data />
<scaling>
<min_active>1</min_active>
<max_active>1</max_active>
<elastic>true</elastic>
</scaling>
<recovery_policy>
<recovery_type>AUTO</recovery_type>
<action_on_recovery>REBOOT_THEN_REDEPLOY</action_on_recovery>
<max_retries>1</max_retries>
</recovery_policy>
</vm_group>
</deployment>
</deployments>
</tenant>
</tenants>
</esc_datamodel>
インポートの制限
-
VM グループごとに 1 つの VM のみがサポートされます。
-
スケーリングはサポートされていません。