Update doc for prepare with stage 84/140784/1
authorFrancescoFioraEst <francesco.fiora@est.tech>
Tue, 8 Apr 2025 10:51:30 +0000 (11:51 +0100)
committerFrancescoFioraEst <francesco.fiora@est.tech>
Wed, 23 Apr 2025 16:05:25 +0000 (17:05 +0100)
Issue-ID: POLICY-5335
Change-Id: I609ae815071b0c3dd5f93f79339f4dcdab5e4bd2
Signed-off-by: FrancescoFioraEst <francesco.fiora@est.tech>
16 files changed:
docs/clamp/acm/acm-participant-guide.rst
docs/clamp/acm/acm-states.rst
docs/clamp/acm/acm-user-guide.rst
docs/clamp/acm/allowed-operations.rst
docs/clamp/acm/api-protocol/system-level-dialogues.rst
docs/clamp/acm/clamp-csit.rst
docs/clamp/acm/design-impl/clamp-runtime-acm.rst
docs/clamp/acm/files/ACM-Message-Table.csv
docs/clamp/acm/images/acm-states/AcInstanceStatesMigrationPrecheck.png [new file with mode: 0644]
docs/clamp/acm/images/acm-states/AcInstanceStatesPrepare.png [new file with mode: 0644]
docs/clamp/acm/images/acm-states/AcInstanceStatesReview.png [new file with mode: 0644]
docs/clamp/acm/images/acm-states/AcInstanceSubStates.png [deleted file]
docs/clamp/acm/plantuml/states/AcInstanceStatesMigrationPrecheck.puml [new file with mode: 0644]
docs/clamp/acm/plantuml/states/AcInstanceStatesPrepare.puml [new file with mode: 0644]
docs/clamp/acm/plantuml/states/AcInstanceStatesReview.puml [new file with mode: 0644]
docs/clamp/acm/plantuml/states/AcInstanceSubStates.puml [deleted file]

index 05532a0..55c7db1 100644 (file)
@@ -140,7 +140,7 @@ AutomationCompositionElementListener:
   9. void migrate(CompositionElementDto compositionElement, CompositionElementDto compositionElementTarget, InstanceElementDto instanceElement, InstanceElementDto instanceElementMigrate, int stage) throws PfModelException;
   10. void migratePrecheck(CompositionElementDto compositionElement, CompositionElementDto compositionElementTarget, InstanceElementDto instanceElement, InstanceElementDto instanceElementMigrate) throws PfModelException;
   11. void review(CompositionElementDto compositionElement, InstanceElementDto instanceElement) throws PfModelException;
-  12. void prepare(CompositionElementDto compositionElement, InstanceElementDto instanceElement) throws PfModelException;
+  12. void prepare(CompositionElementDto compositionElement, InstanceElementDto instanceElement, int stage) throws PfModelException;
 
 These method from the interface are implemented independently as per the user requirement. These methods after handling the
 appropriate requests should also invoke the intermediary's publisher apis to notify the ACM-runtime with the acknowledgement events.
@@ -154,7 +154,7 @@ ParticipantParameters:
   ParticipantIntermediaryParameters getIntermediaryParameters()
 
 
-Abstract class AcElementListenerV3
+Abstract class AcElementListenerV4
 ----------------------------------
 This abstract class is introduced to help to maintain the java backward compatibility with AutomationCompositionElementListener from new releases.
 Any new functionality in the future will be wrapped by this class.
@@ -163,6 +163,205 @@ Any new functionality in the future will be wrapped by this class.
 Default implementation are supported for the methods: lock, unlock, update, migrate, delete, prime, deprime, migratePrecheck, review and prepare.
 
 
+Methods: deploy, undeploy, lock, unlock, delete, review
+  compositionElement:
+    ======================  =======================================
+     **field**                       **description**
+    ======================  =======================================
+     compositionId           composition definition Id
+     elementDefinitionId     composition definition element Id
+     inProperties            composition definition in-properties
+     outProperties           composition definition out-properties
+    ======================  =======================================
+  instanceElement:
+    ==============================  ===========================
+     **field**                       **description**
+    ==============================  ===========================
+     instanceId                      instance id
+     elementId                       instance element id
+     toscaServiceTemplateFragment    policies and policy types
+     inProperties                    instance in-properties
+      outProperties                  instance out-properties
+    ==============================  ===========================
+
+Method: update
+  compositionElement:
+    ======================  =======================================
+     **field**                       **description**
+    ======================  =======================================
+     compositionId           composition definition Id
+     elementDefinitionId     composition definition element Id
+     inProperties            composition definition in-properties
+     outProperties           composition definition out-properties
+    ======================  =======================================
+  instanceElement:
+    ==============================  ================================================
+     **field**                       **description**
+    ==============================  ================================================
+     instanceId                      instance id
+     elementId                       instance element id
+     toscaServiceTemplateFragment
+     inProperties                    instance in-properties **(before the update)**
+      outProperties                  instance out-properties
+    ==============================  ================================================
+  instanceElementUpdated:
+    ==============================  ======================================
+     **field**                       **description**
+    ==============================  ======================================
+     instanceId                      instance id
+     elementId                       instance element id
+     toscaServiceTemplateFragment
+     inProperties                    instance in-properties **(updated)**
+     outProperties                   instance out-properties
+    ==============================  ======================================
+
+Methods: prime, deprime
+  composition:
+    ======================  ===================================================================
+     **field**                       **description**
+    ======================  ===================================================================
+     compositionId           composition definition Id
+     inProperties            composition definition in-properties for each definition element
+     outProperties           composition definition out-properties for each definition element
+    ======================  ===================================================================
+
+Method: migratePrecheck
+  compositionElement:
+    ======================  =====================================================
+     **field**                       **description**
+    ======================  =====================================================
+     compositionId           composition definition Id
+     elementDefinitionId     composition definition element Id
+     inProperties            composition definition in-properties
+     outProperties           composition definition out-properties
+     state                   element state: PRESENT, NOT_PRESENT, REMOVED, NEW
+    ======================  =====================================================
+  compositionElementTarget:
+    ======================  =====================================================
+     **field**                       **description**
+    ======================  =====================================================
+     compositionId           composition definition target Id
+     elementDefinitionId     composition definition target element Id
+     inProperties            composition definition target in-properties
+     outProperties           composition definition target out-properties
+     state                   element state: PRESENT, NOT_PRESENT, REMOVED, NEW
+    ======================  =====================================================
+  instanceElement:
+    ==============================  ===================================================
+     **field**                       **description**
+    ==============================  ===================================================
+     instanceId                      instance id
+     elementId                       instance element id
+     toscaServiceTemplateFragment
+     inProperties                    instance in-properties **(before the migration)**
+     outProperties                   instance out-properties
+     state                           element state: PRESENT, NOT_PRESENT, REMOVED, NEW
+    ==============================  ===================================================
+  instanceElementMigrate:
+    ==============================  ====================================================
+     **field**                       **description**
+    ==============================  ====================================================
+     instanceId                      instance id
+     elementId                       instance element id
+     toscaServiceTemplateFragment
+     inProperties                    instance in-properties **(updated)**
+     outProperties                   instance out-properties
+     state                           element state: PRESENT, NOT_PRESENT, REMOVED, NEW
+    ==============================  ====================================================
+
+Method: migrate
+  compositionElement:
+    ======================  =====================================================
+     **field**                       **description**
+    ======================  =====================================================
+     compositionId           composition definition Id
+     elementDefinitionId     composition definition element Id
+     inProperties            composition definition in-properties
+     outProperties           composition definition out-properties
+     state                   element state: PRESENT, NOT_PRESENT, REMOVED, NEW
+    ======================  =====================================================
+  compositionElementTarget:
+    ======================  =====================================================
+     **field**                       **description**
+    ======================  =====================================================
+     compositionId           composition definition target Id
+     elementDefinitionId     composition definition target element Id
+     inProperties            composition definition target in-properties
+     outProperties           composition definition target out-properties
+     state                   element state: PRESENT, NOT_PRESENT, REMOVED, NEW
+    ======================  =====================================================
+  instanceElement:
+    ==============================  ===================================================
+     **field**                       **description**
+    ==============================  ===================================================
+     instanceId                      instance id
+     elementId                       instance element id
+     toscaServiceTemplateFragment
+     inProperties                    instance in-properties **(before the migration)**
+     outProperties                   instance out-properties
+     state                           element state: PRESENT, NOT_PRESENT, REMOVED, NEW
+    ==============================  ===================================================
+  instanceElementMigrate:
+    ==============================  ====================================================
+     **field**                       **description**
+    ==============================  ====================================================
+     instanceId                      instance id
+     elementId                       instance element id
+     toscaServiceTemplateFragment
+     inProperties                    instance in-properties **(updated)**
+     outProperties                   instance out-properties
+     state                           element state: PRESENT, NOT_PRESENT, REMOVED, NEW
+    ==============================  ====================================================
+  stage:
+    the stage of the migration that the participant has to execute
+
+Method: prepare
+  compositionElement:
+    ======================  =======================================
+     **field**                       **description**
+    ======================  =======================================
+     compositionId           composition definition Id
+     elementDefinitionId     composition definition element Id
+     inProperties            composition definition in-properties
+     outProperties           composition definition out-properties
+    ======================  =======================================
+  instanceElement:
+    ==============================  ===========================
+     **field**                       **description**
+    ==============================  ===========================
+     instanceId                      instance id
+     elementId                       instance element id
+     toscaServiceTemplateFragment    policies and policy types
+     inProperties                    instance in-properties
+      outProperties                  instance out-properties
+    ==============================  ===========================
+  stage:
+    the stage of the prepare that the participant has to execute
+
+
+Abstract class AcElementListenerV3
+----------------------------------
+This abstract class is introduced to help to maintain temporarily the java backward compatibility with AutomationCompositionElementListener implemented in 8.0.1 version.
+So developers can decide to align to new functionality later. Any new functionality in the future will be wrapped by this class.
+
+The Abstract class AcElementListenerV3 supports the follow methods.
+
+.. code-block:: java
+
+  1. void deploy(CompositionElementDto compositionElement, InstanceElementDto instanceElement) throws PfModelException;
+  2. void undeploy(CompositionElementDto compositionElement, InstanceElementDto instanceElement) throws PfModelException;
+  3. void lock(CompositionElementDto compositionElement, InstanceElementDto instanceElement) throws PfModelException;
+  4. void unlock(CompositionElementDto compositionElement, InstanceElementDto instanceElement) throws PfModelException;
+  5. void delete(CompositionElementDto compositionElement, InstanceElementDto instanceElement) throws PfModelException;
+  6. void update(CompositionElementDto compositionElement, InstanceElementDto instanceElement, InstanceElementDto instanceElementUpdated) throws PfModelException;
+  7. void prime(CompositionDto composition) throws PfModelException;
+  8. void deprime(CompositionDto composition) throws PfModelException;
+  9. void migrate(CompositionElementDto compositionElement, CompositionElementDto compositionElementTarget, InstanceElementDto instanceElement, InstanceElementDto instanceElementMigrate, int stage) throws PfModelException;
+  10. void migratePrecheck(CompositionElementDto compositionElement, CompositionElementDto compositionElementTarget, InstanceElementDto instanceElement, InstanceElementDto instanceElementMigrate) throws PfModelException;
+  11. void review(CompositionElementDto compositionElement, InstanceElementDto instanceElement) throws PfModelException;
+  12. void prepare(CompositionElementDto compositionElement, InstanceElementDto instanceElement) throws PfModelException;
+
+
 Methods: deploy, undeploy, lock, unlock, delete, review and prepare
   compositionElement:
     ======================  =======================================
@@ -639,8 +838,8 @@ In/Out instance Properties
 
   The 'Out Properties' will be **not cleaned** by intermediary:
 
-  * during DEPLOIYNG (Out Properties will be take from last changes matching by elementId)
-  * during UNDEPLOING
+  * during DEPLOYING (Out Properties will be take from last changes matching by elementId)
+  * during UNDEPLOYING
   * during LOCKING/UNLOCKING
   * during UPDATING/MIGRATING/PREPARE/REVIEW/MIGRATION_PRECHECKING
 
index 7a3222a..12849e7 100644 (file)
@@ -82,9 +82,22 @@ Delete
 
 Automation Composition Instance Sub State
 =========================================
-The sub states that an Automation Composition Instance can have are shown in the diagram below.
+The sub states that an Automation Composition Instance can have are shown in the diagrams below.
 
-.. image:: images/acm-states/AcInstanceSubStates.png
+Prepare
+-------
+
+.. image:: images/acm-states/AcInstanceStatesPrepare.png
+
+Review
+------
+
+.. image:: images/acm-states/AcInstanceStatesReview.png
+
+Migration-Precheck
+------------------
+
+.. image:: images/acm-states/AcInstanceStatesMigrationPrecheck.png
 
 How State are saved in DB
 =========================
index 8cc4c40..41f521b 100644 (file)
@@ -435,7 +435,6 @@ Functionality covered:
 #. Update useState, operationalState and outProperties and send to ACM-runtime by Rest-Api.
 #. Read all AC instance elements information by Rest-Api.
 #. Log of all information for each operation.
-#. Set the 'AcElementListenerV' version by properties file.
 
 Mock a participant using docker-compose
 ---------------------------------------
@@ -545,22 +544,3 @@ All information for each operation are logged, so the developer can monitoring w
 26-02-2024 09:55:38.547 [pool-4-thread-4] DEBUG  o.o.p.c.a.p.s.m.h.AutomationCompositionElementHandler.deploy **- deploy call**
 **compositionElement: CompositionElementDto[** compositionId=6502ba5e-1939-42b0-8bd2-bf89f0d51be6, elementDefinitionId=onap.policy.clamp.ac.element.Http_StarterAutomationCompositionElement 1.2.3, inProperties={ ... }, outProperties={} **], instanceElement: InstanceElementDto[** instanceId=022b3dee-a878-4b32-8544-de86e67e7335, elementId=2d614898-4945-41c7-9127-947b401aa753, toscaServiceTemplateFragment=ToscaServiceTemplate( ... ), inProperties={ ... }, outProperties={} **]**
 
-Set specific AcElementListenerV version
----------------------------------------
-Set 'element.handler' property in properties file in order to test a specific AcElementListenerV version.
-Default value of 'element.handler' is the most recent version.
-
-==================== ====================
-** Property Value ** ** Abstract Class **
-==================== ====================
-AcElementHandlerV1   AcElementListenerV1
-AcElementHandlerV2   AcElementListenerV2
-AcElementHandlerV3   AcElementListenerV3
-==================== ====================
-
-Example:
-
-.. code-block:: yaml
-
-  element:
-    handler: AcElementHandlerV3
index 12fca00..068e790 100755 (executable)
@@ -55,90 +55,116 @@ CRUD Automation Composition Instance
 ------------------------------------\r
 AC Definition is PRIMED with NO_ERROR.\r
 \r
-+------------+-----------------+---------------+----------------+--------------------------------------------------------------------------------------+\r
-| **Action** | **deployState** | **lockState** | **stChResult** | **Description**                                                                      |\r
-+------------+-----------------+---------------+----------------+--------------------------------------------------------------------------------------+\r
-| Create     |                 |               |                | Create a new AC instance                                                             |\r
-+------------+-----------------+---------------+----------------+--------------------------------------------------------------------------------------+\r
-| Update     | UNDEPLOYED      |               |                | Update the AC Instance                                                               |\r
-+            +-----------------+---------------+----------------+--------------------------------------------------------------------------------------+\r
-|            | DEPLOYED        |  LOCKED       |                | Update the AC Instance and send update to participants                               |\r
-+            +-----------------+---------------+----------------+--------------------------------------------------------------------------------------+\r
-|            | UPDATING        |  LOCKED       |  FAILED        | Start Updating transition and send update to participants after UPDATING is failed   |\r
-+            +-----------------+---------------+----------------+--------------------------------------------------------------------------------------+\r
-|            | UPDATING        |  LOCKED       |  TIMEOUT       | Start Updating transition and send update to participants after UPDATING got timeout |\r
-+------------+-----------------+---------------+----------------+--------------------------------------------------------------------------------------+\r
-| Migrate    | DEPLOYED               |  LOCKED       |                | Start Migrating transition and send migrate to participants                          |\r
-+------------+-----------------+---------------+----------------+--------------------------------------------------------------------------------------+\r
-|            | UNDEPLOYED      |               |                | Start Deleting transition and send delete to participants                            |\r
-+            +-----------------+---------------+----------------+--------------------------------------------------------------------------------------+\r
-| Delete     | DELETING        |  NONE         |  FAILED        | Start Deleting transition and send delete to participants after DELETING is failed   |\r
-+            +-----------------+---------------+----------------+--------------------------------------------------------------------------------------+\r
-|            | DELETING        |  NONE         |  TIMEOUT       | Start Deleting transition and send delete to participants after DELETING got timeout |\r
-+------------+-----------------+---------------+----------------+--------------------------------------------------------------------------------------+\r
++------------+-----------------+---------------+-------------+----------------+-----------------------------------------------------------------------------+\r
+| **Action** | **deployState** | **lockState** | **subSate** | **stChResult** | **Description**                                                             |\r
++------------+-----------------+---------------+-------------+----------------+-----------------------------------------------------------------------------+\r
+| Create     |                 |               |             |                | Create a new AC instance                                                    |\r
++------------+-----------------+---------------+-------------+----------------+-----------------------------------------------------------------------------+\r
+| Update     | UNDEPLOYED      |               |             |                | Update the AC Instance                                                      |\r
++            +-----------------+---------------+-------------+----------------+-----------------------------------------------------------------------------+\r
+|            | DEPLOYED        |  LOCKED       |             |                | Start Updating and send update to participants                              |\r
++            +-----------------+---------------+-------------+----------------+-----------------------------------------------------------------------------+\r
+|            | UPDATING        |  LOCKED       |             |  FAILED        | Start Updating and send update to participants after UPDATING is failed     |\r
++            +-----------------+---------------+-------------+----------------+-----------------------------------------------------------------------------+\r
+|            | UPDATING        |  LOCKED       |             |  TIMEOUT       | Start Updating and send update to participants after UPDATING got timeout   |\r
++------------+-----------------+---------------+-------------+----------------+-----------------------------------------------------------------------------+\r
+| Migrate    | DEPLOYED               |  LOCKED       |             |                | Start Migrating and send migrate to participants                            |\r
++------------+-----------------+---------------+-------------+----------------+-----------------------------------------------------------------------------+\r
+|            | UNDEPLOYED      |               |             |                | Start Deleting and send delete to participants                              |\r
++            +-----------------+---------------+-------------+----------------+-----------------------------------------------------------------------------+\r
+| Delete     | UNDEPLOYED      |               |  PREPARING  |  FAILED        | Start Deleting and send delete to participants after PREPARING is failed    |\r
++            +-----------------+---------------+-------------+----------------+-----------------------------------------------------------------------------+\r
+|            | UNDEPLOYED      |               |  PREPARING  |  TIMEOUT       | Start Deleting and send delete to participants after PREPARING got timeout  |\r
++            +-----------------+---------------+-------------+----------------+-----------------------------------------------------------------------------+\r
+| Delete     | DELETING        |               |             |  FAILED        | Start Deleting and send delete to participants after DELETING is failed     |\r
++            +-----------------+---------------+-------------+----------------+-----------------------------------------------------------------------------+\r
+|            | DELETING        |               |             |  TIMEOUT       | Start Deleting and send delete to participants after DELETING got timeout   |\r
++------------+-----------------+---------------+-------------+----------------+-----------------------------------------------------------------------------+\r
 \r
 Change status of Automation Composition Instance\r
 ------------------------------------------------\r
 \r
-+------------+-----------------+---------------+----------------+---------------------------------------------------------------------------------------------+\r
-| **Action** | **deployState** | **lockState** | **stChResult** | **Description**                                                                             |\r
-+------------+-----------------+---------------+----------------+---------------------------------------------------------------------------------------------+\r
-|            | UNDEPLOYED      |               |                | Start Deploying transition and send deploy to participants                                  |\r
-+            +-----------------+---------------+----------------+---------------------------------------------------------------------------------------------+\r
-|            | DEPLOYING       |  NONE         |  FAILED        | Start Deploying transition and send deploy to participants after DEPLOYING is failed        |\r
-+            +-----------------+---------------+----------------+---------------------------------------------------------------------------------------------+\r
-|  Deploy    | DEPLOYING       |  NONE         |  TIMEOUT       | Start Deploying transition and send deploy to participants after DEPLOYING got timeout      |\r
-+            +-----------------+---------------+----------------+---------------------------------------------------------------------------------------------+\r
-|            | UNDEPLOYING     |  NONE         |  FAILED        | Start Deploying transition and send deploy to participants after UNDEPLOYING is failed      |\r
-+            +-----------------+---------------+----------------+---------------------------------------------------------------------------------------------+\r
-|            | UNDEPLOYING     |  NONE         |  TIMEOUT       | Start Deploying transition and send deploy to participants after UNDEPLOYING got timeout    |\r
-+------------+-----------------+---------------+----------------+---------------------------------------------------------------------------------------------+\r
-|            | DEPLOYED        |  LOCKED       |                | Start Undeploying transition and send undeploy to participants                              |\r
-+            +-----------------+---------------+----------------+---------------------------------------------------------------------------------------------+\r
-|            | DEPLOYING       |  NONE         |  FAILED        | Start Undeploying transition and send undeploy to participants after DEPLOYING is failed    |\r
-+            +-----------------+---------------+----------------+---------------------------------------------------------------------------------------------+\r
-|            | UNDEPLOYING     |  NONE         |  FAILED        | Start Undeploying transition and send undeploy to participants after UNDEPLOYING is failed  |\r
-+  Undeploy  +-----------------+---------------+----------------+---------------------------------------------------------------------------------------------+\r
-|            | UNDEPLOYING     |  NONE         |  TIMEOUT       | Start Undeploying transition and send undeploy to participants after UNDEPLOYING got timeout|\r
-+            +-----------------+---------------+----------------+---------------------------------------------------------------------------------------------+\r
-|            | UPDATING        |  LOCKED       |  FAILED        | Start Undeploying transition and send update to participants after UPDATING is failed       |\r
-+            +-----------------+---------------+----------------+---------------------------------------------------------------------------------------------+\r
-|            | UPDATING        |  LOCKED       |  TIMEOUT       | Start Undeploying transition and send update to participants after UPDATING got timeout     |\r
-+            +-----------------+---------------+----------------+---------------------------------------------------------------------------------------------+\r
-|            | MIGRATING       |  LOCKED       |  FAILED        | Start Undeploying transition and send update to participants after MIGRATING is failed      |\r
-+            +-----------------+---------------+----------------+---------------------------------------------------------------------------------------------+\r
-|            | MIGRATING       |  LOCKED       |  TIMEOUT       | Start Undeploying transition and send update to participants after MIGRATING got timeout    |\r
-+------------+-----------------+---------------+----------------+---------------------------------------------------------------------------------------------+\r
-|            | DEPLOYED        |  UNLOCKED     |                | Start Locking transition and send lock to participants                                      |\r
-+            +-----------------+---------------+----------------+---------------------------------------------------------------------------------------------+\r
-|            | DEPLOYED        |  UNLOCKING    |  FAILED        | Start Locking transition and send lock to participants after UNLOCKING is failed            |\r
-+            +-----------------+---------------+----------------+---------------------------------------------------------------------------------------------+\r
-|   Lock     | DEPLOYED        |  UNLOCKING    |  TIMEOUT       | Start Locking transition and send lock to participants after UNLOCKING got timeout          |\r
-+            +-----------------+---------------+----------------+---------------------------------------------------------------------------------------------+\r
-|            | DEPLOYED        |  LOCKING      |  FAILED        | Start Locking transition and send lock to participants after LOCKING is failed              |\r
-+            +-----------------+---------------+----------------+---------------------------------------------------------------------------------------------+\r
-|            | DEPLOYED        |  LOCKING      |  TIMEOUT       | Start Locking transition and send lock to participants after LOCKING got timeout            |\r
-+------------+-----------------+---------------+----------------+---------------------------------------------------------------------------------------------+\r
-|            | DEPLOYED        | LOCKED        |                | Start Unlocking transition and send unlock to participants                                  |\r
-+            +-----------------+---------------+----------------+---------------------------------------------------------------------------------------------+\r
-|            | DEPLOYED        | UNLOCKING     |  FAILED        | Start Unlocking transition and send unlock to participants after UNLOCKING is failed        |\r
-+            +-----------------+---------------+----------------+---------------------------------------------------------------------------------------------+\r
-|  Unlock    | DEPLOYED        | UNLOCKING     |  TIMEOUT       | Start Unlocking transition and send unlock to participants after UNLOCKING got timeout      |\r
-+            +-----------------+---------------+----------------+---------------------------------------------------------------------------------------------+\r
-|            | DEPLOYED        | LOCKING       |  FAILED        | Start Unlocking transition and send unlock to participants after LOCKING is failed          |\r
-+            +-----------------+---------------+----------------+---------------------------------------------------------------------------------------------+\r
-|            | DEPLOYED        | LOCKING       |  TIMEOUT       | Start Unlocking transition and send unlock to participants after LOCKING got timeout        |\r
-+------------+-----------------+---------------+----------------+---------------------------------------------------------------------------------------------+\r
++------------+-----------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+\r
+| **Action** | **deployState** | **lockState** | **subSate**           | **stChResult** | **Description**                                                                             |\r
++------------+-----------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+\r
+|            | UNDEPLOYED      |               |                       |                | Start Deploying and send deploy to participants                                             |\r
++            +-----------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+\r
+|            | DEPLOYING       |  NONE         |                       |  FAILED        | Start Deploying and send deploy to participants after DEPLOYING is failed                   |\r
++            +-----------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+\r
+|  Deploy    | DEPLOYING       |  NONE         |                       |  TIMEOUT       | Start Deploying and send deploy to participants after DEPLOYING got timeout                 |\r
++            +-----------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+\r
+|            | UNDEPLOYING     |  NONE         |                       |  FAILED        | Start Deploying and send deploy to participants after UNDEPLOYING is failed                 |\r
++            +-----------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+\r
+|            | UNDEPLOYING     |  NONE         |                       |  TIMEOUT       | Start Deploying and send deploy to participants after UNDEPLOYING got timeout               |\r
++------------+-----------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+\r
+|            | DEPLOYED        |  LOCKED       |                       |                | Start Undeploying and send undeploy to participants                                         |\r
++            +-----------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+\r
+|            | DEPLOYING       |  NONE         |                       |  FAILED        | Start Undeploying and send undeploy to participants after DEPLOYING is failed               |\r
++            +-----------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+\r
+|            | DEPLOYING       |  NONE         |                       |  TIMEOUT       | Start Undeploying and send undeploy to participants after DEPLOYING got timeout             |\r
++            +-----------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+\r
+|            | DEPLOYED        |  LOCKED       | REVIEWING             |  FAILED        | Start Undeploying and send undeploy to participants after REVIEWING is failed               |\r
++            +-----------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+\r
+|            | DEPLOYED        |  LOCKED       | REVIEWING             |  TIMEOUT       | Start Undeploying and send undeploy to participants after REVIEWING got timeout             |\r
++            +-----------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+\r
+|            | DEPLOYED        |  LOCKED       | MIGRATION_PRECHECKING |  FAILED        | Start Undeploying and send undeploy to participants after MIGRATION_PRECHECKING is failed   |\r
++  Undeploy  +-----------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+\r
+|            | DEPLOYED        |  LOCKED       | MIGRATION_PRECHECKING |  TIMEOUT       | Start Undeploying and send undeploy to participants after MIGRATION_PRECHECKING got timeout |\r
++            +-----------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+\r
+|            | UNDEPLOYING     |  NONE         |                       |  FAILED        | Start Undeploying and send undeploy to participants after UNDEPLOYING is failed             |\r
++            +-----------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+\r
+|            | UNDEPLOYING     |  NONE         |                       |  TIMEOUT       | Start Undeploying and send undeploy to participants after UNDEPLOYING got timeout           |\r
++            +-----------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+\r
+|            | UPDATING        |  LOCKED       |                       |  FAILED        | Start Undeploying and send update to participants after UPDATING is failed                  |\r
++            +-----------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+\r
+|            | UPDATING        |  LOCKED       |                       |  TIMEOUT       | Start Undeploying and send update to participants after UPDATING got timeout                |\r
++            +-----------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+\r
+|            | MIGRATING       |  LOCKED       |                       |  FAILED        | Start Undeploying and send update to participants after MIGRATING is failed                 |\r
++            +-----------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+\r
+|            | MIGRATING       |  LOCKED       |                       |  TIMEOUT       | Start Undeploying and send update to participants after MIGRATING got timeout               |\r
++------------+-----------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+\r
+|            | DEPLOYED        |  UNLOCKED     |                       |                | Start Locking and send lock to participants                                                 |\r
++            +-----------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+\r
+|            | DEPLOYED        |  UNLOCKING    |                       |  FAILED        | Start Locking and send lock to participants after UNLOCKING is failed                       |\r
++            +-----------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+\r
+|   Lock     | DEPLOYED        |  UNLOCKING    |                       |  TIMEOUT       | Start Locking and send lock to participants after UNLOCKING got timeout                     |\r
++            +-----------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+\r
+|            | DEPLOYED        |  LOCKING      |                       |  FAILED        | Start Locking and send lock to participants after LOCKING is failed                         |\r
++            +-----------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+\r
+|            | DEPLOYED        |  LOCKING      |                       |  TIMEOUT       | Start Locking and send lock to participants after LOCKING got timeout                       |\r
++------------+-----------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+\r
+|            | DEPLOYED        | LOCKED        |                       |                | Start Unlocking and send unlock to participants                                             |\r
++            +-----------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+\r
+|            | DEPLOYED        | UNLOCKING     |                       |  FAILED        | Start Unlocking and send unlock to participants after UNLOCKING is failed                   |\r
++            +-----------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+\r
+|  Unlock    | DEPLOYED        | UNLOCKING     |                       |  TIMEOUT       | Start Unlocking and send unlock to participants after UNLOCKING got timeout                 |\r
++            +-----------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+\r
+|            | DEPLOYED        | LOCKING       |                       |  FAILED        | Start Unlocking and send unlock to participants after LOCKING is failed                     |\r
++            +-----------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+\r
+|            | DEPLOYED        | LOCKING       |                       |  TIMEOUT       | Start Unlocking and send unlock to participants after LOCKING got timeout                   |\r
++------------+-----------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+\r
 \r
 Sub status of Automation Composition Instance\r
 ---------------------------------------------\r
 \r
-+---------------------+-----------------+---------------+-----------------------------------------------------------------------------------------------------+\r
-| **Action**          | **deployState** | **lockState** | **Description**                                                                                     |\r
-+---------------------+-----------------+---------------+-----------------------------------------------------------------------------------------------------+\r
-|  Prepare            | UNDEPLOYED      |               | Start Preparing transition and send prepare to participants                                         |\r
-+---------------------+-----------------+---------------+-----------------------------------------------------------------------------------------------------+\r
-|  Review             | DEPLOYED        | LOCKED        | Start Reviewing transition and send review to participants                                          |\r
-+---------------------+-----------------+---------------+-----------------------------------------------------------------------------------------------------+\r
-|  Migration-Precheck | DEPLOYED        | LOCKED        | Start Migration-Prechecking transition and send Migration-Precheck to participants                  |\r
-+---------------------+-----------------+---------------+-----------------------------------------------------------------------------------------------------+\r
++---------------------+-----------------+---------------+-----------------------+----------------+-----------------------------------------------------------------------------------------------------------------+\r
+| **Action**          | **deployState** | **lockState** | **subSate**           | **stChResult** | **Description**                                                                                                 |\r
++---------------------+-----------------+---------------+-----------------------+----------------+-----------------------------------------------------------------------------------------------------------------+\r
+|                     | UNDEPLOYED      |               |                       |                | Start Preparing and send prepare to participants                                                                |\r
++                     +-----------------+---------------+-----------------------+----------------+-----------------------------------------------------------------------------------------------------------------+\r
+|  Prepare            | UNDEPLOYED      |               | PREPARING             |  FAILED        | Start Preparing and send prepare to participants after PREPARING is failed                                      |\r
++                     +-----------------+---------------+-----------------------+----------------+-----------------------------------------------------------------------------------------------------------------+\r
+|                     | UNDEPLOYED      |               | PREPARING             |  TIMEOUT       | Start Preparing and send prepare to participants after PREPARING got timeout                                    |\r
++---------------------+-----------------+---------------+-----------------------+----------------+-----------------------------------------------------------------------------------------------------------------+\r
+|                     | DEPLOYED        | LOCKED        |                       |                | Start Reviewing and send review to participants                                                                 |\r
++                     +-----------------+---------------+-----------------------+----------------+-----------------------------------------------------------------------------------------------------------------+\r
+|  Review             | DEPLOYED        | LOCKED        | REVIEWING             |  FAILED        | Start Reviewing and send review to participants after REVIEWING is failed                                       |\r
++                     +-----------------+---------------+-----------------------+----------------+-----------------------------------------------------------------------------------------------------------------+\r
+|                     | DEPLOYED        | LOCKED        | REVIEWING             |  TIMEOUT       | Start Reviewing and send review to participants after REVIEWING got timeout                                     |\r
++---------------------+-----------------+---------------+-----------------------+----------------+-----------------------------------------------------------------------------------------------------------------+\r
+|                     | DEPLOYED        | LOCKED        |                       |                | Start Migration-Prechecking and send Migration-Precheck to participants                                         |\r
++                     +-----------------+---------------+-----------------------+----------------+-----------------------------------------------------------------------------------------------------------------+\r
+|  Migration-Precheck | DEPLOYED        | LOCKED        | MIGRATION_PRECHECKING |  FAILED        | Start Migration-Prechecking and send Migration-Precheck to participants after MIGRATION_PRECHECKING is failed   |\r
++                     +-----------------+---------------+-----------------------+----------------+-----------------------------------------------------------------------------------------------------------------+\r
+|                     | DEPLOYED        | LOCKED        | MIGRATION_PRECHECKING |  TIMEOUT       | Start Migration-Prechecking and send Migration-Precheck to participants after MIGRATION_PRECHECKING got timeout |\r
++---------------------+-----------------+---------------+-----------------------+----------------+-----------------------------------------------------------------------------------------------------------------+\r
index ec03353..0f0c0e7 100644 (file)
@@ -288,7 +288,7 @@ If the operation succeeds, the participant is required to update the result valu
 .. image:: ../images/system-dialogues/SuccessAcmResult.png
 
 The result value should be updated as 'FAILED' by the participants when any failures occurred.
-Also in case of failures, the overall state of the composition/instance remains in any of the transitioning states (DEPLOYING, UNDEPLOYING, PRIMING, DEPRIMING, UPDATING, MIGRATING)
+Also in case of failures, the overall state of the composition/instance remains in any of the transitioning states (DEPLOYING, UNDEPLOYING, PRIMING, DEPRIMING, UPDATING, MIGRATING, PREPARING, REVIEWING, MIGRATION_PRECHECKING)
 with the appropriate result values updated by the participant.
 
 .. image:: ../images/system-dialogues/FailedAcmResult.png
index 72c4c59..1fa63b2 100644 (file)
@@ -26,7 +26,11 @@ ACM Integration Tests
 | HealthcheckAcm                                | Verifies the ACM runtime is up and running                                                             | Should receive a 200 success response with STATUS:UP                                                                   |
 +-----------------------------------------------+--------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+
 | HealthcheckParticipantSim                     | Verifies the participant simulator is up and running                                                   |  Should receive a 200 success response with STATUS:UP                                                                  |
-+-----------------------------------------------+--------------------------------------------------------------------------------------------------------+----------------------------+-------------------------------------------------------------------------------------------+
++-----------------------------------------------+--------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+
+| HealthcheckApi                                | Verifies the policy api is up and running                                                              |  Should receive a 200 success response with STATUS:UP                                                                  |
++-----------------------------------------------+--------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+
+| HealthcheckPap                                | Verifies the policy pap is up and running                                                              |  Should receive a 200 success response with STATUS:UP                                                                  |
++-----------------------------------------------+--------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+
 | RegisterParticipants                          | Sends a PUT request to ACM-R to request the participants for registration                              | Should receive a 202 Accepted response from ACM-R                                                                      |
 +-----------------------------------------------+--------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+
 | CommissionAutomationComposition               | Commissions a Tosca service template to ACM-R                                                          | Should receive a 201 created response from ACM_R                                                                       |
@@ -47,11 +51,13 @@ ACM Integration Tests
 +-----------------------------------------------+--------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+
 | InstantiateAutomationCompositionMigrationFrom | Instantiate the Automation Composition from the service template of migration test                     | Should receive a 201 Accepted response from ACM-R                                                                      |
 +-----------------------------------------------+--------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+
-| FailDeployAutomationCompositionMigration      | Verify the deployment failure for migration AC instance by updating the participant sim behavior       | Should receive a 202 Accepted response from ACM-R and the stateChangeResult of AC instance should be FAILED            |
+| FailPrepareAutomationCompositionMigrationFrom | Verify the prepare failure for migration AC instance by updating the participant sim behavior          | Should receive a 202 Accepted response from ACM-R and the stateChangeResult of AC instance should be FAILED            |
 +-----------------------------------------------+--------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+
-| TimeoutDeployAutomationCompositionMigration   | Verify the deployment is timing out for migration AC instance by updating the participant sim behavior | Should receive a 202 Accepted response from ACM-R                                                                      |
+| PrepareAutomationCompositionMigrationFrom     | Send Prepare request to ACM-R for the AC instance before deployment                                    | Should receive a 202 Accepted response from ACM-R                                                                      |
 +-----------------------------------------------+--------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+
-| PrepareAutomationComposition                  | Send Prepare request to ACM-R for the AC instance before deployment                                    | Should receive a 202 Accepted response from ACM-R                                                                      |
+| FailDeployAutomationCompositionMigration      | Verify the deployment failure for migration AC instance by updating the participant sim behavior       | Should receive a 202 Accepted response from ACM-R and the stateChangeResult of AC instance should be FAILED            |
++-----------------------------------------------+--------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+
+| TimeoutDeployAutomationCompositionMigration   | Start deployment in timing out for migration AC instance by updating the participant sim behavior      | Should receive a 202 Accepted response from ACM-R                                                                      |
 +-----------------------------------------------+--------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+
 | DeployAutomationComposition                   | Deploy the AC instance                                                                                 | Should receive a 202 Accepted response from ACM-R and the state of AC instance in ACM-R should be changed to DEPLOYED  |
 +-----------------------------------------------+--------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+
@@ -65,20 +71,28 @@ ACM Integration Tests
 +-----------------------------------------------+--------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+
 | QueryPolicyTypes                              | Verify the new policy types are created by the Policy-participant in API                               | Should receive a 200 response with Policy type present in the available policy types                                   |
 +-----------------------------------------------+--------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+
-| ReviewAutomationComposition                   | Review the current state of AC instance                                                                | Should receive a 202 Accepted response and the substate should be present in the AC instance data                      |
-+-----------------------------------------------+--------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+
-| CheckTimeoutAutomationComposition             | Verify the migration AC instance deployment is timed out                                               | Should receive a 200 response with stateChangeResult TIMEOUT                                                           |
+| CheckTimeoutAutomationComposition             | Verify the deployment is timing out for migration AC instance by updating the participant sim behavior | Should receive a 202 Accepted response from ACM-R                                                                      |
 +-----------------------------------------------+--------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+
 | DeployAutomationCompositionMigration          | Deploy the migration AC instance after updating Participant sim to return success                      | Should receive a 202 Accepted status and the deploy state should be DEPLOYED in ACM-R                                  |
 +-----------------------------------------------+--------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+
 | SendOutPropertiesToRuntime                    | Update participant sim to send outProperties and verify it is updated in ACM-R                         | Should receive 200 response from ACM-R and the response should contain the outProperties available under AC instance   |
 +-----------------------------------------------+--------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+
+| FailReviewAutomationCompositionMigrationFrom  | Verify the review failure for migration AC instance by updating the participant sim behavior           | Should receive a 202 Accepted response from ACM-R and the stateChangeResult of AC instance should be FAILED            |
++-----------------------------------------------+--------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+
+| ReviewAutomationCompositionMigrationFrom      | Review the current state of AC instance                                                                | Should receive a 202 Accepted response and the substate should be present in the AC instance data                      |
++-----------------------------------------------+--------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+
 | AutomationCompositionUpdate                   | Update the AC instance properties in ACM-R                                                             | Should receive a 200 response from ACM-R and the AC instance should contain the updated property values                |
 +-----------------------------------------------+--------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+
 | PrecheckAutomationCompositionMigration        | Precheck the Migration AC instance                                                                     | Should receive a 200 response and the AC instance should provide the substate info                                     |
 +-----------------------------------------------+--------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+
 | AutomationCompositionMigrationTo              | Migrate the AC instance                                                                                | Should receive a 200 response and the AC instance should be migrated to to the target AC definition                    |
 +-----------------------------------------------+--------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+
+| FailAutomationCompositionMigration            | Verify the Migration failure for AC instance by updating the participant sim behavior                  | Should receive a 202 Accepted response from ACM-R and the stateChangeResult of AC instance should be FAILED            |
++-----------------------------------------------+--------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+
+| FailDePrimeACDefinitionsFrom                  | Verify the failure of deprime in migration AC definition by updating the participant sim to fail       | Should receive a 202 Accepted response and the migration AC definition in ACM-R should have stateChangeResult FAILED   |
++-----------------------------------------------+--------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+
+| DePrimeACDefinitionsFrom                      | Deprime the migration AC definition from the participants                                              | Should receive a 202 Accepted response and the migration AC definition in ACM-R should be moved to COMMISSIONED state  |
++-----------------------------------------------+--------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+
 | UnDeployAutomationComposition                 | Undeploy the AC instance                                                                               | Should receive a 202 Accepted response and the AC instance in ACM-R should have the UNDEPLOYED status                  |
 +-----------------------------------------------+--------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+
 | FailUnDeployAutomationCompositionMigrationTo  | Verify the failure of undeploy in migration AC instance by updating the participant sim to fail        | Should receive a 202 Accepted response and the stateChangeResult of the instance in ACM-R should be FAILED             |
@@ -93,10 +107,6 @@ ACM Integration Tests
 +-----------------------------------------------+--------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+
 | DePrimeACDefinitions                          | Deprime the AC definition                                                                              | Should receive a 202 Accepted response and the the AC definition in ACM-R should be moved to COMMISSIONED state        |
 +-----------------------------------------------+--------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+
-| FailDePrimeACDefinitionsFrom                  | Verify the failure of deprime in migration AC definition by updating the participant sim to fail       | Should receive a 202 Accepted response and the migration AC definition in ACM-R should have stateChangeResult FAILED   |
-+-----------------------------------------------+--------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+
-| DePrimeACDefinitionsFrom                      | Deprime the migration AC definition from the participants                                              | Should receive a 202 Accepted response and the migration AC definition in ACM-R should be moved to COMMISSIONED state  |
-+-----------------------------------------------+--------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+
 | DePrimeACDefinitionsTo                        | Deprime the migration target AC definition from the participants                                       | Should receive a 202 Accepted response and the target AC definition in ACM-R should be moved to COMMISSIONED state     |
 +-----------------------------------------------+--------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+
 | DeleteACDefinition                            | Delete automation composition definition                                                               | Should receive a 200 response and the AC definition should be removed in ACM-R db                                      |
index 802e9a0..9204e4c 100644 (file)
@@ -239,8 +239,8 @@ Example of DEPLOY order with Http_PMSHMicroserviceAutomationCompositionElement w
 
 In that scenario the message AUTOMATION_COMPOSITION_DEPLOY has been sent two times.
 
-Migration using Stage
-*********************
+Prepare and Migration using Stage
+*********************************
 The stage is particularly important in Automation Composition migration because sometime the user wishes to control
 not only the order in which the state changes in Automation Composition Elements but also to execute again using the same Automation Composition Elements.
 
@@ -248,6 +248,38 @@ How to define Stage
 +++++++++++++++++++
 Stage is defined as shown below in the Definition of TOSCA fundamental Automation Composition Types yaml file.
 
+.. code-block:: YAML
+
+  stage:
+    type: map
+    required: false
+    description: A map of list indicating for each operation the stages in which this automation composition element will be started, the
+                 first stage is zero. Automation Composition Elements are started in their stage order.
+                 Automation Composition Elements with the same stage are started simultaneously.
+    metadata:
+      common: true
+
+Example where it could be used:
+
+.. code-block:: YAML
+
+  org.onap.domain.database.Http_PMSHMicroserviceAutomationCompositionElement:
+    # Consul http config for PMSH.
+    version: 1.2.3
+    type: org.onap.policy.clamp.acm.HttpAutomationCompositionElement
+    type_version: 1.0.1
+    description: Automation Composition element for the http requests of PMSH microservice
+    properties:
+      provider: ONAP
+      uninitializedToPassiveTimeout: 180
+      stage:
+        prepare: [0]
+        migrate: [0,2]
+
+Backward compatibility for Stage definition
++++++++++++++++++++++++++++++++++++++++++++
+Stage for migration could be defined as shown below:
+
 .. code-block:: YAML
 
   stage:
@@ -259,7 +291,7 @@ Stage is defined as shown below in the Definition of TOSCA fundamental Automatio
     metadata:
       common: true
 
-Example where it could be used:
+Example of Backward compatibility for migration:
 
 .. code-block:: YAML
 
@@ -274,6 +306,7 @@ Example where it could be used:
       uninitializedToPassiveTimeout: 180
       stage: [0,2]
 
+
 How Stage works
 +++++++++++++++
 In state changes in MIGRATING Automation Composition elements starts in increasing order from stage 0.
@@ -396,13 +429,13 @@ Monitoring is designed to process the follow operations:
 
 - to elaborate the messages from participants
 - to determine the next startPhase in a AUTOMATION_COMPOSITION_DEPLOY message
-- to determine the next stage in a AUTOMATION_COMPOSITION_MIGRATION message
+- to determine the next stage in a AUTOMATION_COMPOSITION_MIGRATION/AUTOMATION_COMPOSITION_PREPARE message
 - to update AC deployState: in a scenario that "AutomationComposition.deployState" is in a kind of transitional state (example DEPLOYING), if all  - AC elements are moved properly to the specific state, the "AutomationComposition.deployState" will be updated to that and saved to DB
 - to update AC lockState: in a scenario that "AutomationComposition.lockState" is in a kind of transitional state (example LOCKING), if all  - AC elements are moved properly to the specific state, the "AutomationComposition.lockState" will be updated to that and saved to DB
 - to update AC subState: in a scenario that "AutomationComposition.subState" is in a kind of transitional state (example PREPARING), if all  - AC elements are moved properly to NONE state, the "AutomationComposition.subState" will be updated to NONE and saved to DB
 - to delete AC Instance: in a scenario that "AutomationComposition.deployState" is in DELETING, if all  - AC elements are moved properly to DELETED, the AC Instance will be deleted from DB
 - to retry AUTOMATION_COMPOSITION_DEPLOY/AUTOMATION_COMPOSITION_STATE_CHANGE messages. if there is an AC instance with startPhase completed, it will be moved to the next startPhase and retry a broadcast message with the new startPhase
-- to retry AUTOMATION_COMPOSITION_MIGRATION messages. if there is an AC instance with stage completed, it will be moved to the next stage and retry a broadcast message with the new stage
+- to retry AUTOMATION_COMPOSITION_MIGRATION/AUTOMATION_COMPOSITION_PREPARE messages. if there is an AC instance with stage completed, it will be moved to the next stage and retry a broadcast message with the new stage
 - to send sync message to all participants replica: in scenario where AC instance transition is fully completed or OutProperties has been changed
 
 The solution Design timeout and reporting for all Participant message dialogues are implemented into the monitoring execution.
index b3f09a7..540b043 100755 (executable)
@@ -73,6 +73,7 @@ AutomationCompositionMigration,ACM Runtime,Participant,Message to request update
 ,,,,participantId,UUID indicating the participant the message is intended for
 ,,,,messageType,Enum indicating the type of message AUTOMATION_COMPOSITION_MIGRATION
 AutomationCompositionPrepare,ACM Runtime,Participant,Message to request prepare/review,participantList,A list of ParticipantUpdates instances which carries details of an updated participant.
+,,,,stage,The next stage that participant is supposed to receiving
 ,,,,preDeploy,Flag - if true the instance is Undeployed and the action is a Prepare - otherwise (false) the instance is Deployed and the action is a Review
 ,,,,compositionId,The id of the AC Definition related to this message
 ,,,,automationCompositionId,The id of the automation composition related to this message
diff --git a/docs/clamp/acm/images/acm-states/AcInstanceStatesMigrationPrecheck.png b/docs/clamp/acm/images/acm-states/AcInstanceStatesMigrationPrecheck.png
new file mode 100644 (file)
index 0000000..70e80f2
Binary files /dev/null and b/docs/clamp/acm/images/acm-states/AcInstanceStatesMigrationPrecheck.png differ
diff --git a/docs/clamp/acm/images/acm-states/AcInstanceStatesPrepare.png b/docs/clamp/acm/images/acm-states/AcInstanceStatesPrepare.png
new file mode 100644 (file)
index 0000000..74d5ee3
Binary files /dev/null and b/docs/clamp/acm/images/acm-states/AcInstanceStatesPrepare.png differ
diff --git a/docs/clamp/acm/images/acm-states/AcInstanceStatesReview.png b/docs/clamp/acm/images/acm-states/AcInstanceStatesReview.png
new file mode 100644 (file)
index 0000000..543eb48
Binary files /dev/null and b/docs/clamp/acm/images/acm-states/AcInstanceStatesReview.png differ
diff --git a/docs/clamp/acm/images/acm-states/AcInstanceSubStates.png b/docs/clamp/acm/images/acm-states/AcInstanceSubStates.png
deleted file mode 100644 (file)
index f27ea67..0000000
Binary files a/docs/clamp/acm/images/acm-states/AcInstanceSubStates.png and /dev/null differ
diff --git a/docs/clamp/acm/plantuml/states/AcInstanceStatesMigrationPrecheck.puml b/docs/clamp/acm/plantuml/states/AcInstanceStatesMigrationPrecheck.puml
new file mode 100644 (file)
index 0000000..72eeb60
--- /dev/null
@@ -0,0 +1,15 @@
+@startuml
+
+[*] --> NONE:DEPLOYED
+NONE:DEPLOYED --> MIGRATION_PRECHECKING: Migrate precheck
+MIGRATION_PRECHECKING --> NONE:DEPLOYED: Completed
+MIGRATION_PRECHECKING --> MIGRATION_PRECHECKING:DEPLOYED:FAILED: Failed
+MIGRATION_PRECHECKING --> MIGRATION_PRECHECKING:DEPLOYED:TIMEOUT: Timeout
+MIGRATION_PRECHECKING:DEPLOYED:FAILED --> MIGRATION_PRECHECKING: Migrate precheck
+MIGRATION_PRECHECKING:DEPLOYED:TIMEOUT --> MIGRATION_PRECHECKING: Migrate precheck
+NONE:DEPLOYED --> UNDEPLOYING: Undeploy
+MIGRATION_PRECHECKING:DEPLOYED:FAILED --> UNDEPLOYING: Undeploy
+MIGRATION_PRECHECKING:DEPLOYED:TIMEOUT --> UNDEPLOYING: Undeploy
+
+
+@enduml
diff --git a/docs/clamp/acm/plantuml/states/AcInstanceStatesPrepare.puml b/docs/clamp/acm/plantuml/states/AcInstanceStatesPrepare.puml
new file mode 100644 (file)
index 0000000..89fca2f
--- /dev/null
@@ -0,0 +1,14 @@
+@startuml
+
+[*] --> NONE:UNDEPLOYED
+NONE:UNDEPLOYED --> PREPARING: Prepare
+NONE:UNDEPLOYED --> DELETING: Delete
+PREPARING --> NONE:UNDEPLOYED: Completed
+PREPARING --> PREPARING:UNDEPLOYED:FAILED: Failed
+PREPARING:UNDEPLOYED:FAILED --> PREPARING: Prepare
+PREPARING --> PREPARING:UNDEPLOYED:TIMEOUT: Timeout
+PREPARING:UNDEPLOYED:TIMEOUT --> PREPARING: Prepare
+PREPARING:UNDEPLOYED:FAILED--> DELETING: Delete
+PREPARING:UNDEPLOYED:TIMEOUT  --> DELETING: Delete
+
+@enduml
diff --git a/docs/clamp/acm/plantuml/states/AcInstanceStatesReview.puml b/docs/clamp/acm/plantuml/states/AcInstanceStatesReview.puml
new file mode 100644 (file)
index 0000000..582400b
--- /dev/null
@@ -0,0 +1,14 @@
+@startuml
+
+[*] --> NONE:DEPLOYED
+NONE:DEPLOYED --> REVIEWING: Review
+REVIEWING --> NONE:DEPLOYED: Completed
+REVIEWING --> REVIEWING:DEPLOYED:FAILED: Failed
+REVIEWING --> REVIEWING:DEPLOYED:TIMEOUT: Timeout
+REVIEWING:DEPLOYED:FAILED --> REVIEWING: Review
+REVIEWING:DEPLOYED:TIMEOUT --> REVIEWING: Review
+NONE:DEPLOYED --> UNDEPLOYING: Undeploy
+REVIEWING:DEPLOYED:FAILED --> UNDEPLOYING: Undeploy
+REVIEWING:DEPLOYED:TIMEOUT --> UNDEPLOYING: Undeploy
+
+@enduml
diff --git a/docs/clamp/acm/plantuml/states/AcInstanceSubStates.puml b/docs/clamp/acm/plantuml/states/AcInstanceSubStates.puml
deleted file mode 100644 (file)
index 918a03b..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-@startuml
-
-UNDEPLOYED --> DEPLOYING: Deploy
-DEPLOYING --> DEPLOYED: AC Instance Elements\nall DEPLOYED
-
-state UNDEPLOYED {
- NONE:UNDEPLOYED --> PREPARING: Prepare
- PREPARING --> NONE:UNDEPLOYED: Completed
-}
-
-state DEPLOYED {
- NONE:DEPLOYED --> REVIEWING: Review
- REVIEWING --> NONE:DEPLOYED: Completed
- NONE:DEPLOYED --> MIGRATION_PRECHECKING: Migrate precheck
- MIGRATION_PRECHECKING --> NONE:DEPLOYED: Completed
-}
-
-@enduml