diff options
author | Liam Fallon <liam.fallon@est.tech> | 2023-04-04 14:53:48 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2023-04-04 14:53:48 +0000 |
commit | 96ecefefc978db0d504f1953a6a113ef5879a43c (patch) | |
tree | bb89263b07b04e7a7a01002b6bb537bebf76ec8b /docs/clamp/acm/api-protocol/acm-participant-protocol.rst | |
parent | 9003fbad637277dbb6aa1e8372110bdf814c4655 (diff) | |
parent | dba8c6debf395bb952e28b91b4c872045d52eccf (diff) |
Merge "Updated participant protocol docs"
Diffstat (limited to 'docs/clamp/acm/api-protocol/acm-participant-protocol.rst')
-rw-r--r-- | docs/clamp/acm/api-protocol/acm-participant-protocol.rst | 420 |
1 files changed, 36 insertions, 384 deletions
diff --git a/docs/clamp/acm/api-protocol/acm-participant-protocol.rst b/docs/clamp/acm/api-protocol/acm-participant-protocol.rst index 449e2096..2dae2b00 100644 --- a/docs/clamp/acm/api-protocol/acm-participant-protocol.rst +++ b/docs/clamp/acm/api-protocol/acm-participant-protocol.rst @@ -5,7 +5,7 @@ The ACM Automation Composition Participant Protocol ################################################### -The CLAMP Automation Composition protocol is an asynchronous protocol that is used by the CLAMP +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. @@ -18,32 +18,42 @@ The protocol supports the dialogues described below. Participant Registration and De-Registration -------------------------------------------- -Registration when a participant comes up and update of participant with Automation Composition type -information and common parameter values for its Automation Composition types. +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. -.. image:: ../images/acm-participants-protocol/participant-registering.png +.. image:: ../images/system-dialogues/RegisterParticipant.png -De-registration is executed as a participant goes down. +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”. -.. image:: ../images/acm-participants-protocol/participant-deregistration.png +.. image:: ../images/system-dialogues/DeregisterParticipant.png Automation Composition Priming and De-Priming --------------------------------------------- -When an Automation Composition is primed, the portion of the Automation Composition Type Definition -and Common Property values for the participants of each participant type mentioned in the -Automation Composition Definition are sent to the participants. +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 -.. image:: ../images/acm-participants-protocol/acm-priming.png +.. image:: ../images/system-dialogues/PrimeAcTypeOnPpnts.png -When an Automation Composition is de-primed, the portion of the Automation Composition Type -Definition and Common Property values for the participants of each participant type mentioned in -the Automation Composition Definition are deleted on participants. +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. -.. image:: ../images/acm-participants-protocol/acm-depriming.png +.. image:: ../images/system-dialogues/PrimeAcTypeMultiplePpnts.png +The ACM Runtime updates the priming information in the database. + +.. image:: ../images/system-dialogues/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. + +.. image:: ../images/system-dialogues/DeprimeOnParticipants.png + +A participant should respond for each Automation Composition Element Type, thus causing the full Automation Composition Type to become deprimed. + +.. image:: ../images/system-dialogues/DeprimeElements.png + +The ACM Runtime updates the priming information in the database. + +.. image:: ../images/system-dialogues/UpdateDeprimeInDb.png Automation Composition Update ----------------------------- @@ -72,26 +82,28 @@ The *startPhase* in the `Definition of TOSCA fundamental Automation Composition <https://github.com/onap/policy-clamp/blob/master/common/src/main/resources/tosca/AutomationCompositionTOSCAServiceTemplateTypes.yaml>`_ 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 *UNITITIALISED → PASSIVE* and from *PASSIVE → RUNNING*, +Composition. In-state changes from *UNDEPLOYED → DEPLOYED*, Automation Composition elements are started in increasing order of their startPhase. In-state -changes from *RUNNING → PASSIVE* and from *PASSIVE → UNITITIALISED*, Automation Composition +changes from *DEPLOYED → UNDEPLOYED*, Automation Composition elements are started in decreasing order of their *startPhase*. -The CLAMP runtime controls the state change process described in the diagram below. The CLAMP -runtime sends an Automation Composition state change message on DMaaP to all participants in a +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 DMaaP and start in parallel. +receive the same Automation Composition State Change message from Kafka and start in parallel. -The Participant reads each State Change Message it sees on DMaaP. If the start phase on the +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. .. image:: ../images/acm-participants-protocol/acm-state-change.png -The handling of an ACMStateChange message in each participant is as shown below. +The flow of the DEPLOY/UNDEPLOY state change messages are shown below. But the same flow is true for LOCK/UNLOCK + +.. note:: More details of the state machine are available on :ref:`ACM States <acm-states-label>` .. image:: ../images/acm-participants-protocol/acm-state-change-msg.png @@ -115,369 +127,9 @@ see the `CLAMP code at Github <https://github.com/onap/policy-clamp/tree/master/models/src/main/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant>`_ . All messages are carried on DMaaP. - -.. list-table:: - :widths: 15 10 10 15 15 35 - :header-rows: 1 - - * - Message - - Source - - Target - - Purpose - - Important Fields - - Field Descriptions - * - ParticipantRegister - - Participant - - CLAMP Runtime - - Participant registers with the CLAMP runtime - - ParticipantId - - The ID of this participant - * - - - - - - - - - ParticipantType - - The type of the participant; maps to the capabilities of the participant in Automation - Composition Type Definitions - * - ParticipantRegisterAck - - CLAMP Runtime - - Participant - - Acknowledgment of Participant Registration - - ParticipantId - - The ID of this participant - * - - - - - - - - - ParticipantType - - The type of the participant; maps to the capabilities of the participant in Automation - Composition Type Definitions - * - - - - - - - - - Result - - Success/Fail - * - - - - - - - - - Message - - A message indicating the reason for failure - * - ParticipantUpdate - - CLAMP Runtime - - Participant - - CLAMP Runtime sends Automation Composition Element Definitions and Common Parameter Values - to Participants - - ParticipantDefinitionUpdateMap - - Map with Participant ID as its key, each value on the map is an ACMElementDefintionMap - * - - - - - - - - - ACMElementDefintionMap - - List of ACMElementDefinition values for a particular participant, keyed by its Automation - Composition Element Definition ID - * - - - - - - - - - ACMElementDefinition - - An ACMElementToscaServiceTemplate containing the definition of the Automation Composition - Element and a CommonPropertiesMap with the values of the common property values for - Automation Composition Elements of this type - * - - - - - - - - - ACMElementToscaServiceTemplate - - The definition of the Automation Composition Element in TOSCA - * - - - - - - - - - CommonPropertiesMap - - A <String, String> map indexed by the property name. Each map entry is the serialized value - of the property, which can be deserialized into an instance of the type of the property. - * - ParticipantUpdateAck - - Participant - - CLAMP Runtime - - Acknowledgment of Participant Update - - ParticipantId - - The ID of this participant - * - - - - - - - - - ParticipantType - - The type of the participant; maps to the capabilities of the participant in Automation - Composition Type Definitions - * - - - - - - - - - Result - - Success/Fail - * - - - - - - - - - Message - - A message indicating the reason for failure - * - ParticipantDeregister - - Participant - - CLAMP Runtime - - Participant deregisters with the CLAMP runtime - - ParticipantId - - The ID of this participant - * - - - - - - - - - ParticipantType - - The type of the participant; maps to the capabilities of the participant in Automation - Composition Type Definitions - * - ParticipantDeregisterAck - - CLAMP Runtime - - Participant - - Acknowledgment of Participant Deegistration - - ParticipantId - - The ID of this participant - * - - - - - - - - - ParticipantType - - The type of the participant; maps to the capabilities of the participant in Automation - Composition Type Definitions - * - - - - - - - - - Result - - Success/Fail - * - - - - - - - - - Message - - A message indicating the reason for failure - * - ACMUpdate - - CLAMP Runtime - - Participant - - CLAMP Runtime sends Automation Composition Element instances and Instance Specific Parameter - Values for an Automation Composition Instance to Participants - - ACMId - - The name and version of the Automation Composition - * - - - - - - - - - ParticipantUpdateMap - - Map with Participant ID as its key, each value on the map is an ACMElementList - * - - - - - - - - - ACMElementList - - List of ACMElement values for the Automation Composition - * - - - - - - - - - ACMElement - - An ACMElement, which contains among other things a PropertiesMap with the values of the - property values for this Automation Composition Element instance and a - ToscaServiceTemplateFragment with extra concept definitions and instances that a participant - may need. - * - - - - - - - - - PropertiesMap - - A <String, String> map indexed by the property name. Each map entry is the serialized value - of the property, which can be deserialized into an instance of the type of the property. - * - - - - - - - - - ToscaServiceTemplateFragment - - A well-formed TOSCA service template containing extra concept definitions and instances that - a participant may need. For example, the Policy Participant may need policy type definitions - or policy instances to be provided if they are not already stored in the Policy Framework. - * - ACMUpdateAck - - Participant - - CLAMP Runtime - - Acknowledgment of Automation Composition Update - - ParticipantId - - The ID of this participant - * - - - - - - - - - ParticipantType - - The type of the participant; maps to the capabilities of the participant in Automation - Composition Type Definitions - * - - - - - - - - - ACMId - - The name and version of the Automation Composition - * - - - - - - - - - ACMResult - - Holds a Result and Message for the overall operation on the participant and a map of Result - and Message fields for each Automation Composition Element of the Automation Composition on - this participant - * - - - - - - - - - Result - - Success/Fail - * - - - - - - - - - Message - - A message indicating the reason for failure - * - ACMStateChange - - CLAMP Runtime - - Participant - - CLAMP Runtime asks Participants to change the state of an Automation Composition - - ACMId - - The name and version of the Automation Composition - * - - - - - - - - - currentState - - The current state of the Automation Composition - * - - - - - - - - - orderedState - - The state that the Automation Composition should transition to - * - - - - - - - - - startPhase - - The start phase to which this ACMStateChange message applies - * - ACMStateChangeAck - - Participant - - CLAMP Runtime - - Acknowledgment of Automation Composition State Change - - ParticipantId - - The ID of this participant - * - - - - - - - - - ParticipantType - - The type of the participant; maps to the capabilities of the participant in Automation - Composition Type Definitions - * - - - - - - - - - ACMId - - The name and version of the Automation Composition - * - - - - - - - - - startPhase - - The start phase to which this ACMStateChangeAck message applies - * - - - - - - - - - ACMResult - - Holds a Result and Message for the overall operation on the participant and a map of Result - and Message fields for each Automation Composition Element of the Automation Composition on - this participant - * - - - - - - - - - Result - - Success/Fail - * - - - - - - - - - Message - - A message indicating the reason for failure - * - ParticipantStatusReq - - CLAMP Runtime - - Participant - - Request that the specified participants return a ParticipantStatus message immediately - - ParticipantId - - The ID of this participant, if not specified, all participants respond. - * - ParticipantStatus - - Participant - - CLAMP Runtime - - Periodic or on-demand report for heartbeat, Participant Status, Automation Composition - Status, and Automation Composition Statistics - - ParticipantId - - The ID of this participant - * - - - - - - - - - ParticipantType - - The type of the participant; maps to the capabilities of the participant in Automation - Composition Type Definitions - * - - - - - - - - - ParticipantDefinitionUpdateMap (returned in repsonse to ParticipantStatusReq only) - - See ParticipantUpdate message above for definition of this field - * - - - - - - - - - ParticipantStatus - - The current status of the participant for monitoring - * - - - - - - - - - ParticipantStatistics - - Statistics on the participant such as uptime, or messages processed. Can include participant - specific data in a string blob that is opaque to CLAMP - * - - - - - - - - - ACMInfoMap - - A map of ACMInfo types indexed by ACMId, one entry for each Automation Composition - running on the participant - * - - - - - - - - - ACMInfo - - The ACMStatus and ACMStatistics for a given Automation Composition - * - - - - - - - - - ACMStatus - - The current status of the Automation Composition for monitoring - * - - - - - - - - - ACMStatistics - - Statistics on the Automation Composition such as uptime, or messages processed. Can include - participant specific data in a string blob that is opaque to CLAMP +.. csv-table:: ACM Messages + :file: ../files/ACM-Message-Table.csv + :header-rows: 1 End of Document |