The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
After a deployment is created successfully, the resources within a deployment can be updated. As part of deployment management, you can add or delete resources, or update the configuration of the existing resources. These updates can be made in a running deployment. This chapter describes managing these resources in detail.
You can update an existing deployment by adding new VM groups, interfaces, networks, and so on. You can also update the day-0 configuration, KPIs and Rules for the VM groups. In Cisco ESC Release 1.1 and later, you can add or delete a vm_group, add or delete an ephemeral network in a vm_group, and add or delete an interface in a VM group after successful deployment.
On OpenStack, you can perform all the updates such as add or delete a vm_group, ephemeral network vm_group, and an interface in a single deployment.
During a service update, auto-recovery actions may drive the service to an inconsistent state. To prevent triggering of auto-recovery actions, monitors are disabled before the service update workflow, and enabled after the update is complete.
Update |
OpenStack |
VMware vCenter |
---|---|---|
Adding a VM group |
Supported |
Supported |
Deleting a VM group |
Supported |
Supported |
Adding an ephemeral network |
Supported |
Not supported |
Deleting an ephemeral network |
Supported |
Not supported |
Adding an interface |
Supported |
Not supported |
Deleting an interface |
Supported |
Not supported |
Updating an interface |
Supported |
Supported |
Updating the day-0 config in a VM group |
Supported |
Supported |
Updating the KPIs and rules |
Supported |
Supported |
Updating the number of VMs (Scale In or Scale Out) in a VM group |
Supported |
Supported |
Updating the recovery wait time |
Supported |
Supported |
Updating the Static IP pool |
Not supported |
Not supported |
You can add or delete a vm_group from a running deployment using the existing images and flavors.
<esc_datamodel xmlns="http://www.cisco.com/esc/esc"> <tenants><tenant> <name>Admin</name> <deployments> <deployment> <deployment_name>NwDepModel_nosvc</deployment_name> <vm_group> <image></image> <Flavor></Flavor> ......... </vm_group> <vm_group> <image></image> <Flavor></Flavor> ......... </vm_group> <vm_group> <image></image> <Flavor></Flavor> ......... </vm_group> </deployment> </deployments> </tenant></tenants> </esc_datamodel>
UPDATE SERVICE REQUEST RECEIVED (UNDER TENANT) VM_DEPLOYED VM_ALIVE SERVICE_UPDATED UPDATE SERVICE REQUEST RECEIVED (UNDER TENANT)
<esc_datamodel xmlns="http://www.cisco.com/esc/esc"> <tenants><tenant> <name>Admin</name> <deployments> <deployment> <deployment_name>NwDepModel_NoSvc</deployment_name> <vm_group> <image></image> <Flavor></Flavor> ......... </vm_group> <vm_group nc:operation="delete"> <image></image> <Flavor></Flavor> ......... </vm_group> <vm_group nc:operation="delete"> <image></image> <Flavor></Flavor> ......... </vm_group> </deployment> </deployments> </tenant></tenants> </esc_datamodel>
UPDATE SERVICE REQUEST RECEIVED (UNDER TENANT) VM_UNDEPLOYED SERVICE_UPDATED UPDATE SERVICE REQUEST RECEIVED (UNDER TENANT)
You can add an ephemeral network in a vm_group using the existing images and flavors.
<esc_datamodel xmlns="http://www.cisco.com/esc/esc"> <tenants><tenant> <name>Admin</name> <deployments> <deployment> <deployment_name>NwDepModel_nosvc</deployment_name> <networks> <network> ......... </network> <network> ......... </network> <network> ......... </network> </networks> <vm_group> <image></image> <Flavor></Flavor> ......... </vm_group> </deployment> </deployments> </tenant></tenants> </esc_datamodel>
UPDATE SERVICE REQUEST RECEIVED (UNDER TENANT) CREATE_NETWORK CREATE_SUBNET SERVICE_UPDATED UPDATE SERVICE REQUEST RECEIVED (UNDER TENANT)
NETCONF request to delete an ephemeral network in a vm_group
<esc_datamodel xmlns="http://www.cisco.com/esc/esc"> <tenants><tenant> <name>Admin</name> <deployments> <deployment> <deployment_name>NwDepModel</deployment_name> <networks> <network nc:operation="delete"> ......... </network> <network> ......... </network> <network nc:operation="delete"> ......... </network> </networks> <vm_group> <image></image> <Flavor></Flavor> ......... </vm_group> </deployment> </deployments> </tenant></tenants> </esc_datamodel>
UPDATE SERVICE REQUEST RECEIVED (UNDER TENANT) DELETE_SUBNET DELETE_NETWORK SERVICE_UPDATED UPDATE SERVICE REQUEST RECEIVED (UNDER TENANT)
You can add an interface in a vm_group from a running deployment using the existing images and flavors.
NETCONF request to add an interface in a vm_group:
<interfaces> <interface> <nicid>0</nicid> <network>esc-net</network> </interface> <interface> <nicid>1</nicid> <network>utr-net</network> </interface> <interface> <nicid>2</nicid> <network>utr-net-1</network> </interface> </interfaces>
![]() Note | ESC Release 2.3 and later supports adding and deleting interfaces using the ESC Portal for OpenStack. ESC supports adding and deleting interfaces from a vm_group using both REST and NETCONF APIs. |
<interfaces> <interface> <nicid>0</nicid> <network>esc-net</network> </interface> <interface> <nicid>1</nicid> <network>utr-net</network> </interface> <interface nc:operation="delete"> <nicid>2</nicid> <network>utr-net-1</network> </interface> </interfaces>
You can simultaneously add and delete interfaces in a VM group (OpenStack only) in the same deployment request.
Updating an interface on OpenStack deletes the previous interface and creates a new one with the existing nic id.
The datamodel is as follows:
<interfaces> <interface> <nicid>0</nicid> <network>esc-net</network> </interface> <interface> <nicid>1</nicid> <network>utr-net-2</network> </interface> </interfaces>
A VM_UPDATED notification is sent with the details of all the interfaces in a VM, followed by a SERVICE_UPDATED notification after the workflow is updated.
<?xml version="1.0" encoding="UTF-8"?> <notification xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0"> <eventTime>2015-07-25T00:45:27.64+00:00</eventTime> <escEvent xmlns="http://www.cisco.com/esc/esc"> <status>SUCCESS</status> <status_code>200</status_code> <status_message>VM has been updated successfully. vm: utr-80__7515__utr-80__utr-80utr-80utr-801.2__0__utr-80__0</status_message> <svcname>utr-80</svcname> <svcversion>1.2</svcversion> <depname>utr-80</depname> <tenant>utr-80</tenant> <svcid>c1294ad1-fd7b-4a73-8567-335160dce90f</svcid> <depid>ecedf755-502c-473a-82f2-db3a5485fdf5</depid> <vm_group>utr-80</vm_group> <vm_source> <vmid>4b20024f-d8c8-4b1a-8dbe-3bf1011a0bcb</vmid> <hostid>71c7f3afb281485067d8b28f1734ec6b63f9e3225045c581168cc39d</hostid> <hostname>my-ucs-3</hostname> <interfaces> <interface> <nicid>0</nicid> <port_id>6bbafbf5-51a1-48c0-a4a5-cd6092657e5c</port_id> <network>7af5c7df-6246-4d53-91bd-aa12a1607656</network> <subnet>7cb6815e-3023-4420-87d8-2b10efcbe14e</subnet> <ip_address>192.168.0.10</ip_address> <mac_address>fa:16:3e:bc:07:d5</mac_address> <netmask>255.255.255.0</netmask> <gateway>192.168.0.1</gateway> </interface> <interface> <nicid>1</nicid> <port_id>6d54d3a8-b793-40b8-9a32-c7e2f08e0917</port_id> <network>4f85613a-d3fc-4b49-9cb0-b91d4360918b</network> <subnet>c3724a64-ffed-43b6-aba8-63287c5344ea</subnet> <ip_address>10.91.90.2</ip_address> <mac_address>fa:16:3e:49:d0:00</mac_address> <netmask>255.255.255.0</netmask> <gateway>10.91.90.1</gateway> </interface> <interface> <nicid>3</nicid> <port_id>04189123-fc7a-4418-877b-61c24a5e8508</port_id> <network>f9c7978f-800e-4bfc-bc20-1c29acef87d9</network> <subnet>63ae5e39-c41a-4b28-9ac7-ed94b5e477b0</subnet> <ip_address>172.16.0.97</ip_address> <mac_address>fa:16:3e:5e:2e:e3</mac_address> <netmask>255.240.0.0</netmask> <gateway>172.16.0.1</gateway> </interface> </interfaces> </vm_source> <vm_target> </vm_target> <event> <type>VM_UPDATED</type> </event> </escEvent> </notification>
You can update a network associated with an interface, while updating an existing deployment. Replace the old network name with a new name in the deployment request to update the network. The port group on the interfaces is updated for all VMs in the VM group during the network update.
![]() Note | IP update is not supported during an interface update on VMware vCenter. Static IP and mac pool updates are not supported during an interface update on VMware vCenter when min > 1 in a vm group. |
The datamodel update is as follows:
Existing datamodel:<interface> <nicid>1</nicid> <network>MgtNetwork</network> </interface>New datamodel:
<interface> <nicid>1</nicid> <network>VNFNetwork</network> </interface>
The following notification is received after successful update:
<?xml version="1.0" encoding="UTF-8"?> <notification xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0"> <eventTime>2016-08-17T12:03:12.518+00:00</eventTime> <escEvent xmlns="http://www.cisco.com/esc/esc"> <status>SUCCESS</status> <status_code>200</status_code> <status_message>Updated 1 interface: [net=VNFNetwork,nicid=1]</status_message> <depname>u1-asa</depname> <tenant>admin</tenant> <tenant_id>SystemAdminTenantId</tenant_id> <depid>90139aa1-9705-4b07-9963-d60691d3b0ad</depid> <vm_group>utr-asa-1</vm_group> <vm_source> <vmid>50261fbc-88a0-8601-71a9-069460720d4f</vmid> <hostid>host-10</hostid> <hostname>10.85.103.14</hostname> <interfaces> <interface> <nicid>1</nicid> <type>virtual</type> <port_id/> <network>VNFNetwork</network> <subnet/> <ip_address>16.0.0.254</ip_address> <mac_address>00:50:56:a6:d8:1d</mac_address> </interface> </interfaces> </vm_source> <vm_target> </vm_target> <event> <type>VM_UPDATED</type> </event> </escEvent> </notification> <?xml version="1.0" encoding="UTF-8"?> <notification xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0"> <eventTime>2016-08-17T12:03:12.553+00:00</eventTime> <escEvent xmlns="http://www.cisco.com/esc/esc"> <status>SUCCESS</status> <status_code>200</status_code> <status_message>Service group update completed successfully</status_message> <depname>u1-asa</depname> <tenant>admin</tenant> <tenant_id>SystemAdminTenantId</tenant_id> <depid>90139aa1-9705-4b07-9963-d60691d3b0ad</depid> <vm_source> </vm_source> <vm_target> </vm_target> <event> <type>SERVICE_UPDATED</type> </event> </escEvent> </notification>
You can update the interface (portgroup) in a VM group using the ESC Portal.
Hover over Actions, for the deployment you want to update from the Deployment Dashboard.
Select Update from the drop down. A popup appears.
Do one of the following:
The deployment status changes to updating under the Status column. For notifications, see the notifications dashboard.
To update (add, delete or change) the day-0 configuration of a VM group in an existing deployment, edit-config the deployment and update the configuration under config_data. The new day-0 config file is only applied on future deployment, which is triggered by either VM recovery (that is undeploy/deploy) or scale-out.
![]() Note | To change the existing day-0 config file, the URL or path must be specified. This enables ESC to detect the change that has occurred in the configuration. |
In the example below, if a VM ALIVE event is not received, you can change the action from triggering auto recovery to simply logging the event.
Existing configuration:
<config_data> <configuration> <dst>WSA_config.txt</dst> <file>https://10.60.73.167:4343/day0/cfg/vWSA/node/001-wsa/provider/Symphony_VNF_P-1B/file> </configuration> <configuration> <dst>license.txt</dst> <file>https://10.60.73.167:4343/day0/cfg/vWSA/node/001-wsa/provider/Symphony_VNF_P-1B/wsa-license.txt</file> </configuration> </config_data>
New configuration:
<config_data> <configuration> <dst>WSA_config.txt</dst> <file>https://10.60.73.167:4343/day0/cfg/vWSA/node/001-wsa/provider/Symphony_VNF_P-1B/file> </configuration> <configuration> <dst>license.txt</dst> <file>https://10.60.73.167:4343/day0/cfg/vWSA/node/002-wsa/provider/Symphony_VNF_P-1B/wsa-license.txt</file> </configuration> </config_data>
SERVICE_UPDATED notification is received after updating the configuration.
<notification xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0"> <eventTime>2016-05-05T00:35:15.359+00:00</eventTime> <escEvent xmlns="http://www.cisco.com/esc/esc"> <status>SUCCESS</status> <status_code>200</status_code> <status_message>Service group update completed successfully</status_message> <depname>900cd7554d31-5454000964474c1cbc07256792e63240-cloudvpn</depname> <tenant>Symphony_VNF_P-1B</tenant> <tenant_id>3098b55808e84484a4f8bab2160a41a7</tenant_id> <depid>b7d566ce-1ee6-4147-8c23-c8bcb5d05fd4</depid> <vm_source/> <vm_target/> <event> <type>SERVICE_UPDATED</type> </event> </escEvent> </notification>
For more information on day-0 configuration, see Day Zero Configuration.
ESC allows updating KPIs and rules for a VM in the existing deployment. Edit the datamodel to update the KPIs and rules section.
For example, to change the Polling Frequency in an existing deployment, update the <poll_frequency> element in the KPI section of the datamodel.
Change <poll_frequency>3</poll_frequency> to <poll_frequency>20</poll_frequency> in the sample below.
<kpi> <event_name>VM_ALIVE</event_name> <metric_value>1</metric_value> <metric_cond>GT</metric_cond> <metric_type>UINT32</metric_type> <metric_collector> <type>ICMPPing</type> <nicid>0</nicid> <poll_frequency>3</poll_frequency> <polling_unit>seconds</polling_unit> <continuous_alarm>false</continuous_alarm> </metric_collector> </kpi>
Similarly, the existing rules can be updated for a VM. For example, to switch off the auto- recovery on a boot failure and to log the action, update <action>FALSE recover autohealing</action> to <action>FALSE log</action> in the sample below.
<rules> <admin_rules> <rule> <event_name>VM_ALIVE</event_name> <action>ALWAYS log</action> <action>FALSE recover autohealing</action> <action>TRUE servicebooted.sh</action> </rule> ... ... </rules>
For more information on KPIs and Rules, see the KPIs and Rules Section.
You can add and remove VMs from an existing deployment by changing the min_active and max_active values in the scaling section of the datamodel. This alters the size of the initial deployment.
In the example below, the deployment has an initial count of 2 VMs, which can scale out to 5 VMs.
<esc_datamodel xmlns:ns2="urn:ietf:params:xml:ns:netconf:notification:1.0" xmlns:ns1="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:ns3="http://www.cisco.com/esc/esc_notifications" xmlns:ns0="http://www.cisco.com/esc/esc" xmlns="http://www.cisco.com/esc/esc"> <version>1.0.0</version> . . . <vm_group> </interfaces> <interface> <network>1fbf9fc2-3074-4ae6-bb0a-09d526fbada6</network> <nicid>1</nicid> <ip_address>23.23.23.23</ip_address> </interface> </interfaces> <scaling> <min_active>2</min_active> <max_active>5</max_active> <elastic>true</elastic> . . .
The example below creates an additional 8 VMs bringing the number of active VMs up to a minimum of 10. See the table below for more scenarios.
<esc_datamodel xmlns:ns2="urn:ietf:params:xml:ns:netconf:notification:1.0" xmlns:ns1="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:ns3="http://www.cisco.com/esc/esc_notifications" xmlns:ns0="http://www.cisco.com/esc/esc" xmlns="http://www.cisco.com/esc/esc"> <version>1.0.0</version> . . . <vm_group> </interfaces> <interface> <network>1fbf9fc2-3074-4ae6-bb0a-09d526fbada6</network> <nicid>1</nicid> <ip_address>23.23.23.23</ip_address> </interface> </interfaces> <scaling> <min_active>10</min_active> <max_active>15</max_active> <elastic>true</elastic> <static_ip_address_pool> <network>1fbf9fc2-3074-4ae6-bb0a-09d526fbada6</network> <gateway>192.168.0.1</gateway> <!-- not used --> <netmask>255.255.255.0</netmask> <!-- not used --> <ip_address>23.23.23.23</ip_address> </static_ip_address_pool> </scaling>
The table below shows some more scenarios on updating the minimum and maximum values in the scaling section.
Scenario |
Old Value |
New Value |
Active Value |
---|---|---|---|
If the initial number of VMs are a minimum of 2 and maximum of 5 in the scaling section, updating the minimum number of VMs to 3 would create one additional VM. This assumes that the active number of VMs remains at 2. |
The old minimum number of VMs is 2. |
The new minimum number of VMs is 3. |
The active number of VMs is 2. |
If the initial number of VMs is a minimum value of 2 and maximum value of 5, then updating the minimum value to 3 would update the database but will not impact the deployment. This scenario will occur if the original deployment has scaled creating one additional VM. |
The old minimum value is 2. |
The new minimum value is 3. |
The active count is 3. |
If the initial number of VMs is a minimum of 2 and maximum of 5, then updating the minimum value to 1 will update the database but will not impact the deployment. Having an active number of VMs greater than the minimum value is a valid deployment as the number of active VMs falls within the minimum or maximum range. |
The old minimum value is 2. |
The new minimum value is 1. |
The active number of VMs is 2. |
If the initial number of VMs is a minimum of 2 and maximum of 5, then updating the maximum to 6 will update the database but will not impact the deployment. Having an active number of VMs lesser than the maximum value is a valid deployment as the number of active VMs falls within the minimum or maximum range. |
The old maximum value is 5. |
The new maximum value is 6. |
The active number of VMs is 2. |
If the initial number of VMs is a minimum of 2 and maximum of 5, then updating the maximum value to 4 will update the database but will not have any impact on the deployment. Having an active VM count lesser than the maximum value is a valid deployment as the number of active VMs falls within the minimum or maximum range. |
The old maximum value is 5. |
The new maximum value is 4. |
The active number of VMs is 2. |
If the initial number of VMs is a minimum of 2 and maximum of 5, then updating the maximum number of VMs to 4 will update the database and remove one VM from the deployment. The last VM created will be removed bringing the active and maximum count down to 4. |
The old maximum value is 5. |
The new maximum value is 4. |
The active number of VMs is 4. |
If static IPs are used, adding more VMs to a deployment needs update to the scaling pool section.
The deployment datamodel is as follows:
<esc_datamodel xmlns:ns2="urn:ietf:params:xml:ns:netconf:notification:1.0" xmlns:ns1="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:ns3="http://www.cisco.com/esc/esc_notifications" xmlns:ns0="http://www.cisco.com/esc/esc" xmlns="http://www.cisco.com/esc/esc"> <version>1.0.0</version> . . . <vm_group> </interfaces> <interface> <network>1fbf9fc2-3074-4ae6-bb0a-09d526fbada6</network> <nicid>1</nicid> <ip_address>23.23.23.23</ip_address> </interface> </interfaces> <scaling> <min_active>1</min_active> <max_active>1</max_active> <elastic>true</elastic> <static_ip_address_pool> <network>1fbf9fc2-3074-4ae6-bb0a-09d526fbada6</network> <gateway>192.168.0.1</gateway> <!- not used -> <netmask>255.255.255.0</netmask> <!- not used -> <ip_address>23.23.23.23</ip_address> </static_ip_address_pool> </scaling>
Pools are linked to interfaces through network id. The updated datamodel is as follows:
Update payload <esc_datamodel xmlns:ns2="urn:ietf:params:xml:ns:netconf:notification:1.0" xmlns:ns1="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:ns3="http://www.cisco.com/esc/esc_notifications" xmlns:ns0="http://www.cisco.com/esc/esc" xmlns="http://www.cisco.com/esc/esc"> <version>1.0.0</version> . . . <vm_group> <interfaces> <interface> <network>1fbf9fc2-3074-4ae6-bb0a-09d526fbada6</network> <nicid>1</nicid> <ip_address>23.23.23.23</ip_address> </interface> </interfaces> <scaling> <min_active>2</min_active> <max_active>2</max_active> <elastic>true</elastic> <static_ip_address_pool> <network>1fbf9fc2-3074-4ae6-bb0a-09d526fbada6</network> <gateway>192.168.0.1</gateway> <netmask>255.255.255.0</netmask> <ip_address>23.23.23.23</ip_address> <ip_address>23.23.23.24</ip_address> </static_ip_address_pool> </scaling>
The first IP is also included in the update datamodel. If a value is not present in the update list it will be removed from the pool. This results in creating a single VM using the IP address 23.23.23.24.
![]() Note | You cannot remove a specific VM from the deployment. |
You can now update the recovery wait time in an existing deployment. In the example below, the <recovery_wait_time> parameter is set to 60 seconds during the initial deployment.
<vm_group> <name>CSR</name> <recovery_wait_time>60</recovery_wait_time>
The recovery wait time is updated to 100 seconds in the existing deployment.
<vm_group> <name>CSR</name> <recovery_wait_time>100</recovery_wait_time>
Updating the recovery wait time impacts the VMs created in the existing deployment.
After receiving a VM_DOWN event, recovery wait time allows ESC to wait for a certain amount of time before proceeding with the VM recovery workflow. The time allocated for recovery wait time allows the VM to restore network connectivity or heal itself. If a VM_ALIVE is triggered within this time, VM recovery is canceled.You can assign a static IP address to connect a network to the VNF. During deployment, a list of static IP addresses must be specified. A static IP address cannot be added, removed or updated in an existing deployment.
To use a static IP in a subsequent update, the static IP must be in the IP pool in initial deployment. If you are deploying with a network and static IP pool from the same network, you cannot delete the network as part of the subsequent deployment update, as the network has a referential dependency to the static IP pool. This may cause network leakage.
Later than Cisco ESC Release 2.3.1, ESC supports upgrading the VNF software application while updating a deployment. Using the policy data model, new Lifecycle Stages (conditions) are introduced to support the VNF upgrade. The VNF upgrade policies can be different for different VM groups. These policies are applicable for a group of VMs, and can be specified under <vm_group> rather than the entire deployment.
When a service is initially deployed, the data model has the policies configured for future software upgrade. When a deployment update request is received, VM upgrade is initiated as part of deployment update. LCS::DEPLOY_UPDATE::VM_PRE_VOLUME_DETACH is triggered before ESC detaches a volume. A script is supported at this lifecycle stage to unmount the volume before it is detached. ESC detaches and deletes the old volume which contains the old version of the software. After the volume is detached successfully, LCS::DEPLOY_UPDATE::VM_POST_VOLUME_DETACHED is triggered. A script is run at this LCS for further clean ups. When the new volume with a newer software version is attached, LCS::DEPLOY_UPDATE::VM_VOLUME_ATTACHED is triggered. ESC creates and attaches the new volume which contains the new version of the software. A script is run to mount the volume and trigger software installation. Once the volume is attached, LCS::DEPLOY_UPDATE::VM_SOFTWARE_VERSION_UPDATED is triggered after ESC has updated the software version of the VM. A script is run at this stage to complete the configuration for the software upgrade.
Data model for VNF Software Upgrade:
<esc_datamodel xmlns="http://www.cisco.com/esc/esc"> <tenants> <tenant> <name>abc</name> <deployments> <deployment> <name>dep</name> <vm_group> <name>Group1</name> <volumes> <volume nc:operation="delete"> <name>v1.0</name> <volid>0</volid> </volume> <volume> <name>v2.0</name> <volid>1</volid> <sizeunit>GiB</sizeunit> <size>2</size> <bus>virtio</bus> <type>lvm</type> <image>Image-v2</image> </volume> </volumes> <software_version>2.0</software_version> <policies> <policy> <name>SVU1</name> <conditions> <condition> <name>LCS::DEPLOY_UPDATE::PRE_VM_VOLUME_DETACH</name> </condition> </conditions> <actions> <action> <name>LOG</name> <type>pre_defined</type> </action> </actions> </policy> <policy> <name>SVU2</name> <conditions> <condition> <name>LCS::DEPLOY_UPDATE::POST_VM_VOLUME_ATTACHED</name> </condition> </conditions> <actions> <action> <name>LOG</name> <type>pre_defined</type> </action> </actions> </policy> <policy> <name>SVU3</name> <conditions> <condition> <name>LCS::DEPLOY_UPDATE::POST_VM_SOFTWARE_VERSION_UPDATED</name> </condition> </conditions> <actions> <action> <name>LOG</name> <type>pre_defined</type> </action> </actions> </policy> </policies> </vm_group> </deployment> </deployments> </tenant> </tenants> </esc_datamodel>
In this data model, the existing volume v1.0 with volid of 0 is deleted. A new volume v2.0 with volid of 1 is added. The software version, <software_version> value is changed from 1.0 to 2.0. Three policies are added for the VNF software upgrade.
Each lifecycle stage has a condition and an action. Based on the condition, the action is executed. For information on policy driven datamodel, see Policy-Driven Data model. The following three conditions are configured for the VNF software upgrade:
Condition Name |
Scope |
Description |
---|---|---|
LCS::DEPLOY_UPDATE::VM_PRE_VOLUME_DETACH |
Deployment |
Triggered just before the ESC detaches a volume |
LCS::DEPLOY_UPDATE::POST_VM_VOLUME_DETACHED |
Deployment |
Triggered immediately after ESC has detached a volume |
LCS::DEPLOY_UPDATE::POST_VM_VOLUME_ATTACHED |
Deployment |
Triggered immediately after ESC has attached a new volume |
LCS::DEPLOY_UPDATE::POST_VM_SOFTWARE_VERSION_UPDATED |
Deployment |
Triggered immediately after ESC has updated the software version of the VM |
LCS::DEPLOY_UPDATE::PRE_VM_VOLUME_DETACH
This LCS condition is triggered before ESC detaches the volume. A script is run to unmount the volume before it is detached.
<policy> <name>SVU1</name> <conditions> <condition> <name>LCS::DEPLOY_UPDATE::PRE_VM_VOLUME_DETACH</name> </condition> </conditions> <actions> <action> <name>LOG</name> <type>pre_defined</type> </action> </actions> </policy>
LCS::DEPLOY_UPDATE::POST_VM_VOLUME_ATTACHED
This LCS is triggered after the ESC has attached a new volume. A script is run to mount the volume and install new applications on the new volume.
<policy> <name>SVU2</name> <conditions> <condition> <name>LCS::DEPLOY_UPDATE::POST_VM_VOLUME_ATTACHED</name> </condition> </conditions> <actions> <action> <name>LOG</name> <type>pre_defined</type> </action> </actions> </policy>
LCS::DEPLOY_UPDATE::POST_VM_SOFTWARE_VERSION_UPDATED
This LCS is triggered after the ESC has updated the software version of the VM. A Script is run to perform final configurations to complete the software upgrade.
<policy> <name>SVU3</name> <conditions> <condition> <name>LCS::DEPLOY_UPDATE::POST_VM_SOFTWARE_VERSION_UPDATED</name> </condition> </conditions> <actions> <action> <name>LOG</name> <type>pre_defined</type> </action> </actions> </policy>
![]() Note | All three policies above show LOG action as the pre-defined action in the datamodel sample. If a script execution is needed, then a SCRIPT action can be added. See the Script action section below for a sample script. |
Script Action
In the above examples, all the actions are pre-defined logs. You can have custom scripts instead.
<action> <name>unmount_volume</name> <type>SCRIPT</type> <properties> <property> <name>script_filename</name> <value>/opt/cisco/esc/esc-scripts/unmount.sh</value> </property> <property> <name>user_param</name> <value>value</value> </property> </properties> </action>
By default, ESC allows 15 minutes for the script execution to complete. Some scripts may take longer time to complete. An optional property can be specified to extend the timeout value in seconds. In the example below, the timeout of the script is set to 3600 seconds.
<property> <name>wait_max_timeout</name> <value>3600</value> </property>
Notifications are triggered at each stage of the VNF Software upgrade.
Volume Detached
status SUCCESS status_code 200 status_message Detached 1 volume: [Volume=abc-esc-1,volid=1] depname dep tenant abc tenant_id 9132cc90b8324a1c95a6c00975af6206 depid eb4fe3b5-138d-41a3-b6ff-d6fa9035ca6c vm_group Group1 vm_source { vmid cd4eeb61-61db-45a6-9da1-793be08c4de6 hostid 8e96b8830d7bfbb337ce665586210fcca9644cbe238240e207350735 hostname my-ucs-5 software_version 1.0 interfaces { interface { nicid 0 type virtual port_id 26412180-45cf-4f0b-ab45-d05bb7ca7091 network 943fda9e-79f8-400c-b442-3506f102721a subnet e313b95c-ca1f-4c81-8d60-c9e721a85d0b ip_address 192.168.0.56 mac_address fa:16:3e:18:90:1e netmask 255.255.255.0 gateway 192.168.0.1 } } volumes { volume { display_name abc-esc-1__v0_0_0_1 external_id 5d008a12-6fb1-492a-b648-4cf7fc8c68b1 bus virtio type lvm size 2 } } } vm_target { } event { type VM_UPDATED } } }
Volume Removed
notification { eventTime 2016-11-24T00:27:25.457+00:00 escEvent { status SUCCESS status_code 200 status_message Removed 1 volume: [Volume=abc-esc-3,volid=1] depname dep tenant abc tenant_id 9132cc90b8324a1c95a6c00975af6206 depid f938ca24-d0c2-42b3-a757-66b0543fe0a6 vm_group Group1 vm_source { vmid 91379ad1-1cfc-4a10-abaf-068d01ae92b9 hostid 101f55110748903af4844a2517e854f64843b9ac8d880ad68be8af59 hostname my-ucs-4 software_version 1.0 interfaces { interface { nicid 0 type virtual port_id a8201c3e-2c6e-4313-94d0-1b4eee14f08a network 943fda9e-79f8-400c-b442-3506f102721a subnet e313b95c-ca1f-4c81-8d60-c9e721a85d0b ip_address 192.168.0.220 mac_address fa:16:3e:eb:bd:77 netmask 255.255.255.0 gateway 192.168.0.1 } } } vm_target { } event { type VM_UPDATED } } }
Volume Attached
notification { eventTime 2016-11-23T19:54:48.105+00:00 status_message Attached 1 volume: [Volume=abc-esc-2,volid=0] depname dep tenant abc tenant_id 9132cc90b8324a1c95a6c00975af6206 depid eb4fe3b5-138d-41a3-b6ff-d6fa9035ca6c vm_group Group1 vm_source { vmid cd4eeb61-61db-45a6-9da1-793be08c4de6 hostid 8e96b8830d7bfbb337ce665586210fcca9644cbe238240e207350735 hostname my-ucs-5 software_version 1.1 interfaces { interface { nicid 0 type virtual port_id 26412180-45cf-4f0b-ab45-d05bb7ca7091 network 943fda9e-79f8-400c-b442-3506f102721a subnet e313b95c-ca1f-4c81-8d60-c9e721a85d0b ip_address 192.168.0.56 mac_address fa:16:3e:18:90:1e netmask 255.255.255.0 gateway 192.168.0.1 } } volumes { volume { display_name abc-esc-2__v0_0_0_1 external_id bf5c9a01-e9fb-42fa-89ee-73699d6c519c bus virtio type lvm size 2 } } } vm_target { } event { type VM_UPDATED } } }
Software Version Updated
notification { eventTime 2016-11-23T20:06:56.75+00:00 escEvent { status SUCCESS status_code 200 status_message VM Software Updated. VM name: [dep_Group1_0_c9edef63-4d9d-43ea-af1b-16527ed2edae], previous version: [1.0], current version: [1.1] depname dep tenant abc tenant_id 9132cc90b8324a1c95a6c00975af6206 depid eb4fe3b5-138d-41a3-b6ff-d6fa9035ca6c vm_group Group1 vm_source { vmid cd4eeb61-61db-45a6-9da1-793be08c4de6 hostid 8e96b8830d7bfbb337ce665586210fcca9644cbe238240e207350735 hostname my-ucs-5 software_version 1.1 interfaces { interface { nicid 0 type virtual port_id 26412180-45cf-4f0b-ab45-d05bb7ca7091 network 943fda9e-79f8-400c-b442-3506f102721a subnet e313b95c-ca1f-4c81-8d60-c9e721a85d0b ip_address 192.168.0.56 mac_address fa:16:3e:18:90:1e netmask 255.255.255.0 gateway 192.168.0.1 } } volumes { volume { display_name abc-esc-2__v0_0_0_1 external_id bf5c9a01-e9fb-42fa-89ee-73699d6c519c bus virtio type lvm size 2 } } } vm_target { } event { type VM_SOFTWARE_VERSION_UPDATED } } }
Service Updated
notification { eventTime 2016-11-23T20:06:56.768+00:00 escEvent { status SUCCESS status_code 200 status_message Service group update completed successfully depname dep tenant abc tenant_id 9132cc90b8324a1c95a6c00975af6206 depid eb4fe3b5-138d-41a3-b6ff-d6fa9035ca6c vm_source { } vm_target { } event { type SERVICE_UPDATED } } }