+
+UpgradeBackout
+--------------
+
+The UpgradeBackout LCM action does a backout after an UpgradeSoftware is completed (either successfully or unsuccessfully).
+
+This command is executed using an Ansible playbook or Chef cookbook.
+
+Request Structure: The request payload includes an upgrade identifier.
+
++--------------------------+----------------------------------------------------------+
+| **Target URL** | /restconf/operations/appc-provider-lcm:upgrade-backout |
++--------------------------+----------------------------------------------------------+
+| **Action** | UpgradeBackout |
++--------------------------+----------------------------------------------------------+
+| **Action-identifiers** | vnf-id |
++--------------------------+----------------------------------------------------------+
+| **Payload Parameters** | existing-software-version, new-software-version |
++--------------------------+----------------------------------------------------------+
+| **Revision History** | New in Beijing |
++--------------------------+----------------------------------------------------------+
+
+Request Payload Parameters:
+
++-----------------------+-------------------------------------+---------------------+-----------------------------------------------------------------------------------------------+
+| **Parameter** | **Description** | **Required?** | **Example** |
++=======================+=====================================+=====================+===============================================================================================+
+| existing-software- | The existing software version | Yes | "payload": |
+| version | prior to the upgrade | | "{\\"existing-software-version\\": \\"3.1\\", "{\\"new-software-version\\": \\"3.2\\"}” |
++-----------------------+-------------------------------------+---------------------+ |
+| new-software- | The new software | Yes | |
+| version | version after the | | |
+| | upgrade | | |
++-----------------------+-------------------------------------+---------------------+-----------------------------------------------------------------------------------------------+
+
+UpgradeBackout Response
+^^^^^^^^^^^^^^^^^^^^^^^
+
+**Success:** A successful backout returns a success status code 400.
+
+**Failure:** A failed backout returns a failure code 401 and the failure message from the Ansible or Chef server in the response payload block.
+
+UpgradeBackup
+-------------
+
+The UpgradeBackup LCM action does a full backup of the VNF data prior to an upgrade. The backup is done on the Ansible or Chef server in a location that is specified in the playbook or cookbook. If there is an existing backup, it is overwritten by the new backup.
+
+This command is executed using an Ansible playbook or Chef cookbook.
+
+Request Structure: The payload does not have any parameters required.
+
++--------------------------+---------------------------------------------------------+
+| **Target URL** | /restconf/operations/appc-provider-lcm:upgrade-backup |
++--------------------------+---------------------------------------------------------+
+| **Action** | UpgradeBackup |
++--------------------------+---------------------------------------------------------+
+| **Action-identifiers** | vnf-id |
++--------------------------+---------------------------------------------------------+
+| **Payload Parameters** | existing-software-version, new-software-version |
++--------------------------+---------------------------------------------------------+
+| **Revision History** | New in Beijing. |
++--------------------------+---------------------------------------------------------+
+
+Request Payload Parameters:
+
++-----------------------+-------------------------------------+---------------------+-----------------------------------------------------------------------------------------------+
+| **Parameter** | **Description** | **Required?** | **Example** |
++=======================+=====================================+=====================+===============================================================================================+
+| existing-software- | The existing software version | Yes | "payload": |
+| version | prior to the upgrade | | "{\\"existing-software-version\\": \\"3.1\\", "{\\"new-software-version\\": \\"3.2\\"}” |
++-----------------------+-------------------------------------+---------------------+ |
+| new-software- | The new software | Yes | |
+| version | version after the | | |
++-----------------------+-------------------------------------+---------------------+-----------------------------------------------------------------------------------------------+
+
+UpgradeBackup Response
+^^^^^^^^^^^^^^^^^^^^^^
+
+**Success:** A successful backup returns a success status code 400.
+
+**Failure:** A failed backup returns a failure code 401 and the failure message from the Ansible or Chef server in the response payload block.
+
+UpgradePostCheck
+----------------
+
+The UpgradePostCheck LCM action checks that the VNF upgrade has been successful completed and all processes are running properly.
+
+This command is executed using an Ansible playbook or Chef cookbook.
+
+Request Structure:
+
++--------------------------+-------------------------------------------------------------+
+| **Target URL** | /restconf/operations/appc-provider-lcm:upgrade-post-check |
++--------------------------+-------------------------------------------------------------+
+| **Action** | UpgradePostCheck |
++--------------------------+-------------------------------------------------------------+
+| **Action-identifiers** | vnf-id |
++--------------------------+-------------------------------------------------------------+
+| **Payload Parameters** | existing-software-version, new-software-version |
++--------------------------+-------------------------------------------------------------+
+| **Revision History** | New in Beijing |
++--------------------------+-------------------------------------------------------------+
+
+Request Payload Parameters:
+
++-----------------------+-------------------------------------+---------------------+-----------------------------------------------------------------------------------------------+
+| **Parameter** | **Description** | **Required?** | **Example** |
++=======================+=====================================+=====================+===============================================================================================+
+| existing- software- | The existing software version | Yes | "payload": |
+| version | prior to the upgrade | | "{\\"existing-software-version\\": \\"3.1\\", "{\\"new-software-version\\": \\"3.2\\"}” |
++-----------------------+-------------------------------------+---------------------+ |
+| new-software- | The new software | Yes | |
+| version | version after the | | |
++-----------------------+-------------------------------------+---------------------+-----------------------------------------------------------------------------------------------+
+
+UpgradePostCheck Response
+^^^^^^^^^^^^^^^^^^^^^^^^^
+
+**Success:** If the UpgradePostCheck run successfully, it returns a success status code 400. The response payload contains the results of the check (Completed or Failed).
+
+Response Payload Parameters:
+
++---------------+-----------------------------+-------------+------------------------------------------------------------------------------+
+| **Parameter** | **Description** |**Required?**| **Example** |
++===============+=============================+=============+==============================================================================+
+| Upgrade- | Returns the status | Yes | |
+| Status | of the upgradw | | "payload": |
+| | post-check. Indicates | | "{\\"upgrade-status\\": \\"Completed\\"}” |
+| | Completed or Failed | | "payload": "{\\"upgrade-status\\": |
+| | | | \\"Failed\\",\\"message\\": \\"Version 3.2 is not running properly\\" }” |
++---------------+-----------------------------+-------------+ |
+| Message | If Not Available, | | |
+| | message contains | | |
+| | explanation. | | |
++---------------+-----------------------------+-------------+------------------------------------------------------------------------------+
+
+**Failure:** If the UpgradePostCheck could not be run, it returns a failure code 401 and the failure message from the Ansible or Chef server in the response payload block.
+
+UpgradePreCheck
+---------------
+
+The UpgradePreCheck LCM action checks that the VNF has the correct software version needed for a software upgrade. This command can be executed on a running VNF (i.e. processing traffic).
+
+This command is executed using an Ansible playbook or Chef cookbook.
+
+Request Structure:
+
++--------------------------+------------------------------------------------------------+
+| **Target URL** | /restconf/operations/appc-provider-lcm:upgrade-pre-check |
++--------------------------+------------------------------------------------------------+
+| **Action** | UpgradePreCheck |
++--------------------------+------------------------------------------------------------+
+| **Action-identifiers** | vnf-id |
++--------------------------+------------------------------------------------------------+
+| **Payload Parameters** | existing-software-version, new-software-version |
++--------------------------+------------------------------------------------------------+
+| **Revision History** | New in Beijing |
++--------------------------+------------------------------------------------------------+
+
+Request Payload Parameters:
+
++-----------------------+-------------------------------------+---------------------+-----------------------------------------------------------------------------------------------+
+| **Parameter** | **Description** | **Required?** | **Example** |
++=======================+=====================================+=====================+===============================================================================================+
+| existing-software- | The existing software version | Yes | "payload": |
+| version | prior to the upgrade | | "{\\"existing-software-version\\": \\"3.1\\", "{\\"new-software-version\\": \\"3.2\\"}” |
++-----------------------+-------------------------------------+---------------------+ |
+| new-software- | The new software | Yes | |
+| version | version after the | | |
+| | upgrade | | |
++-----------------------+-------------------------------------+---------------------+-----------------------------------------------------------------------------------------------+
+
+UpgradePreCheck Response
+^^^^^^^^^^^^^^^^^^^^^^^^
+
+**Success:** If the UpgradePreCheck runs successfully, it returns a success status code 400. The response payload contains the results of the check (Available or Not Available for upgrade).
+
+Response Payload Parameters:
+
++-----------------+---------------------------+---------------------+----------------------------------------------------------------------------------------------------------------------------------+
+| **Parameter** | **Description** | **Required?** | **Example** |
++=================+===========================+=====================+==================================================================================================================================+
+| upgrade-status | Returns the status | Yes | |
+| | of the upgrade pre- | | "payload": |
+| | check. Indicates | | "{\\"upgrade-status\\": \\"Available\\"}” |
+| | Available or Not | | |
+| | Available | | "payload": |
+| | | | "{\\"upgrade-status\\": \\"Not Available\\",\\"message\\": \\"Current software version 2.9 cannot be upgraded to 3.1\\" }” |
++-----------------+---------------------------+---------------------+ |
+| message | If Not Available, | | |
+| | message contains | | |
+| | explanation. | | |
++-----------------+---------------------------+---------------------+----------------------------------------------------------------------------------------------------------------------------------+
+
+**Failure:** If an UpgradePreCheck fails to run, it returns a failure code 401 and the failure message from the Ansible or Chef server in the response payload block.
+
+UpgradeSoftware
+---------------
+
+The UpgradeSoftware LCM action upgrades the target VNF to a new version. It is expected that the VNF is in a quiesced status (not processing traffic).
+
+This command is executed using an Ansible playbook or Chef cookbook.
+
+Request Structure: The request payload includes the new-software-version.
+
++--------------------------+-----------------------------------------------------------+
+| **Target URL** | /restconf/operations/appc-provider-lcm:upgrade-software |
++--------------------------+-----------------------------------------------------------+
+| **Action** | UpgradeSoftware |
++--------------------------+-----------------------------------------------------------+
+| **Action-identifiers** | vnf-id |
++--------------------------+-----------------------------------------------------------+
+| **Payload Parameters** | existing-software-version, new-software-version |
++--------------------------+-----------------------------------------------------------+
+| **Revision History** | New in Beijing |
++--------------------------+-----------------------------------------------------------+
+
+ Request Payload Parameters:
+
++-----------------------+-------------------------------------+---------------------+-----------------------------------------------------------------------------------------------+
+| **Parameter** | **Description** | **Required?** | **Example** |
++=======================+=====================================+=====================+===============================================================================================+
+| existing- software- | The existing software version | Yes | "payload": |
+| version | prior to the upgrade | | "{\\"existing-software-version\\": \\"3.1\\", "{\\"new-software-version\\": \\"3.2\\"}” |
++-----------------------+-------------------------------------+---------------------+ |
+| new-software | The new software | Yes | |
+| version | version after the | | |
+| | upgrade | | |
++-----------------------+-------------------------------------+---------------------+-----------------------------------------------------------------------------------------------+
+
+UpgradeSoftware Response
+^^^^^^^^^^^^^^^^^^^^^^^^
+
+**Success:** A successful upgrade returns a success status code 400.
+
+If an UpgradeSoftware command is executed and the software has been previously upgraded to this version, it should return a success status.
+
+**Failure:** A failed upgrade returns a failure code 401 and the failure message from the Ansible or Chef server in the response payload block. A failure does not assume that the software upgrade has been rolled back.
+
+Notes regarding the Upgrade commands
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Ansible playbooks / Chef cookbooks:
+
+- All Ansible playbooks/cookbooks for the Upgrade commands will be
+ stored in the same directory on the server. The directory name will
+ be of the format:
+
+ {existing-software-version\_new-software-version}.
+
+ The path to the directory is the same for all upgrades (for example: vnf-type/softwareupgrade).
+
+- The playbooks for upgrades should use a standard naming convention
+ (for example: SoftwareUpgrade\_{existing-software-version\_new-software-version}).
+
+APPC template: The APPC templates for the Upgrade commands can be common across upgrades for the vnf-type if the path and filenames are standardized.
+
+- The template will contain the directory path/playbook name which
+ would be parameterized.
+
+ {vnf-type}/UpgradeSoftware/${existing\_software\_version}\_${new-software-version}/
+ SoftwareUpgrade\_{existing-software-version\_new-software-version}.
+