Importing the VNF
To import the active VNF, follow the steps:
-
Through RPC load, send the XML with runtime data to ESC.
For Example: esc_nc_cli --user <username> --password <password> import-deployment-data CREATE admin name-dep /opt/cisco/existing_vms.xml
-
Deploy the associated
dep.xml
file to ESC, by using the following command:esc_nc_cli --user <username> --password <password> edit-config dep.xml
-
Fix the deployment issues, if required. To fix the issues, follow the steps:
-
Re-issue the imported data (as in step 1).
-
Undeploy the
dep.xml
file.For Example: esc_cli --user <username> --password <password> delete-dep aTenantName aDeploymentName
-
Re-deploy the
dep.xml
via CLI.For Example: esc_cli --user <username> --password <password> edit-config dep.xml
-
Repeat steps a to c as needed.
-
-
Call RPC to declare that the ESC manages the VNF completely.
For Example: 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>
Import Limitations
-
Only 1 VM per VM group is supported.
-
Scaling is not supported.