Supported Lifecycle Stages (LCS)

Supported Lifecycle Stages (LCS)

Table 1. Conditions and their Scope
Condition Name Scope Description

LCS::PRE_DEPLOY

Deployment

Occurs just before deploying VMs of the deployment.

LCS::POST_DEPLOY_ALIVE

Deployment

Occurs immediately after the deployment is active.

LCS::DEPLOY_ERR

Deployment

Occurs immediately after the deployment fails.

LCS::POST_DEPLOY:: VM_RECOVERY_ERR

Deployment

Occurs immediately after the recovery of one VM fails.

(This is specified at deployment level and applies to all VM groups)

LCS::POST_DEPLOY:: VM_RECOVERY

_REDEPLOY_ERR

Deployment

Occurs immediately after the redeployment of one VM fails.

(This is specified at deployment level and applies to all VM groups)

LCS::DEPLOY_UPDATE::VM_

PRE_VOLUME_DETACH

Deployment

Triggered just before the ESC detaches a volume.

(This is specified for a group of individual VMs and specified under <vm_group> rather than the entire deployment.)

LCS::DEPLOY_UPDATE::

VM_VOLUME_ATTACHED

Deployment

Triggered immediately after ESC has attached a new volume

(This is specified for a group of individual VMs and specified under <vm_group> rather than the entire deployment.)

LCS::DEPLOY_UPDATE::

VM_SOFTWARE_VERSION_UPDATED

Deployment

Triggered immediately after ESC has updated the software version of the VM

(This is specified for a group of individual VMs and specified under <vm_group> rather than the entire deployment.)

Fetching Files From Remote Server Using LCS Actions

Prior to ESc Release 4.0, a file locator is added to the LCS action scripts to fetch external configuration files. The file locator contains a reference to the file server, and the relative path to the file to be downloaded. Starting from ESC Release 4.0, the file locator attribute is defined at the deployment level, that is, directly under the deployment container instead of policy actions and day 0 configuration sections.

<esc_datamodel xmlns="http://www.cisco.com/esc/esc">
  <tenants>
    <tenant>
      <name>test-tenant</name>
      <deployments>
        <deployment>
          <name>test-deployment</name>
          <file_locators>
            <file_locator>
              <name>custom_bool_action</name>
              <remote_file>
                <file_server_id>http-my-server</file_server_id>
                <remote_path>share/qatest/custom_bool_action.sh</remote_path>
              </remote_file>
            </file_locator>
            <file_locator>
              <name>custom_bool_metric</name>
              <remote_file>
                <file_server_id>http-my-server</file_server_id>
                <remote_path>/share/qatest/custom_bool_metric.sh</remote_path>
              </remote_file>
            </file_locator>
          </file_locators>
          <!-- truncated for brevity -->
          <vm_group>
            <name>ASA-group</name>
            <!-- truncated for brevity -->
            <kpi_data>
              <kpi>
                <event_name>MY_CUSTOM_BOOL_ACTION</event_name>
                <metric_value>5</metric_value>
                <metric_cond>LT</metric_cond>
                <metric_type>UINT32</metric_type>
                <metric_occurrences_true>1</metric_occurrences_true>
                <metric_occurrences_false>1</metric_occurrences_false>
                <metric_collector>
                  <type>MY_CUSTOM_BOOL_METRIC</type>
                  <nicid>0</nicid>
                  <poll_frequency>3</poll_frequency>
                  <polling_unit>seconds</polling_unit>
                  <continuous_alarm>false</continuous_alarm>
                  <properties>
                    <!-- Add file locator reference here -->
                    <property>
                      <name>file_locator_name</name>
                      <value>custom_bool_action</value>
                    </property>
                  </properties>
                </metric_collector>
              </kpi>
            </kpi_data>
            <rules>
              <admin_rules>
                <rule>
                  <event_name>MY_CUSTOM_BOOL_ACTION</event_name>
                  <action>ALWAYS log</action>
                  <action>TRUE my_custom_bool_action</action>
                  <properties>
                    <!-- Add file locator reference here -->
                    <property>
                      <name>file_locator_name</name>
                      <value>custom_bool_action</value>
                    </property>
                  </properties>
                </rule>
              </admin_rules>
            </rules>
          </vm_group>
        </deployment>
      </deployments>
    </tenant>
  </tenants>
</esc_datamodel>

See Fetching Files From Remote Server for more information.

To encrypt the files see, Encrypting Configuration Data.

Lifecycle Stage (LCS) Policy Conditions Defined at Different Stages

The tables below shows all policy conditions defined in the data model.

Table 2. LifeCycle Stages

Condition Name

Scope

LCS::VM::PRE_VM_DEPLOY

VM

LCS::VM::POST_VM_DEPLOYED

VM

LCS::VM::POST_VM_ALIVE

VM

Lifecycle Stages in Deployment

LCS::PRE_DEPLOY

VM / Deployment

LCS::DEPLOY::

POST_VM_DEPLOYED

VM

LCS::POST_DEPLOY_ALIVE

Deployment

LCS::DEPLOY_ERR

Deployment

Lifecycle Stages in Deployment Update

LCS::DEPLOY_UPDATE::POST_VM_ALIVE

VM

LCS::DEPLOY_UPDATE::

VM

LCS::DEPLOY_UPDATE::

POST_VM_VOLUME_DETACHED

VM

LCS::DEPLOY_UPDATE::

POST_VM_VOLUME_ATTACHED

VM

LCS::DEPLOY_UPDATE::

PRE_VM_SOFTWARE_VERSION_UPDATED

VM

Lifecycle Stages in Recovery

LCS::POST_DEPLOY::

POST_VM_RECOVERY_COMPLETE

VM

LCS::POST_DEPLOY::

VM_RECOVERY_ERR

VM

Lifecycle Stages in Recovery and Redeploy

LCS::POST_DEPLOY::

VM_RECOVERY_REDEPLOY_ERR

VM