Add extend instance deletion support in ACM docs 89/134789/1
authorFrancescoFioraEst <francesco.fiora@est.tech>
Thu, 8 Jun 2023 08:01:22 +0000 (09:01 +0100)
committerFrancesco Fiora <francesco.fiora@est.tech>
Thu, 8 Jun 2023 10:17:08 +0000 (10:17 +0000)
Issue-ID: POLICY-4730
Change-Id: Ifbbd2369b9ef0032f9066b287f98fc2fcbd4d550
Signed-off-by: FrancescoFioraEst <francesco.fiora@est.tech>
docs/clamp/acm/acm-architecture.rst
docs/clamp/acm/acm-user-guide.rst
docs/clamp/acm/api-protocol/acm-participant-protocol.rst
docs/clamp/acm/api-protocol/system-level-dialogues.rst
docs/clamp/acm/design-impl/clamp-runtime-acm.rst
docs/clamp/acm/design-impl/participants/participant-intermediary.rst
docs/clamp/acm/images/system-dialogues/DeleteAcInstance.png
docs/clamp/acm/images/system-dialogues/DeleteInstanceElements.png [new file with mode: 0644]
docs/clamp/acm/images/system-dialogues/DeleteResponseStored.png [new file with mode: 0644]

index 4e8f674..2e8f518 100644 (file)
@@ -240,9 +240,11 @@ At Run Time, the following Automation Composition Life Cycle management capabili
       that the Automation Composition instance is removed from Participants.
 
    #. **Automation Composition Instance Deletion:** A user can order the removal of a Automation Composition Instance
-      from the ACM runtime. Automation Composition Instances that are DEPLOYED/UNLOCKED on participants cannot
-      be removed from the ACM runtime. The post condition for an execution of this capability
-      is that the Automation Composition instance is removed from Instance Automation Composition Inventory.
+      from the ACM runtime and participants. Automation Composition Instances that are DEPLOYED/UNLOCKED on participants cannot
+      be removed from the ACM runtime. Each participant begins accepting and processing automation composition events removing the
+      Automation Composition Instance from the inventory. The post condition for an execution of this capability
+      is that the Automation Composition instance is removed from Instance Automation Composition Inventory
+      in ACM runtime and participants.
 
 #. **Automation Composition Depriming on Participants.** The Depriming operation removes Automation Composition Types
    and common property values from participants for each Automation Composition Element Type in the Automation
index 56dc66b..c2485ec 100644 (file)
@@ -268,7 +268,7 @@ This deletes the AC instance from the database including all the element propert
   Invoke a DELETE request
   'http://policy_runtime_ip:port/onap/policy/clamp/acm/v2/compositions/${compositionId}/instances/${instanceId}'
 
-This returns 200 on successful deletion of the instance.
+This returns a 202 response on successful delete order request.
 
 Deprime Ac defintions
 ---------------------
index 2dae2b0..b4755ae 100644 (file)
@@ -101,7 +101,7 @@ message.
 
 .. image:: ../images/acm-participants-protocol/acm-state-change.png
 
-The flow of the DEPLOY/UNDEPLOY state change messages are shown below. But the same flow is true for LOCK/UNLOCK
+The flow of the DEPLOY/UNDEPLOY state change messages are shown below. But the same flow is true for LOCK/UNLOCK and DELETE
 
 .. note:: More details of the state machine are available on :ref:`ACM States <acm-states-label>`
 
index 4ffcbe6..c510531 100644 (file)
@@ -114,9 +114,18 @@ Note that this dialogue creates the Automation Composition Instance in the ACM d
 
 3.2 Delete an Automation Composition Instance
 ---------------------------------------------
+The user requests the AC Instance to be deleted using a REST endpoint. The ACM Runtime orders the AC Instance to be deleted.
 
 .. image:: ../images/system-dialogues/DeleteAcInstance.png
 
+Each participant deletes its AC Element Instances from the AC Instance
+
+.. image:: ../images/system-dialogues/DeleteInstanceElements.png
+
+The ACM Runtime receives and stores the responses, when all instances element are deleted, it delete the instance.
+
+.. image:: ../images/system-dialogues/DeleteResponseStored.png
+
 3.3 Deploy Automation Composition Instance
 ------------------------------------------
 The user requests the AC Instance to be deployed using a REST endpoint. The ACM Runtime orders the AC Instance to be deployed to Participants.
index ba5ffe3..dd6348c 100644 (file)
@@ -123,7 +123,9 @@ Delete of a Automation Composition Instance
 - GUI calls DELETE "/onap/policy/clamp/acm/v2/compositions/{compositionId}/instances/{instanceId}" endpoint
 - runtime-ACM receives the call by Rest-Api (InstantiationController)
 - It checks that AC Instance is in UNDEPLOYED deployState
-- It deletes the AC Instance from DB
+- It updates the AC Instance to DB with DELETING deployState
+- It triggers the execution to send a broadcast AUTOMATION_COMPOSITION_STATE_CHANGE message
+- the message is built by AutomationCompositionStateChangePublisher using Instance data. (with startPhase = last StartPhase)
 
 Depriming of a Automation Composition Definition Type
 +++++++++++++++++++++++++++++++++++++++++++++++++++++
@@ -242,6 +244,7 @@ Monitoring is designed to process the follow operations:
 - to determine the next startPhase in a AUTOMATION_COMPOSITION_DEPLOY 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 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 a AC Element not in the proper state, it will retry a broadcast message
 
 The solution Design of retry, timeout, and reporting for all Participant message dialogues are implemented into the monitoring execution.
index 6ebc76f..5321538 100644 (file)
@@ -64,31 +64,39 @@ DePrime of an Automation Composition Definition Type
 - the message is built by ParticipantPrimePublisher with an empty list of ParticipantDefinition
 - Participant-intermediary will receive a PARTICIPANT_PRIME message and deletes the Tosca Service Template data on ParticipantHandler
 
-Design of "issues automation composition commands to automation compositions" - case UNDEPLOY to DEPLOY
--------------------------------------------------------------------------------------------------------
+Design of "issues automation composition commands to automation compositions" - case UNDEPLOYED to DEPLOYED
+-----------------------------------------------------------------------------------------------------------
 - AUTOMATION_COMPOSITION_DEPLOY message with instantiation details and DEPLOY order state is sent to participants
 - Participant-intermediary validates the current deployState change
 - Participant-intermediary will receive AUTOMATION_COMPOSITION_DEPLOY message and sends the details of AutomationCompositionElements to participants
 - Each participant performs its designated job of deployment by interacting with respective frameworks
 
-Design of "issues automation composition commands to automation compositions" - case DEPLOY to UNDEPLOY
--------------------------------------------------------------------------------------------------------
+Design of "issues automation composition commands to automation compositions" - case DEPLOYED to UNDEPLOYED
+-----------------------------------------------------------------------------------------------------------
 - AUTOMATION_COMPOSITION_STATE_CHANGE message with instantiation details and UNDEPLOY order state is sent to participants
 - Participant-intermediary validates the current deployState change
 - Participant-intermediary will receive AUTOMATION_COMPOSITION_STATE_CHANGE message and sends AC-element details to participants
 - Each participant performs its designated job of undeployment by interacting with respective frameworks
 
-Design of "issues automation composition commands to automation compositions" - case LOCK to UNLOCK
----------------------------------------------------------------------------------------------------
+Design of "issues automation composition commands to automation compositions" - case LOCKED to UNLOCKED
+-------------------------------------------------------------------------------------------------------
 - AUTOMATION_COMPOSITION_STATE_CHANGE message with instantiation details and UNLOCK order state is sent to participants
 - Participant-intermediary validates the current lockState change
 - Participant-intermediary will receive AUTOMATION_COMPOSITION_STATE_CHANGE message
 
-Design of "issues automation composition commands to automation compositions" - case UNLOCK to LOCK
----------------------------------------------------------------------------------------------------
+Design of "issues automation composition commands to automation compositions" - case UNLOCKED to LOCKED
+-------------------------------------------------------------------------------------------------------
 - AUTOMATION_COMPOSITION_STATE_CHANGE message with instantiation details and LOCK order state is sent to participants
 - Participant-intermediary validates the current lockState change
 
+Design of Delete - case UNDEPLOYED to DELETED
+---------------------------------------------
+- AUTOMATION_COMPOSITION_STATE_CHANGE message with instantiation details and DELETE order state is sent to participants
+- Participant-intermediary validates the current deployState change
+- Participant-intermediary will receive AUTOMATION_COMPOSITION_STATE_CHANGE message and sends AC-element details to participants
+- Each participant performs its designated job of removing instantiation data if not done in undeployment
+- Participant-intermediary will remove instantiation data
+
 Design of a PARTICIPANT_STATUS_REQ message
 ------------------------------------------
 - AC-runtime triggers the execution to send a broadcast PARTICIPANT_STATUS_REQ message or to send it to a specific participant
index ab6e279..6010766 100644 (file)
Binary files a/docs/clamp/acm/images/system-dialogues/DeleteAcInstance.png and b/docs/clamp/acm/images/system-dialogues/DeleteAcInstance.png differ
diff --git a/docs/clamp/acm/images/system-dialogues/DeleteInstanceElements.png b/docs/clamp/acm/images/system-dialogues/DeleteInstanceElements.png
new file mode 100644 (file)
index 0000000..73f7f52
Binary files /dev/null and b/docs/clamp/acm/images/system-dialogues/DeleteInstanceElements.png differ
diff --git a/docs/clamp/acm/images/system-dialogues/DeleteResponseStored.png b/docs/clamp/acm/images/system-dialogues/DeleteResponseStored.png
new file mode 100644 (file)
index 0000000..6ac70cd
Binary files /dev/null and b/docs/clamp/acm/images/system-dialogues/DeleteResponseStored.png differ