Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Warning

This page is no longer updated or kept current.

For Istanbul, please see the ONAP documentation

For Jakarta, please see Defining Control Loops in TOSCA for CLAMP (Jakarta)

A Control Loop Type is defined in a TOSCA service template. A TOSCA Service Template has two parts: a definition part in the service template itself, which contains the definitions of concepts that can be used to define the types of concepts that can appear on a Toplogy Template and a Topology Template that defines a topology. See the Oasis Open TOSCA web page for more details on TOSCA.

...

Drawio
bordertrue
diagramNameFundamentalConcepts
simpleViewerfalse
linksauto
tbstyletop
lboxtrue
diagramWidth441491
revision15

The TOSCA concepts above may be declared in the TOSCA Service Template of a control loop. If the concepts already exist in the Design Time Catalogue or the Runtime Inventory, they may be omitted from a TOSCA service template that defines a control loop type.

...

Drawio
bordertrue
diagramNameStandard_CLE
simpleViewerfalse
linksauto
tbstyletop
lboxtrue
diagramWidth591791
revision46

1.2.1 Policy Control Loop Element

...

Drawio
bordertrue
diagramNameControlLoopNodeTemplate
simpleViewerfalse
linksauto
tbstyletop
lboxtrue
diagramWidth441541
revision79

To create a control loop, a user creates a TOSCA Topology Template. In the Topology Template, the user creates a TOSCA Node Template for each Control Loop Element that will be in the Control Loop Definition. Finally, the user creates the Node Template that defines the Control Loop itself, and references the Control Loop Element definitions that make up the Control Loop Definition.

...

The example Gentle Guidance control loop is illustrated in the diagram above. The domain logic for the control loop is implemented in a microservice running in Kubernetes, a policy, a CDS blueprint, and some configuration that is passed to the microservice over a REST endpoint. We want to manage the life cycle of the domain logic for our Gentle Guidance control loop using our TOSCA based Control Loop Life Cycle Management approach. To do this we create four Control Loop Element definitions, one for the Kubernetes microservice, one for the policy , one for the CDS blueprint and one or the REST configuration.

...

Code Block
languageyml
titleThe Gentle Guidance Control Loop Definition: No default parameter values
linenumberstrue
collapsetrue
tosca_definitions_version: tosca_simple_yaml_1_3
topology_template:
  node_templates:
    org.onap.domain.gentleguidance.KubernetesControlLoopElementDefinition:
      version: 1.0.0
      type: org.onap.policy.clamp.controlloop.KubernetesControlLoopElement
      type_version: 1.0.1
      description: Control loop element for the Gentle Guidance Kubernetes Microservice
    org.onap.domain.gentleguidance.RestControlLoopElementDefinition:
      version: 1.0.0
      type: org.onap.policy.clamp.controlloop.HttpControlLoopElement
      type_version: 1.0.1
      description: Control loop element for the Gentle Guidance Microservice REST configuration
    org.onap.domain.gentleguidance.PolicyControlLoopElementDefinition:
      version: 1.0.0
      type: org.onap.policy.clamp.controlloop.PolicyControlLoopElement
      type_version: 1.0.1
      description: Control loop element for the Gentle Guidance Operational Policy
 blueprint
    org.onap.domain.gentleguidance.CdsControlLoopElementDefinitionControlLoopDefinition:
      version: 1.0.0
      type: org.onap.policy.clamp.controlloop.CDSControlLoopElementControlLoop
      type_version: 1.0.1
      description: Control loop elementdefinition for the Gentle Guidance CDSdomain
 blueprint     org.onap.domain.gentleguidance.ControlLoopDefinitionproperties:
      version  elements:
1.0.0        type:- org.onap.policy.clamp.controlloop.ControlLoopdomain.gentleguidance.KubernetesControlLoopElementDefinition:1.0.0
         type_version: - org.onap.domain.gentleguidance.RestControlLoopElementDefinition:1.0.10
      description: Control loop definition for the Gentle Guidance domain
      properties:
        elements:
        - org.onap.- org.onap.domain.gentleguidance.KubernetesControlLoopElementDefinitionPolicyControlLoopElementDefinition:1.0.0
        - org.onap.domain.gentleguidance.RestControlLoopElementDefinition:1.0.0
        - org.onap.domain.gentleguidance.PolicyControlLoopElementDefinition:1.0.0
        - org.onap.domain.gentleguidance.CdsControlLoopElementDefinition:1.0.0

The code fragment below shows the TOSCA Topology Template for the Gentle Guidance domain when the default values of  parameters are defined. Please refer to the Yaml file in Github for the definitive Yaml specification.

Code Block
languageyml
titleThe Gentle Guidance Control Loop Definition: With default parameter values
linenumberstrue
collapsetrue
tosca_definitions_version: tosca_simple_yaml_1_3
topology_template:
  node_templates:
    org.onap.domain.gentleguidance.KubernetesControlLoopElementDefinition:
      version: 1.0.0
      type: org.onap.policy.clamp.controlloop.KubernetesControlLoopElement
      type_version: 1.0.1
      description: Control loop element for the Gentle Guidance Kubernetes Microservice
      properties:
        provider: Ericsson
        participantType: org.onap.policy.controlloop.participant.Kubernetes:1.0.0
        startPhase: 2
        uninitializedToPassiveTimeout: 180
        chart:
            chartId: GentleGuidance:1.0.0
            releaseName: Istanbul
            namespace: org.onap.policy.controlloop.gentleguidance

The code fragment below shows the TOSCA Topology Template for the Gentle Guidance domain when the default values of  parameters are defined. Please refer to the Yaml file in Github for the definitive Yaml specification.

Code Block
languageyml
titleThe Gentle Guidance Control Loop Definition: With default parameter values
linenumberstrue
collapsetrue
tosca_definitions_version: tosca_simple_yaml_1_3
topology_template:
  node_templates:
    org.onap.domain.gentleguidance.RestControlLoopElementDefinitionKubernetesControlLoopElementDefinition:
      version: 1.0.0
      type: org.onap.policy.clamp.controlloop.HttpControlLoopElementKubernetesControlLoopElement
      type_version: 1.0.1
      description: Control loop element for the Gentle Guidance Kubernetes Microservice
REST configuration       properties:
        provider: Ericsson
        participantType: org.onap.policy.controlloop.participant.HttpKubernetes:1.0.00
        startPhase: 2
        uninitializedToPassiveTimeout: 180
        startPhasechart:
1            baseUrlchartId: httpsGentleGuidance://101.10.10.10:12345/gentleguidancemicroservice0.0
        httpHeaders:    releaseName: Istanbul
     "Content-Type": "application/json"      namespace: org.onap.policy.controlloop.gentleguidance
   "Accept": "application/json" org.onap.domain.gentleguidance.RestControlLoopElementDefinition:
        configurationEntitiesversion: 1.0.0
      type:   org.onap.policy.clamp.controlloop.gentleguidance.setGentleGuidanceConfig:HttpControlLoopElement
      type_version: 1.0.0:1
      description: Control loop element for the Gentle Guidance Microservice configurationEntityId: org.onap.policy.controlloop.gentleguidance.setGentleGuidanceConfig:1.0.0REST configuration
      properties:
     restSequence:   provider: Ericsson
        - restRequestIdparticipantType: org.onap.policy.controlloop.gentleguidanceparticipant.setGentleGuidanceConfig.CreateGentleHttp:1.0.0
        startPhase: 1
    httpMethd: POST    baseUrl: https://10.10.10.10:12345/gentleguidancemicroservice
        httpHeaders:
          path"Content-Type": "gentleapplication/createjson"
              body:"Accept": "application/json"
        configurationEntities:
       gentleLevel: veryGentle  org.onap.policy.controlloop.gentleguidance.setGentleGuidanceConfig:1.0.0:
              gentleType: softAndFurryconfigurationEntityId: org.onap.policy.controlloop.gentleguidance.setGentleGuidanceConfig:1.0.0
               expectedResponse: 200restSequence:
            - restRequestId: org.onap.policy.controlloop.gentleguidance.setGentleGuidanceConfig.CreateGuidanceCreateGentle:1.0.0
              httpMethd: POST
              path: "guidancegentle/create"
              body:
                guidanceLevel: high           gentleLevel: veryGentle
    guidanceType: subtle           gentleType: softAndFurry
  expectedResponse: 200           org.onap.policy.controlloop.gentleguidance.updateGentleGuidanceConfig:1.0.0:expectedResponse: 200
            - configurationEntityIdrestRequestId: org.onap.policy.controlloop.gentleguidance.updateGentleGuidanceConfigsetGentleGuidanceConfig.CreateGuidance:1.0.0
              restSequencehttpMethd: POST
           -   restRequestId: org.onap.policy.controlloop.gentleguidance.updateGentleGuidanceConfig.CreateGentle:1.0.0path: "guidance/create"
              httpMethdbody:
 PUT               pathguidanceLevel: "gentle/update]"high
                bodyguidanceType: subtle
               gentleLevel: robustexpectedResponse: 200
          org.onap.policy.controlloop.gentleguidance.updateGentleGuidanceConfig:1.0.0:
            gentleTypeconfigurationEntityId: hardAndGrittyorg.onap.policy.controlloop.gentleguidance.updateGentleGuidanceConfig:1.0.0
              expectedResponserestSequence: 200
            - restRequestId: org.onap.policy.controlloop.gentleguidance.updateGentleGuidanceConfig.CreateGuidanceCreateGentle:1.0.0
              httpMethd: PUT
              path: "guidancegentle/update]"
              body:
                guidanceLevelgentleLevel: lowrobust
                guidanceTypegentleType: tersehardAndGritty
              expectedResponse: 200
    org.onap.domain.gentleguidance.PolicyControlLoopElementDefinition:        - versionrestRequestId: org.onap.policy.controlloop.gentleguidance.updateGentleGuidanceConfig.CreateGuidance:1.0.0
      type: org.onap.policy.clamp.controlloop.PolicyControlLoopElement       type_version: 1.0.1
httpMethd: PUT
     description: Control loop element for the Gentle Guidance Operational Policy
path: "guidance/update"
     properties:         providerbody:
Ericsson             participantType: org.onap.policy.controlloop.participant.Policy:1.0.0  guidanceLevel: low
     startPhase: 0         policyType: onap.policies.controlloop.operational.common.Apex:1.0.0 guidanceType: terse
              policyIdexpectedResponse: org.onap.domain.gentleguidance.policy.GentleGuidanceAssertive:1.0.0200
    org.onap.domain.gentleguidance.CdsControlLoopElementDefinitionPolicyControlLoopElementDefinition:
      version: 1.0.0
      type: org.onap.policy.clamp.controlloop.CDSControlLoopElementPolicyControlLoopElement
      type_version: 1.0.1
      description: Control loop element for the Gentle Guidance CDSOperational blueprintPolicy
      properties:
        provider: Ericsson
        participantType: org.onap.policy.controlloop.participant.CdsPolicy:1.0.0
         startPhase: startPhase: 0
        policyType: onap.policies.controlloop.operational.common.Apex:1.0.0
        cdsBlueprint: "Placeholder for the CDS blueprint"policyId: org.onap.domain.gentleguidance.policy.GentleGuidanceAssertive:1.0.0
     org.onap.domain.gentleguidance.ControlLoopDefinition:
      version: 1.0.0
      type: org.onap.policy.clamp.controlloop.ControlLoop
      type_version: 1.0.1
      description: Control loop definition for the Gentle Guidance domain
      properties:
        provider: Ericsson
        elements:
        - org.onap.domain.gentleguidance.KubernetesControlLoopElementDefinition:1.0.0
        - org.onap.domain.gentleguidance.RestControlLoopElementDefinition:1.0.0
        - org.onap.domain.gentleguidance.PolicyControlLoopElementDefinition:1.0.0
     
  - org.onap.domain.gentleguidance.CdsControlLoopElementDefinition:1.0.0

4. Creating Custom Control Loop Elements

Any organization can include their own component in the framework and use the framework and have the Policy Framework CLAMP manage the lifecycle of domain logic in their component as part of a Control Loop. To do this, a participant for the component must be developed that allows Control Loop Elements for that component to be run. To develop a participant, the participant must comply with the CLAMP Participants framework and in particular comply with The CLAMP Control Loop Automation Composition Participant Protocol. The organization must also specify a new Control Loop Element type definition in TOSCA similar to those supplied in ONAP and described in Section 1.2. This Control Loop Element type tells the CLAMP Control Loop Lifecycle management that the Control Loop Element exists and can be included in control loops. It also specifies the properties that can be specified for the Control Loop Element.

...