blob: d9d24ceb3c3ccc93d1f34ea6976e2a557d63e0b4 [file] [log] [blame]
liamfallone206a102021-10-07 19:00:18 +01001.. This work is licensed under a Creative Commons Attribution 4.0 International License.
2
adheli.tavares12a315f2022-04-05 14:21:40 +01003.. _clamp-acm-participant-intermediary:
liamfallone206a102021-10-07 19:00:18 +01004
5Participant Intermediary
6########################
7
8The CLAMP Participant Intermediary is a common library in ONAP, which does common message and
9state handling for participant implementations. It provides a Java API, which participant
10implementations implement to receive and send messages to the CLAMP runtime and to handle
waynedunicanc41c4132022-04-05 09:00:02 +010011Automation Composition Element state.
liamfallone206a102021-10-07 19:00:18 +010012
Sirisha_Manchikanti0f409502021-10-19 13:16:02 +010013Terminology
14-----------
15- Broadcast message: a message for all participants (participantId=null and participantType=null)
16- Message to a participant: a message only for a participant (participantId and participantType properly filled)
17- MessageSender: a class that takes care of sending messages from participant-intermediary
18- GUI: graphical user interface, Postman or a Front-End Application
19
20Inbound messages to participants
21--------------------------------
waynedunicanc41c4132022-04-05 09:00:02 +010022- PARTICIPANT_REGISTER_ACK: received as a response from clamp-acm runtime server as an acknowledgement to ParticipantRegister message sent from a participant
23- PARTICIPANT_DEREGISTER_ACK: received as a response from clamp-acm runtime server as an acknowledgement to ParticipantDeregister message sent from a participant
24- AUTOMATION_COMPOSITION_STATE_CHANGE: a message received from clamp-acm runtime server for a state change of clamp-acm
25- AUTOMATION_COMPOSITION_UPDATE: a message received from clamp-acm runtime server for a clamp-acm update with clamp-acm instances
26- PARTICIPANT_UPDATE: a message received from clamp-acm runtime server for a participant update with tosca definitions of clamp-acm
27- PARTICIPANT_STATUS_REQ: A status request received from clamp-acm runtime server to send an immediate ParticipantStatus from all participants
Sirisha_Manchikanti0f409502021-10-19 13:16:02 +010028
29Outbound messages
30-----------------
31- PARTICIPANT_REGISTER: is sent by a participant during startup
32- PARTICIPANT_DEREGISTER: is sent by a participant during shutdown
33- PARTICIPANT_STATUS: is sent by a participant as heartbeat with the status and health of a participant
waynedunicanc41c4132022-04-05 09:00:02 +010034- AUTOMATIONCOMPOSITION_STATECHANGE_ACK: is an acknowledgement sent by a participant as a response to AutomationCompositionStateChange
35- AUTOMATIONCOMPOSITION_UPDATE_ACK: is an acknowledgement sent by a participant as a response to AutomationCompositionUpdate
Sirisha_Manchikanti0f409502021-10-19 13:16:02 +010036- PARTICIPANT_UPDATE_ACK: is an acknowledgement sent by a participant as a response to ParticipantUpdate
37
38Design of a PARTICIPANT_REGISTER message
39----------------------------------------
40- A participant starts and send a PARTICIPANT_REGISTER message
41- ParticipantRegisterListener collects the message from DMaap
42- if participant is not present in DB, it saves participant reference with status UNKNOWN to DB
43- if participant is present in DB, it triggers the execution to send a PARTICIPANT_UPDATE message to the participant registered (message of Priming)
44- the message is built by ParticipantUpdatePublisher using Tosca Service Template data (to fill the list of ParticipantDefinition)
45- It triggers the execution to send a PARTICIPANT_REGISTER_ACK message to the participant registered
46- MessageIntercept intercepts that event, if PARTICIPANT_UPDATE message has been sent, it will be add a task to handle PARTICIPANT_REGISTER in SupervisionScanner
47- SupervisionScanner starts the monitoring for participantUpdate
48
49Design of a PARTICIPANT_DEREGISTER message
50------------------------------------------
51- A participant starts and send a PARTICIPANT_DEREGISTER message
52- ParticipantDeregisterListener collects the message from DMaap
53- if participant is not present in DB, do nothing
54- if participant is present in DB, it triggers the execution to send a PARTICIPANT_UPDATE message to the participant registered (message of DePriming)
55- the message is built by ParticipantUpdatePublisher using Tosca Service Template data as null
56- ParticipantHandler removes the tosca definitions stored
57- It triggers the execution to send a PARTICIPANT_DEREGISTER_ACK message to the participant registered
58- Participant is not monitored.
59
waynedunicanc41c4132022-04-05 09:00:02 +010060Design of a creation of an Automation Composition Type
adheli.tavares12a315f2022-04-05 14:21:40 +010061------------------------------------------------------
Sirisha_Manchikanti0f409502021-10-19 13:16:02 +010062- If there are participants registered with CL-runtime, it triggers the execution to send a broadcast PARTICIPANT_UPDATE message
63- the message is built by ParticipantUpdatePublisher using Tosca Service Template data (to fill the list of ParticipantDefinition)
64- Participant-intermediary will receive a PARTICIPANT_UDPATE message and stores the Tosca Service Template data on ParticipantHandler
65
waynedunicanc41c4132022-04-05 09:00:02 +010066Design of a deletion of an Automation Composition Type
adheli.tavares12a315f2022-04-05 14:21:40 +010067------------------------------------------------------
Sirisha_Manchikanti0f409502021-10-19 13:16:02 +010068- if there are participants registered, CL-runtime triggers the execution to send a broadcast PARTICIPANT_UPDATE message
69- the message is built by ParticipantUpdatePublisher with an empty list of ParticipantDefinition
waynedunicanc41c4132022-04-05 09:00:02 +010070- It deletes the Automation Composition Type from DB
Sirisha_Manchikanti0f409502021-10-19 13:16:02 +010071- Participant-intermediary will receive a PARTICIPANT_UDPATE message and deletes the Tosca Service Template data on ParticipantHandler
72
waynedunicanc41c4132022-04-05 09:00:02 +010073Design of a creation of an Automation Composition
adheli.tavares12a315f2022-04-05 14:21:40 +010074-------------------------------------------------
waynedunicanc41c4132022-04-05 09:00:02 +010075- AUTOMATION_COMPOSITION_UPDATE message with instantiation details and UNINITIALISED state is sent to participants
Sirisha_Manchikanti0f409502021-10-19 13:16:02 +010076- Participant-intermediary validates the current state change
waynedunicanc41c4132022-04-05 09:00:02 +010077- Participant-intermediary will recieve AUTOMATION_COMPOSITION_UPDATE message and sends the details of AutomationCompositionElements to participants
Sirisha_Manchikanti0f409502021-10-19 13:16:02 +010078- Each participant performs its designated job of deployment by interacting with respective frameworks
79
waynedunicanc41c4132022-04-05 09:00:02 +010080Design of a deletion of an Automation Composition
adheli.tavares12a315f2022-04-05 14:21:40 +010081-------------------------------------------------
waynedunicanc41c4132022-04-05 09:00:02 +010082- AUTOMATION_COMPOSITION_STATE_CHANGE message with UNINITIALISED state is sent to participants
Sirisha_Manchikanti0f409502021-10-19 13:16:02 +010083- Participant-intermediary validates the current state change
waynedunicanc41c4132022-04-05 09:00:02 +010084- Participant-intermediary will recieve AUTOMATION_COMPOSITION_STATE_CHANGE message and sends the details of AutomationCompositionElements to participants
Sirisha_Manchikanti0f409502021-10-19 13:16:02 +010085- Each participant performs its designated job of undeployment by interacting with respective frameworks
86
waynedunicanc41c4132022-04-05 09:00:02 +010087Design of "issues automation composition commands to automation compositions" - case UNINITIALISED to PASSIVE
adheli.tavares12a315f2022-04-05 14:21:40 +010088-------------------------------------------------------------------------------------------------------------
waynedunicanc41c4132022-04-05 09:00:02 +010089- AUTOMATION_COMPOSITION_STATE_CHANGE message with state changed from UNINITIALISED to PASSIVE is sent to participants
Sirisha_Manchikanti0f409502021-10-19 13:16:02 +010090- Participant-intermediary validates the current state change
waynedunicanc41c4132022-04-05 09:00:02 +010091- Participant-intermediary will recieve AUTOMATION_COMPOSITION_STATE_CHANGE message and sends the details of state change to participants
Sirisha_Manchikanti0f409502021-10-19 13:16:02 +010092- Each participant performs its designated job of state change by interacting with respective frameworks
93
waynedunicanc41c4132022-04-05 09:00:02 +010094Design of "issues automation composition commands to automation compositions" - case PASSIVE to UNINITIALISED
adheli.tavares12a315f2022-04-05 14:21:40 +010095-------------------------------------------------------------------------------------------------------------
waynedunicanc41c4132022-04-05 09:00:02 +010096- AUTOMATION_COMPOSITION_STATE_CHANGE message with state changed from PASSIVE to UNINITIALISED is sent to participants
Sirisha_Manchikanti0f409502021-10-19 13:16:02 +010097- Participant-intermediary validates the current state change
waynedunicanc41c4132022-04-05 09:00:02 +010098- Participant-intermediary will recieve AUTOMATION_COMPOSITION_STATE_CHANGE message and sends the details of state change to participants
Sirisha_Manchikanti0f409502021-10-19 13:16:02 +010099- Each participant performs its designated job of state change by interacting with respective frameworks
100
waynedunicanc41c4132022-04-05 09:00:02 +0100101Design of "issues automation composition commands to automation compositions" - case PASSIVE to RUNNING
adheli.tavares12a315f2022-04-05 14:21:40 +0100102-------------------------------------------------------------------------------------------------------
waynedunicanc41c4132022-04-05 09:00:02 +0100103- AUTOMATION_COMPOSITION_STATE_CHANGE message with state changed from PASSIVE to RUNNING is sent to participants
Sirisha_Manchikanti0f409502021-10-19 13:16:02 +0100104- Participant-intermediary validates the current state change
waynedunicanc41c4132022-04-05 09:00:02 +0100105- Participant-intermediary will recieve AUTOMATION_COMPOSITION_STATE_CHANGE message and sends the details of state change to participants
Sirisha_Manchikanti0f409502021-10-19 13:16:02 +0100106- Each participant performs its designated job of state change by interacting with respective frameworks
107
waynedunicanc41c4132022-04-05 09:00:02 +0100108Design of "issues automation composition commands to automation compositions" - case RUNNING to PASSIVE
adheli.tavares12a315f2022-04-05 14:21:40 +0100109-------------------------------------------------------------------------------------------------------
waynedunicanc41c4132022-04-05 09:00:02 +0100110- AUTOMATION_COMPOSITION_STATE_CHANGE message with state changed from RUNNING to PASSIVE is sent to participants
Sirisha_Manchikanti0f409502021-10-19 13:16:02 +0100111- Participant-intermediary validates the current state change
waynedunicanc41c4132022-04-05 09:00:02 +0100112- Participant-intermediary will recieve AUTOMATION_COMPOSITION_STATE_CHANGE message and sends the details of state change to participants
Sirisha_Manchikanti0f409502021-10-19 13:16:02 +0100113- Each participant performs its designated job of state change by interacting with respective frameworks
114
115Design of a PARTICIPANT_STATUS message
116--------------------------------------
117- A participant sends a scheduled PARTICIPANT_STATUS message
118- This message will hold the state and healthStatus of all the participants running actively
119- PARTICIPANT_STATUS message holds a special attribute to return Tosca definitions, this attribute is populated only in response to PARTICIPANT_STATUS_REQ
120
waynedunicanc41c4132022-04-05 09:00:02 +0100121Design of a AUTOMATIONCOMPOSITION_UPDATE_ACK message
adheli.tavares12a315f2022-04-05 14:21:40 +0100122----------------------------------------------------
waynedunicanc41c4132022-04-05 09:00:02 +0100123- A participant sends AUTOMATIONCOMPOSITION_UPDATE_ACK message in response to a AUTOMATIONCOMPOSITION_UPDATE message.
124- For each CL-elements moved to the ordered state as indicated by the AUTOMATIONCOMPOSITION_UPDATE
125- AutomationCompositionUpdateAckListener in CL-runtime collects the messages from DMaap
126- It checks the status of all automation composition elements and checks if the automation composition is primed
127- It updates the clamp-acm in DB accordingly
Sirisha_Manchikanti0f409502021-10-19 13:16:02 +0100128
waynedunicanc41c4132022-04-05 09:00:02 +0100129Design of a AUTOMATIONCOMPOSITION_STATECHANGE_ACK is similar to the design for AUTOMATIONCOMPOSITION_UPDATE_ACK