The CLAMP Automation Composition Participant protocol is an asynchronous protocol that is used by the CLAMP 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

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 Participant CLAMP_Runtime CLAMP_Runtime Start Participant Participant Registration Participant Registration Ack loop[over Automation Composition Type Definitions] Collect Automation Composition Element Type Definitions andCommon Property Values forParticipant Type of this Participant Participant Update[Automation Composition Element Type Definitions andCommon Property Values forParticipant Type of Participant] Store Automation Composition Element Type Definitions andCommon Property Values Participant Update Ack

De-registration is executed as a participant goes down.


Participant Participant CLAMP_Runtime CLAMP_Runtime Participant Deregistration Participant Deregistration Ack Shutdown Participant

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.


Commissioning_REST Commissioning_REST CLAMP_Runtime CLAMP_Runtime Participant Participant Prime Automation Composition Type Defintions andset values of Common Properties loop[over Participant Types in Automation Composition Type Definition] Collect Automation Composition Element Type Definitions andCommon Property Values for Participant Type Participant Update[Automation Composition Element Type Definitions andCommon Property Values for Participant Types] Store Automation Composition Element Type Definitions andCommon Property Values Participant Update Ack[from each Participant mentioned in Participant Update message]

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.


Commissioning_REST Commissioning_REST CLAMP_Runtime CLAMP_Runtime Participant Participant De-Prime Automation Composition Type Definition alt[Automation Composition Instances exist for Automation Composition Type] Cannot decommission Automation Composition Type Definition [No Automation Composition Instances exist for Automation Composition Type] Participant Update[Remove Automation Composition Element Definitionsfrom Participants in Automation Composition] Delete Automation Composition ElementType Definitions andCommon Property Values Participant Update Ack [from each Participant mentioned in Participant Update message]

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 TOSCA Defined Automation Compositions: Architecture and Design#4.1ACMVersionManagement.


Participant Participant CLAMP_Runtime CLAMP_Runtime Automation Composition Update[to all Participants in Automation Composition] Automation Composition Update Ack [from each Participant in Automation Composition]

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


Process Update Message Send Update Ack Message Process next Automation Composition Element with my ID Create Automation Composition Element Set Automation Composition Element to state UNINITIALISED Order Initiation of Automation Composition Element Pass Parameters to Automation Composition Element Wait for Initiation to complete Record Success for Update Ack message Delete Automation Composition Element Record Error for Update Ack message Check Automation Composition Element State Pass Changed Parameters to Automation Composition Element Wait for reconfiguration to complete Roll back reconfiguration All Automation Composition Elements with my Participant ID processed? yes no New Automation Composition Element? yes Automation Composition Element Initiation? success fail no RUNNING and Automation Composition Version change != patch? true falsePASSIVE and Automation Composition Version change == major? true false Automation Composition Element Reconfiguration? success fail

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 UNITITIALISED → PASSIVE and from PASSIVE → RUNNING, Automation Composition elements are started in increasing order of their startPhase. In-state changes from RUNNING → PASSIVE and from PASSIVE → UNITITIALISED, 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 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.

The Participant reads each State Change Message it sees on DMaaP. 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.


CLAMP_Runtime CLAMP_Runtime Participant Participant Build an ordered list of the Start Phases in the Automation Composition Instance alt["State Change UNITIALISED_to_PASSIVE or PASSIVE_to_RUNNING"] loop[over Start Phases list in increasing order] Automation Composition State Change[to all Participants in Automation Composition with this Start Phase] Asynchronously wait for answers from Participants Automation Composition State Change Ack [from each Participant in this Start Phase of Automation Composition] alt["State Change Ack reports success"] Log success ["State Change Ack reports an error"] Log error Reset state of Automation Composition       CLAMP_Runtime -> CLAMP_Runtime: Abort State Change operation ["State Change RUNNING_to_PASSIVE or PASSIVE_to_UNITIALISED"] loop[over Start Phases list in decreasing order] Automation Composition State Change[to all Participants in Automation Composition with this Start Phase] Asynchronously wait for answers from Participants Automation Composition State Change Ack [from each Participant in this Start Phase of Automation Composition] alt["State Change Ack reports success"] Log success ["State Change Ack reports an error"] Log error Reset state of Automation Composition       CLAMP_Runtime -> CLAMP_Runtime: Abort State Change operation Set overall state of Automation Composition @enduml

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


Process State Change Message Send State Change Ack Message Process next Automation Composition Element with my ID Change Automation Composition Element to state PASSIVE Wait for RUNNING->PASSIVE State Change to complete Record Success for State Change Ack message Record Error for State Change Ack message Change Automation Composition Element to state RUNNING Wait for PASSIVE->RUNNING State Change to complete Skip Automation Composition Element All Automation Composition Elements with my Participant ID processed? yes no State Change Message Start Phase equals Automation Composition Element start phase trueCurrent State is RUNNING? trueChange to PASSIVE? true State Change? success fail false falseCurrent State is PASSIVE? trueChange to RUNNING? true State Change? success fail false false false

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.


Participant Participant CLAMP_Runtime CLAMP_Runtime Participant Status [periodically from each Participant in all Automation Compositions]

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: https://github.com/onap/policy-clamp/tree/master/models/src/main/java/org/onap/policy/clamp/ACM/models/messages/dmaap/participant. All messages are carried on DMaaP.

MessageSourceTargetPurposeImportant FieldsField Descriptions
ParticipantRegisterParticipantCLAMP RuntimeParticipant registers with the CLAMP runtimeParticipantIdThe ID of this participant




ParticipantTypeThe type of the participant; maps to the capabilities of the participant in Automation Composition Type Definitions

ParticipantRegisterAck

CLAMP RuntimeParticipantAcknowledgment of Participant Registration

ParticipantIdThe ID of this participant
ParticipantTypeThe type of the participant; maps to the capabilities of the participant in Automation Composition Type Definitions
ResultSuccess/Fail
MessageA message indicating the reason for failure

ParticipantUpdateCLAMP RuntimeParticipantCLAMP Runtime sends Automation Composition Element Definitions and Common Parameter Values to ParticipantsParticipantDefinitionUpdateMap

Map with Participant ID as its key, each value on the map is an ACMElementDefintionMap

ACMElementDefintionMapList of ACMElementDefinition values for a particular participant, keyed by its Automation Composition Element Definition ID
ACMElementDefinitionAn 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
ACMElementToscaServiceTemplateThe definition of the Automation Composition Element in TOSCA
CommonPropertiesMapA <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


ParticipantIdThe ID of this participant
ParticipantTypeThe type of the participant; maps to the capabilities of the participant in Automation Composition Type Definitions
ResultSuccess/Fail
MessageA message indicating the reason for failure

ParticipantDeregisterParticipantCLAMP RuntimeParticipant deregisters with the CLAMP runtimeParticipantIdThe ID of this participant




ParticipantTypeThe type of the participant; maps to the capabilities of the participant in Automation Composition Type Definitions

ParticipantDeregisterAck

CLAMP RuntimeParticipantAcknowledgment of Participant Deregistration

ParticipantIdThe ID of this participant
ParticipantTypeThe type of the participant; maps to the capabilities of the participant in Automation Composition Type Definitions
ResultSuccess/Fail
MessageA message indicating the reason for failure

ACMUpdateCLAMP RuntimeParticipantCLAMP Runtime sends Automation Composition Element instances and Instance Specific Parameter Values for an Automation Composition Instance to ParticipantsACMIdThe name and version of the Automation Composition
ParticipantUpdateMap

Map with Participant ID as its key, each value on the map is an ACMElementList

ACMElementListList of ACMElement values for the Automation Composition
ACMElementAn ACMElement, which contains among other things a PropertiesMap with the values of property values for this Automation Composition Element instance and a ToscaServiceTemplateFragment with extra concept definitions and instances that a participant may need.
PropertiesMapA <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.
ToscaServiceTemplateFragmentA 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

ParticipantCLAMP RuntimeAcknowledgment of Automation Composition Update

ParticipantIdThe ID of this participant
ParticipantTypeThe type of the participant; maps to the capabilities of the participant in Automation Composition Type Definitions
ACMIdThe name and version of the Automation Composition
ACMResultHolds 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
ResultSuccess/Fail
MessageA message indicating the reason for failure

ACMStateChangeCLAMP RuntimeParticipantCLAMP Runtime asks Participants to change the state of an Automation CompositionACMId

The name and version of the Automation Composition

currentStateThe current state of the Automation Composition
orderedStateThe state that the Automation Composition should transition to
startPhaseThe start phase to which this ACMStateChange message applies

ACMStateChangeAck

ParticipantCLAMP RuntimeAcknowledgment of Automation Composition State Change

ParticipantIdThe ID of this participant
ParticipantTypeThe type of the participant; maps to the capabilities of the participant in Automation Composition Type Definitions
ACMIdThe name and version of the Automation Composition
startPhaseThe start phase to which this ACMStateChangeAck message applies
ACMResultHolds 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
ResultSuccess/Fail
MessageA message indicating the reason for failure

ParticipantStatusReqCLAMP RuntimeParticipant



Request that the specified participants return a ParticipantStatus message immediatelyParticipantIdThe 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 the 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
ACMInfoMapA map of ACMInfo types indexed by ACMId, one entry for each Automation Composition running on the participant
ACMInfoThe ACMStatus and ACMStatistics for a given Automation Composition
ACMStatusThe 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
  • No labels