Control Loop Policy Types Proposal #2: Use a common base Policy Type

This design proposal is to use a common base Policy Type with a common header for all possible Control Loop Policy Types. In doing so, we gain the following benefits:

  • Organization: All policies for a control loop can be organized more easily because the field that uniquely identifies the Control Loop is in a common place where CLAMP can easily find and set.

    • Problem #1 solved: All the current policy types have a different field name for the unique identity of the Control Loop

    • Problem #2 solved: All the current policy types locate that field in a different hierarchy within each policy type.

  • Extendability: Future Control Loop policy types can be designed without hard coding into CLAMP where to find the unique id for the control loop



1.0 Base Control Loop Policy Type

ALL Control Loop Policy Types derive from this so that CLAMP as well as auditing/monitoring tools can organize/find all the policies associated with a Control Loop.



ISSUE #1: Should this be a list??



Base Control Loop Datatype for ALL Control Loop Policy Types
tosca_definitions_version: tosca_simple_yaml_1_0_0 policy_types: onap.policies.controlloop.Common: derived_from: tosca.policies.Root version: 1.0.0 description: | Base policy type that is shared by all Control Loop Policy Types. Helps to organize all the policies for a Control Loop and ensure they are tied together by a common ID. Helps toward alleviating too much external knowledge required to ensure the fields contained in different types of Policies are consistent with each other. properties: id: type: String description: The unique control loop id. required: true domain: description: Identifies the domain for the Control Loop. Virtual vs Physical required: true type: TBD eventPublished: description: | Describes the event that is published when the application detects the ONSET of a Control Loop condition. For example, VES vs ControlLoopEvent required: true type: TBD topics: description: List of Dmaap topics that will be used by the ONAP components to communicate. required: true type: TBD

2.0 Example Usages of Base Control Loop Policy Type

The following shows how the base Control Loop Policy Type can be used.

2.1 How current Policy Types would derive from Base Control Loop Policy Type

As of Dublin/El Alto, we have these Policy Types that will need to derive from the base type.

  • CLAMP will be able to search for Monitoring Policy Types to associate with DCAE uS

  • CLAMP will be able to search for all possible guard and operational Policy Types



Base Control Loop Policy Types
onap.policies.controlloop.common.Monitoring: derived_from: onap.policies.controlloop.Common version: 1.0.0 description: | Common Control Loop Policy Type for all Monitoring Policy Types. This will contain shared properties that all DCAE Monitoring applications should define. properties: onap.policies.controlloop.common.monitoring.Threshold: derived_from: onap.policies.controlloop.common.Monitoring version: 1.0.0 description: Threshold Monitoring Policy Type properties: onap.policies.controlloop.common.monitoring.Collectors: derived_from: onap.policies.controlloop.common.Monitoring version: 1.0.0 description: Base Collectors Policy Type properties: onap.policies.controlloop.common.monitoring.collectors.VES: derived_from: onap.policies.controlloop.common.monitoring.Collectors version: 1.0.0 description: VES Collector Policy Type properties: onap.policies.controlloop.common.Operational: derived_from: onap.policies.controlloop.Common version: 1.0.0 description: Base Control Loop Policy Type for all Operational Policy Types properties: timeout: type: Integer description: | Overall timeout for executing all the operations. This timeout should equal or exceed the total timeout for each operation listed. required: true trigger: type: String description: Initial operation to execute upon receiving an Onset event message for the Control Loop. required: true operations: type: List description: List of operations to be performed when Control Loop is triggered. required: true entry_schema: type: onap.datatype.controlloop.Operation onap.policies.controlloop.common.operational.Apex: derived_from: onap.policies.controlloop.common.Operational type_version: 1.0.0 version: 1.0.0 description: Operational policies that can customized for Apex PDP properties: onap.policies.controlloop.operational.common.Drools: derived_from: onap.policies.controlloop.common.Operational type_version: 1.0.0 version: 1.0.0 description: Operational policies that can be customzed for Drools PDP properties: controllerName: type: String description: Drools controller properties required: false onap.policies.controlloop.common.Guard: derived_from: onap.policies.controlloop.Common version: 1.0.0 description: Base Control Loop Policy Type for all Guard Policy Types properties: actor: type: string description: Specifies the Actor required: true operation: type: string description: Specified the Operation being performed by the Actor required: true time_range: type: tosca.datatypes.TimeInterval description: An optional range of time during the day the blacklist is valid for. required: false onap.policies.controlloop.common.guard.FrequencyLimiter: derived_from: onap.policies.controlloop.common.Guard version: 1.0.0 description: Frequency limiter guard policy 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 target: type: string description: An optional specific VNF to apply this guard to. required: false onap.policies.controlloop.common.guard.Blacklist: derived_from: onap.policies.controlloop.common.Guard version: 1.0.0 description: Blacklist guard policy properties: blacklist: type: list description: List of VNF's required: true onap.policies.controlloop.common.guard.MinMax: derived_from: onap.policies.controlloop.common.Guard version: 1.0.0 description: Min/Max guard policy 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



QUESTION/ISSUE: Should Control Loop Coordination have its own base type? Or is it still a guard?

2.3 Example Policies for Scale Out Use Case



3.0 Benefits:

  • All other Control Loop Policy Types then derive from this base type

  • CLAMP is now able to search the CSAR and/or Policy Lifecycle API to find ALL possible Policy Types that derive from "onap.policies.controlloop.Root"

    • Problem solved: will not have to hard code inside the platform what Policy Types it supports.

    • Control Loop Designers can find the Control Loop Policy Types they wish to use in their control loop and pick and choose them.

      • Eg. A specific operational policy for a PDP engine (Drools vs Apex)

      • Eg. Desired guard policies

  • When DCAE becomes Model Driven, CLAMP should be able to find the Monitoring Policy Types associated with each DCAE uS

  • ONAP users can now define their own Control Loop Policy Types

    • NOTE: They will still have to create applications/controllers