This page contains description Policy Types for control loops to take a baby step approach from Dublin to Frankfurt retaining a close resemblance to Dublin legacy policy types.
1. Guard Policy Type
1.1 The base schema is defined as below:
Base Policy type definition for onap.policies.controlloop.GuardExpand source
tosca_definitions_version: tosca_simple_yaml_1_0_0
policy_types:
onap.policies.controlloop.Guard:
derived_from: tosca.policies.Root
version: 1.0.0
description: Base definition of guard Policies for Control Loop Operational Policies
properties:
actor:
type: string
description: Specifies the Actor
required: true
operation:
type: string
description: Specified the Recipe
required: true
controlLoopName:
type: string
description: An optional specific control loop to apply this guard policy.
required: false
target:
type: string
description: An optional specific VNF to apply this guard to.
required: false
time_range:
type: tosca.datatypes.TimeInterval
description: An optional range of time during the day the Min/Max limit is valid for.
required: false
1.2 onap.policies.controlloop.guard.FrequencyLimiter Policy Type
Policy Typefor Frequency Limiter Guard PolicyExpand source
tosca_definitions_version: tosca_simple_yaml_1_0_0
policy_types:
onap.policies.controlloop.guard.FrequencyLimiter:
derived_from: onap.policies.controlloop.Guard
version: 1.0.0
description: Supports limiting the frequency of actions being taken by a Actor.
properties:
time_window:
type: scalar-unit.time
description: The time window to count the actions against.
required: true
limit:
type: integer
description: The limit
required: true
constraints:
- greater_than: 0
1.3 onap.policies.controlloop.guard.Blacklist Policy Type
Policy Type for Blacklist Guard PoliciesExpand source
tosca_definitions_version: tosca_simple_yaml_1_0_0
policy_types:
onap.policies.controlloop.guard.Blacklist:
derived_from: onap.policies.controlloop.Guard
version: 1.0.0
description: Supports blacklist of VNF's from performing control loop actions on.
properties:
blacklist:
type: list
description: List of VNF's
required: true
entry_schema:
type: string
1.4 onap.policies.controlloop.guard.MinMax Policy Type
Policy Type for Min/Max VF Module PoliciesExpand source
tosca_definitions_version: tosca_simple_yaml_1_0_0
policy_types:
onap.policies.controlloop.guard.MinMax:
derived_from: onap.policies.controlloop.Guard
version: 1.0.0
description: Supports Min/Max number of VF Modules
properties:
min_vf_module_instances:
type: integer
required: true
description: The minimum instances of this VF-Module
max_vf_module_instances:
type: integer
required: false
description: The maximum instances of this VF-Module
2.0 Operational Policy Type
2.1 Mapping of existing (through El Alto) Policy YAML Operational Definition
Mapping of existing Operational policy to TOSCA Policy TypeExpand source
tosca_definitions_version: tosca_simple_yaml_1_0_0
policy_types:
type: onap.policies.controlloop.Operational
version: 1.0.0
description: Operational Policy for Control Loop execution
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
abatement:
type: boolean
description: Whether an abatement will be expected for the control loop.
required: true
default: false
triggerOperation:
type: string
description: Id of the operation to be triggered when receiving an Onset event
required: true
operations:
type: list
description: List of operations executed upon receiving an Onset event for the Control Loop.
required: true
entry_schema:
type: onap.datatype.controlloop.operational policies
data_types:
onap.datatype.controlloop.targettypes:
derived_from: tosca.datatypes.Root
version: 1.0.0
description: Definition of the target type for operations during control loops
properties:
target:
type: String
description: The type target the operation is performed against.
required: true
constraints:
valid_values: [VNF, VM, VNFC, VFMODULE]
resources:
type: String
description: |
The resource in which the operation is be performed against. By default,
an onset event will contain resource identification which should be used
for the operation (if applicable) if this field is missing.
onap.datatype.controlloop.operationalpolicies:
derived_from: tosca.datatypes.Root
version: 1.0.0
description: Policy definitions for taking actions during a Control Loop event
properties:
id:
type: String
description: ID for the policy. Used by triggerPolicy and final_* events to indicate next policy to enforce.
required: true
description:
type: String
description: A user-friendly description of the policy
required: false
actor:
type: String
description: The actor that will perform the operation
required: true
operation:
type: String
description: The operation the actor should perform on the target
required: true
target:
description: The target this operation is performed against
required: true
entry_schema:
type: onap.datatype.controlloop.targettypes
payload:
type: Map
description:
required: false
entry_schema:
type: String
timeout:
type: Integer
description: The amount of time for the actor to perform the operation.
required: true
success:
type: String
description: Points to the operation to invoke on success.
required: false
default: final_success
failure:
type: String
description: Points to the operation to invoke on Actor operation failure.
required: false
default: final_failure
failure_timeout:
type: String
description: Points to the operation to invoke when the time out for the operation occurs.
required: false
default: final_failure_timeout
failure_retries:
type: String
description: Points to the operation to invoke when the current operation has exceeded its max retries.
required: false
default: final_failure_retries
failure_exception:
type: String
description: Points to the operation to invoke when the current operation causes an exception.
required: false
default: final_failure_exception
failure_guard:
type: String
description: Points to the operation to invoke when the current operation is blocked due to guard policy enforcement.
required: false
default: final_failure_guard
Issue: The "policies" property can be confusing with the TOSCA Topology Template value "policies".
Pamela Dragosh - use "operations" instead since it really is a set of operations that are really being enforced.
Issue: How to ensure that CLAMP does not have to hard-code the meaning of properties. Specifically, success, failure, failure_timeout etc. - need to point to other actor/recipe's to be triggered/executed.
Issue: How to ensure that CLAMP does not have to hard-code where CSAR details need to be populated in the policy. Eg. Target Type
Need to use defaults, descriptions, constraints, required fields
- Pam and Liam will work on Operational policies to look like Seb's JSON schema so Seb can test it out. Then identify next problem to solve.
Issue: TOSCA Constraints would be nice to have something with suggested values, so the policy isn't locked into a set of values. Example is "actors" - ONAP has a set of actors, but it would be nice to be able to extend to other internal actors companies support.
# REST of policy ommitted for brevity
onap.datatype.controlloop.operationalpolicies:
derived_from: tosca.datatypes.Root
version: 1.0.0
description: Policy definitions for taking actions during a Control Loop event
properties:
# other properties ommitted for brevity
actor:
type: String
description: The actor that will perform the operation
required: true
constraints:
possible_values: [SO, SDNC, APPC, VFC, SNDR, CDS]
Issue: TOSCA does NOT have a way to relate properties together. For example, if the actor property is selected as APPC, then the contraints (eg possible values) for the operation property SHOULD be "restart", "reboot", "modifyConfig". How can that be specified?
Issue: Can/Should we consolidate onap.policies.Operational into a common policy type and then allow Drools and Apex (or be extendable to companies ingesting ONAP) to be derived_from that policy.