The ACM Automation Composition Participant Protocol

The ACM Automation Composition protocol is an asynchronous protocol that is used by the ACM runtime to coordinate lifecycle management of Automation Composition instances. The protocol supports the functions described in the sections below.

Protocol Dialogues

The protocol supports the dialogues described below.

Participant Registration and De-Registration

Participant Registration is performed by a Participant when it starts up. It registers its ID and the ACM Element Types it supports with the ACM runtime.

../../../_images/RegisterParticipant.png

Participant Deregistration is performed by a Participant when it shuts down. It deregisters its ID and type with the ACM runtime. The participant should already have cleared down all its’ ACM Element instances and set their states to “Not In Service”.

../../../_images/DeregisterParticipant.png

Automation Composition Priming and De-Priming

The Priming operation sends Automation Composition Types and common property values to participants for each Automation Composition Element Type in the Automation Composition Type. The ParticipantPrime message type is sent to trigger priming and depriming in participants in participants

../../../_images/PrimeAcTypeOnPpnts.png

A participant should respond for each Automation Composition Element Type, thus causing the full Automation Composition Type to become primed. Note that if more than one participant can support an Automation Composition Element Type the ACM Runtime uses the participant in the first response it receives for that Automation Composition Element Type.

../../../_images/PrimeAcTypeMultiplePpnts.png

The ACM Runtime updates the priming information in the database.

../../../_images/PrimeInfoUpdatedInDb.png

The Depriming operation removes Automation Composition Types and common property values on participants for each Automation Composition Element Type in the Automation Composition Type.

../../../_images/DeprimeOnParticipants.png

A participant should respond for each Automation Composition Element Type, thus causing the full Automation Composition Type to become deprimed.

../../../_images/DeprimeElements.png

The ACM Runtime updates the priming information in the database.

../../../_images/UpdateDeprimeInDb.png

Automation Composition Update

Automation Composition Update handles creation, change, and deletion of Automation Compositions on participants. Change of Automation Compositions uses a semantic versioning approach and follows the semantics described on the page 4.1 Management of Automation Composition Instance Configurations.

../../../_images/acm-update.png

The handling of an ACMUpdate message in each participant is as shown below.

../../../_images/acm-update-msg.png

Automation Composition State Change

This dialogue is used to change the state of Automation Compositions and their Automation Composition Elements. The CLAMP Runtime sends an Automation Composition State Change message on the Automation Composition to all participants. Participants that have Automation Composition Elements in that Automation Composition attempt an update on the state of the Automation Composition elements they have for that Automation Composition, and report the result back.

The startPhase in the Definition of TOSCA fundamental Automation Composition Types is particularly important in Automation Composition state changes because sometimes the user wishes to control the order in which the state changes in Automation Composition Elements in an Automation Composition. In-state changes from UNDEPLOYED → DEPLOYED, Automation Composition elements are started in increasing order of their startPhase. In-state changes from DEPLOYED → UNDEPLOYED, Automation Composition elements are started in decreasing order of their startPhase.

The ACM runtime controls the state change process described in the diagram below. The ACM runtime sends an Automation Composition state change message on the messaging system (e.g. Kafka) to all participants in a particular start phase so, in each state change multiple Automation Composition State Change messages are sent, one for each start phase in the Automation Composition. If more than one Automation Composition Element has the same start phase, those Automation Composition Elements receive the same Automation Composition State Change message from Kafka and start in parallel.

The Participant reads each State Change Message it sees on Kafka. If the start phase on the Automation Composition State Change message matches the Start Phase of the Automation Composition Element, the participant processes the state change message. Otherwise, the participant ignores the message.

../../../_images/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 and DELETE

Note

More details of the state machine are available on ACM States

../../../_images/acm-state-change-msg.png

Automation Composition Monitoring and Reporting

This dialogue is used as a heartbeat mechanism for participants, to monitor the status of Automation Composition Elements, and to gather statistics on Automation Compositions. The ParticipantStatus message is sent periodically by each participant. The reporting interval for sending the message is configurable.

../../../_images/acm-monitoring.png

Messages

The CLAMP Automation Composition Participant Protocol uses the following messages. The descriptions below give an overview of each message. For the precise definition of the messages, see the CLAMP code at Github . All messages are carried on DMaaP.

ACM Messages

Message

Source

Target

Purpose

Important Fields

Field Descriptions

ParticipantRegister

Participant

ACM Runtime

Participant registers with the ACM runtime

participantId

The ID of this participant – in UUID format

participantSupportedElementTypes

A list of element types that this participant supports

ParticipantRegisterAck

ACM Runtime

Participant

Acknowledgment of Participant Registration

participantId

The ID of this participant – in UUID format

Result

Success/Fail

Message

A message indicating the reason for failure

ParticipantDeregister

Participant

ACM Runtime

Participant deregisters with the ACM runtime

participantId

The ID of this participant – in UUID format

ParticipantDeregisterAck

ACM Runtime

Participant

Acknowledgment of Participant Deegistration

participantId

The ID of this participant – in UUID format

Result

Success/Fail

Message

A message indicating the reason for failure

ParticipantPrime

ACM Runtime

Participant

Trigger priming/depriming in the participant

participantId

The ID of this participant – in UUID format

participantDefinitionUpdates

Contains AC element definition values for a particular participant

Result

Success/Fail

Message

A message indicating the reason for failure

ParticipantPrimeAck

Participant

ACM Runtime

Message to confirm participant has been primed/deprimed

participantId

The ID of this participant – in UUID format

Result

Success/Fail

Message

A message indicating the reason for failure

ParticipantStatusReq

ACM Runtime

Participant

Message sent to reques a status update from the participant

participantId

The ID of the participant to request update from – in UUID format

messageType

Enum indicating the type of message PARTICIPANT_STATUS_REQ

ParticipantStatus

Participant

ACM Runtime

Status update message

state

Enum indicating the current state of the participant

participantDefinitionUpdates

A list of ParticipantDefinition updates, returned in response to ParticipantStatusReq only

automationCompositionInfoList

List of AutomationCompositionInfo types with AutomationCompositionId and its state

participantSupportedElementTypes

Ac element types that this participant is capable for deployinh/supporting

AutomationCompositionDeploy

ACM Runtime

Participant

Message to request change state of composition to DEPLOY

participantUpdatesList

A list of ParticipantUpdates instances which carries details of an updated participant.

startPhase

Integer indicating the start up order of the elements

participantId

UUID indicating the participant the message is intended for

AutomationCompositionDeployAck

Participant

ACM Runtime

Message to acknowledge that deploy or state change message has been received by participant

automationCompositionResultMap

A map with AutomationCompositionElementID as its key, and a pair of result and message as value per AutomationCompositionElement

automationCompositionId

The id of the automation composition related to this message

AutomationCompositionStateChange

ACM Runtime

Participant

Message to request change state of composition to states other than DEPLOY

deployOrderedState

Enum indicating the deployment state being requested

lockOrderedState

Enum indicating the lock state being requested

startPhase

Integer indicating the start up order of the elements

participantId

UUID indicating the participant the message is intended for

End of Document