A policy definition defines a policy that can be associated with a TOSCA topology or top-level entity definition (e.g., group definition, node template, etc.).
The following represents a policy definition:
description: Apply my placement policy to my application’s servers
targets: [ my_server_1, my_server_2 ]
# remainder of policy definition left off for brevity
Policy definitions have one the following grammars:
<map of string>
In the above grammar, the pseudo values that appear in angle brackets have the following meaning:
- policy_name: represents the required symbolic name of the policy as a string.
- policy_type_name: represents the name of the policy the definition is based upon.
- policy_description: contains an optional description of the policy.
- property_assignments: represents the optional list of property assignments for the policy definition that provide values for properties defined in its declared Policy Type.
- list_of_policy_targets: represents the optional list of names of node templates or groups that the policy is to applied to.
- list_of_trigger_definitions: represents the optional list of trigger definitions for the policy.
The following is the list of recognized keynames for a TOSCA policy definition:
The required name of the policy type the policy definition is based upon.
The optional description for the policy definition.
map of string
Defines a section used to declare additional metadata information.
An optional list of property value assignments for the policy definition.
An optional list of valid Node Templates or Groups the Policy can be applied to.