Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The CLAMP runtime controls the state change process described in the diagram below. The CLAMP runtime sends a Control Loop State Change message on DMaaP to all participants in a particular Start Phase so, in each state change multiple Control Loop State Change messages are sent, one for each Start Phase in the control loop. If more than one Control Loop Element has the same Start Phase, those Control Loop Elements receive the same Control Loop 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 Control Loop State Change message matches the Start Phase of the Control Loop Element, the participant processes the State Change message. Otherwise the participant ignores the message.


PlantUML Macro
@startuml
activate CLAMP_Runtime
CLAMP_Runtime -> CLAMP_Runtime: Build an ordered list of the Start Phases in the Control Loop Instance
deactivate CLAMP_Runtime

alt "State Change UNITIALISED_to_PASSIVE or PASSIVE_to_RUNNING"
  loop over Start Phases list in increasing order 
    CLAMP_Runtime -> Participant: Control Loop State Change\n[to all Participants in Control Loop with this Start Phase]
    CLAMP_Runtime -> CLAMP_Runtime: Asynchronously wait for answers from Participants
    CLAMP_Runtime <- Participant: Control Loop State Change Ack [from each Participant in this Start Phase of Control Loop]
    alt "State Change Ack reports success"
      CLAMP_Runtime -> CLAMP_Runtime: Log success
    else "State Change Ack reports an error"
      CLAMP_Runtime -> CLAMP_Runtime: Log error
      CLAMP_Runtime -> CLAMP_Runtime: Reset state of Control Loop
      CLAMP_Runtime -> CLAMP_Runtime: Abort State Change operation
    end 
  end
else "State Change RUNNING_to_PASSIVE or PASSIVE_to_UNITIALISED"
 loop over Start Phases list in decreasing order
    CLAMP_Runtime -> Participant: Control Loop State Change\n[to all Participants in Control Loop with this Start Phase]
    CLAMP_Runtime -> CLAMP_Runtime: Asynchronously wait for answers from Participants
    CLAMP_Runtime <- Participant: Control Loop State Change Ack [from each Participant in this Start Phase of Control Loop]
    alt "State Change Ack reports success"
      CLAMP_Runtime -> CLAMP_Runtime: Log success
    else "State Change Ack reports an error"
      CLAMP_Runtime -> CLAMP_Runtime: Log error
      CLAMP_Runtime -> CLAMP_Runtime: Reset state of Control Loop
      CLAMP_Runtime -> CLAMP_Runtime: Abort State Change operation
    end 
  end
end

CLAMP_Runtime -> CLAMP_Runtime: Set overall state of Control Loop
@enduml

...

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
startPhaseThe start phase to which this ControLoopStateChange message applies

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
startPhaseThe start phase to which this ControLoopStateChangeAck message applies
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

...