You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 111 Next »

The CLAMP Control Loop Participant protocol is an asynchronous protocol that is used by the CLAMP runtime to coordinate life cycle management of Control Loop 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 control loop type information and common parameter values for its control loop types.


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

Control Loop Priming and De-Priming

When a control loop is primed, the portion of the Control Loop Type Definition and Common Property values for the participants of each participant type mentioned in the Control Loop Definition are sent to the participants.


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

When a control loop is de-primed, the portion of the Control Loop Type Definition and Common Property values for the participants of each participant type mentioned in the Control Loop Definition are deleted on participants.


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

Control Loop Update

Control Loop Update handles creation, change, and deletion of control loops on participants. Change of control loops uses a semantic versioning approach and follow the semantics described on the page TOSCA Defined Control Loops: Architecture and Design#4.1ControlLoopVersionManagement.


Participant Participant CLAMP_Runtime CLAMP_Runtime Control Loop Update[to all Participants in Control Loop] Control Loop Update Ack [from each Participant in Control Loop]

The handling of a ControlLoopUpdate message in each participant is as shown below.


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

Control Loop State Change

This dialogue is used to change the state of Control Loops and their Control Loop Elements. the CLAMP Runtime sends a Control Loop State Change message on the control loop to all participants. Participants that have Control Loop Elements in that Control Loop attempt an update on the state of the control loop elements they have for that control loop, and report the result back.

The startPhase in the Definition of TOSCA fundamental Control Loop Types is particularly important in control loop state changes because sometime the user wishes to control the order in which the state changes in Control Loop Elements in a control loop. In state changes from UNITITIALISED → PASSIVE and from PASSIVE → RUNNING, control loop elements are started in increasing order of their startPhase. In state changes from RUNNING → PASSIVE and from PASSIVE → UNITITIALISED, control loop elements are started in decreasing order of their startPhase.

The CLAMP runtime controls the state change process described in the diagram below.


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

The handling of a ControlLoopStateChange message in each participant is as shown below.


Process State Change Message Send State Change Ack Message Process next Control Loop Element with my ID Change Control Loop 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 Control Loop Element to state RUNNING Wait for PASSIVE->RUNNING State Change to complete All Control Loop Elements with my Participant ID processed? yes no Current 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

Control Loop Monitoring and Reporting

This dialogue is used as a heartbeat mechanism for participants, to monitor the status of Control Loop Elements, and to gather statistics on control loops. 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 Control Loops]

Messages

The CLAMP Control Loop 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/controlloop/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 Control Loop Type Definitions

ParticipantRegisterAck

CLAMP RuntimeParticipantAcknowledgement of Participant Registration

ParticipantIdThe ID of this participant
ParticipantTypeThe type of the participant, maps to the capabilities of the participant in Control Loop Type Definitions
ResultSuccess/Fail
MessageMessage indicating reason for failure

ParticipantUpdateCLAMP RuntimeParticipantCLAMP Runtime sends Control Loop Element Definitions and Common Parameter Values to ParticipantsParticipantDefinitionUpdateMap

Map with Participant ID as its key, each value on the map is a ControlLoopElementDefintionMap

ControlLoopElementDefintionMapList of ControlLoopElementDefinition values for a particular participant, keyed by its Control Loop Element Definition ID
ControlLoopElementDefinitionA ControlLoopElementToscaServiceTemplate containing the definition of the Control Loop Element and a CommonPropertiesMap with the values of the common property values for Control Loop Elements of this type
ControlLoopElementToscaServiceTemplateThe definition of the Control Loop 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


Acknowledgement of Participant Update


ParticipantIdThe ID of this participant
ParticipantTypeThe type of the participant, maps to the capabilities of the participant in Control Loop Type Definitions
ResultSuccess/Fail
MessageMessage indicating 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 Control Loop Type Definitions

ParticipantDeregisterAck

CLAMP RuntimeParticipantAcknowledgement of Participant Deegistration

ParticipantIdThe ID of this participant
ParticipantTypeThe type of the participant, maps to the capabilities of the participant in Control Loop Type Definitions
ResultSuccess/Fail
MessageMessage indicating reason for failure

ControlLoopUpdateCLAMP RuntimeParticipantCLAMP Runtime sends Control Loop Element instances and Instance Specific Parameter Values for a Control Loop Instance to ParticipantsControlLoopIdThe name and version of the Control Loop
ParticipantUpdateMap

Map with Participant ID as its key, each value on the map is a ControlLoopElementList

ControlLoopElementListList of ControlLoopElement values for the Control Loop
ControlLoopElementA ControlLoopElement, which contains among other things a PropertiesMap with the values of the the property values for this Control Loop 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.

ControlLoopUpdateAck

ParticipantCLAMP RuntimeAcknowledgement of Control Loop Update

ParticipantIdThe ID of this participant
ParticipantTypeThe type of the participant, maps to the capabilities of the participant in Control Loop Type Definitions
ControlLoopIdThe name and version of the Control Loop
ControlLoopResultHolds a Result and Message for the overall operation on the participant and a map of Result and Message fields for each Control Loop Element of the control loop on this participant
ResultSuccess/Fail
MessageMessage indicating reason for failure

ControlLoopStateChangeCLAMP RuntimeParticipantCLAMP Runtime asks Participants to change the state of a Control LoopControlLoopId

The name and version of the Control Loop

currentStateThe current state of the Control Loop
orderedStateThe state that the Control Loop should transition to

ControlLoopStateChangeAck

ParticipantCLAMP RuntimeAcknowledgement of Control Loop State Change

ParticipantIdThe ID of this participant
ParticipantTypeThe type of the participant, maps to the capabilities of the participant in Control Loop Type Definitions
ControlLoopIdThe name and version of the Control Loop
ControlLoopResultHolds a Result and Message for the overall operation on the participant and a map of Result and Message fields for each Control Loop Element of the control loop on this participant
ResultSuccess/Fail
MessageMessage indicating 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, Control Loop Status, and Control Loop Statistics






ParticipantId
The ID of this participant
ParticipantType
The type of the participant, maps to the capabilities of the participant in Control Loop 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 up time, or messages processed. Can include participant specific data in a string blob that is opaque to CLAMP
ControlLoopInfoMapA map of ControlLoopInfo types indexed by ControlLoopId, one entry for each control loop running on the participant
ControlLoopInfoThe ControlLoopStatus and ControlLoopStatistics for a given control loop
ControlLoopStatusThe current status of the control loop for monitoring
ControlLoopStatistics
Statistics on the control loop such as up time, or messages processed. Can include participant specific data in a string blob that is opaque to CLAMP
  • No labels