...
2.2 Mapping using TOSCA Triggers
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
tosca_definitions_version: tosca_simple_yaml_1_0_0
policy_types:
onap.policies.controlloop.operational.TriggerStylePolicyType:
derived_from: tosca.policies.Root
version: 1.0.0
description: Operational Policy for Control Loop execution using Triggers
metadata:
properties:
controlLoopName:
type: string
description: The unique control loop id
required: true
timeout:
type: integer
description: Overall timeout for executing all the operations in the policy.
required: true
targets: [] # optional must be Node Types or Group Types applied to
triggers: # ?
topology_template:
policies:
-
firewall_restart:
type: onap.policies.controlloop.operational.TriggerStylePolicyType
description: vFirewall use case - APPC restart
metadata:
properties:
controlLoopName: ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a
timeout: 1200s
targets: [] # optional must be Node Templates or Groups applied to
triggers:
-
on_onset:
description: When the ONSET event is received
event_type: ControlLoopEvent
schedule:
start_time: T06:00:00Z
end_time: T23:59:59Z
target_filter:
node:
requirement:
capability:
condition:
action: # scripts?
primary: # The optional implementation artifact (i.e., the primary script file within a TOSCA CSAR file).
dependencies: # The optional ordered list of one or more dependent or secondary implementation artifacts which are referenced by the primary implementation artifact
timeout: # timeout in seconds
operation_host: # node executed on
constraint: # seems the same as condition above
period: 300s
evaluations: 3 # is this retries? The optional number of evaluations that must be performed over the period to assert the condition exists.
method: # optional statistical method name to use to perform evaluation of condition
|
Issue: The "policies" property can be confusing with the TOSCA Topology Template value "policies".
...