This page gives a short overview of how Policy is modelled in the TOSCA Simple Profile in YAML.

TOSCA defines three concepts for Policy: Policy Type, Policy, and Trigger.

1. Policy Type

  • its properties, which define the type of configuration parameters that the policy takes
  • its targets, which define the node types and/or groups to which the policy type applies
  • its triggers, which specify the conditions in which policies of this type are fired

2. Policy

  • its properties, which define the values of the configuration parameters that the policy takes
  • its targets, which define the node types and/or group types to which the policy type applies

Note that policy triggers are specified on the Policy Type definition and are not specified on the Policy itself.

3. Trigger

A Trigger defines an event, condition, and action that is used to initiate execution of a policy associated with it. The definition of the Trigger allows specification of the type of events to trigger on, the filters on those events, conditions and constraints for trigger firing, the action to perform on triggering, and various other parameters.

  • its event_type, which defines the name of the event that fires the policy
  • its schedule, which defines the time interval in which the trigger is active
  • its target_filter, which defines specific filters for firing such as specific characteristics of the nodes or relations for which the trigger should or should not fire
  • its condition, which defines extra conditions on the incoming event for firing the trigger
  • its constraint, which defines extra conditions on the incoming event for not firing the trigger
  • its period, which defines the period to use for evaluating conditions and constraints
  • its evaluations, which defines the number of evaluations that must be performed over the period to assert the condition or constraint exists
  • its method, the method to use for evaluation of conditions and constraints
  • its action, the workflow or operation to invoke when the trigger fires

Note that how a Trigger actually works with a Policy is not clear from the specification.

  • No labels