Control loop in CLAMP¶
There is 2 control loop levels in CLAMP:
- Control loop template: This is created from the DCAE blueprint (designed in the DCAE designer), and distributed by SDC to CLAMP.
- Control loop instance: Based on the template, it represents a physical control loop in the platform related to a service and a VNF.
- This is created in CLAMP when receiving the SDC notification, as this one is related to a specific service/vnf.
There is no way to design a control loop from scratch in CLAMP, you can only configure it and manage its life-cycle. For more info on how to design the service in SDC, check this: https://wiki.onap.org/display/DW/CLAMP+videos#CLAMPvideos-DesignpartinSDC
There is a specific menu to open distributed control loops in CLAMP UI.
Please note that the option “Create CL” can be used to create a control loop from the template distributed by SDC, you can therefore instantiate it for another service/vnf
Once you click on “Open CL”, this dialog box is shown
Once the distributed control loop has been chosen, the control loop is shown to the user. From this view user can start configure empty control loop using Closed loop modeller.
Closed loop modeler has 3 main parts:
- Loop configuration view
- Visualizes event flow in Control Loop. This view is auto-generated by Clamp. To generate it Clamp parses DCAE_INVENTORY_BLUEPRINT from CSAR distributed by SDC. It Always consists of VES -> <nodes from blueprint> -> OperationalPolicy. Not all nodes are visualized. Only those with type dcae.nodes.*
- Loop status
- Visualizes status of opened loop.
- Loop logs
- Table with log data of opened loop
Control Loop properties¶
In Dublin release this view shows what are deployment parameters or control Loop. To open it from Closed Loop menu select Properties CL
This opens a box with JSON object. It contains deployment parameters extracted from DCAE_INVENTORY_BLUEPRINT. It’s not recommended to edit this JSON. Each of this parameters should be available in view shown to deploy analytic application.
Operational and Guard policy properties¶
Operational policy is a parametrized drools (in Dublin) rule with logic performing action on resource. User can’t chose his own rule. Clamp always tries to create operational policy that bases on rule bind with ClosedLoopControlName attribute available in Policy dictionary.
There is only one operational policy per control loop. More about operational policies can be found here Control Loop Operational Policy.
Guard policy is policy securing operational policy calls. It defines a set of constraints that have to be matched before running operational policy. More about guard policies can be found here Creating and Using Guard Policies.
To configure operational and guard policy user has to click OperationalPolicy box.
Once clicked, it’s possible to configure operational policy. Policy can have child policies, one per Recipe.
Parent policy name
Global time limit for this operational policies
Specifies whether policy is abated
Unique id for Control Loop.
- Button for creating child/parent policies
Child/parent policies are policies that depend on one another under certain circumstances (check point 12.)
Unique id of Policy. (Clamp internal)
- Recipe/Operation triggered on controller/orchestrator
This recipe will be used by policy drools PDP when sending request to controller/orchestrator. E.g. in case of Health-Check is selected here and APPC as actor PDP will trigger APPC LCM API triggering health-check operation.
List of options is predefined in Clamp code and can’t be modified. Possible options:
- VF Module Create
- VF Module Delete
Maximum amount of retries that policy takes when triggering action
Timeout for this operational policy
- Actor used to perform action. (Orchestrator/Controller)
Actor that will be used by drools PDP to perform action. Possible options:
Payload required by actor to perform an action
- Set of fields describing child/parend policies dependency.
E.g. when health-check receives timeout failure restart could be called.
Set of fields specifying resource. On this resource Operational Policy should perform an action
Checkbox enabling/disabling guard policy for this operational policy
Guard Policy type (frequency limited or min max)
Set of guard policy specific fields. Please check Creating and Using Guard Policies.
Micro-service policy properties¶
Boxes between VES and OperationalPolicy are generated from blueprint. They can be one of ONAP predefined analytic microservices or custom analytics. Each of the boxes is clickable. Microservice configuration view is generated using Policy Type assigned to selected microservice. Clamp by default assumes that microservices have policy type onap.policies.monitoring.cdap.tca.hi.lo.app.
After clicking microservice box Clamp opens popup dialog. Example popup dialog for microservice with default type looks like:
Saving Control loop¶
Policies are saved localy in Clamp after each configuration change
Submitting the Control loop to policy¶
In the “Manage Menu”, the submit action can be used to send the configuration to policy engine.
If everything is successful, this changes the status to “Submitted”. Clamp should also show proper logs in logs view.
After Policies are submitted they should be visible in Policy PAP component. Please check Policy GUI
Deploy/undeploy the Control Loop to DCAE¶
Once sent to policy engine, Clamp can ask to DCAE to deploy the micro service
This opens a window where the parameters of the DCAE micro service can be configured/tuned. The policy_id is automatically generated by Clamp in the previous steps.
Once deployed on DCAE the status Control loop status goes to ACTIVE, it can then be Undeployed/Stopped or even Updated (this is to push new policies on policy engine)