Merge "update docs flow"
[clamp.git] / docs / user-guide.rst
index dca5bb8..b3c1535 100644 (file)
 .. http://creativecommons.org/licenses/by/4.0
 .. Copyright (c) 2017-2018 AT&T Intellectual Property.  All rights reserved.
 
-Open Closed loop in CLAMP
--------------------------
-There is 2 closed loop levels in CLAMP:
-- Closed loop template: This is created from the DCAE blueprint (designed in the DCAE designer), and distributed by SDC to CLAMP.
-- Closed loop instance: Based on the template, it represents a physical closed 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 closed loop from scratch in CLAMP, you can only configure it and manage its life-cycle.
+Control loop in CLAMP
+---------------------
+There are 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.
+
+There is no way to design the microservice components of the 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 closed loops in CLAMP UI. 
 
-|clamp-open-menu|
+There is a specific menu to view the available Control loop templates.
+
+|clamp-template-menu|
+
+
+Each microservice policies and operational policies is related to a Policy Model.
+Clamp either communicates with Policy Engine periodically to download the available Policy Models automatically or user can upload the Policy Model manually.
+Policy Models related operations could be found under Policy Models menu.
+
+|clamp-policy-model-menu|
+
+
+Under the menu *Loop Instance*, there's a list of actions to perform regarding to the loops.
+
+|clamp-loop-menu|
+
+
+Option *Create* creates the loop from the templates distributed by SDC.
+
+|clamp-create-loop|
+
+
+Option *Open* opens the saved loops. Once the distributed control loop has been chosen, the control loop is shown to the user.
+
+|clamp-open-loop|
+
+
+Option *Close* will close the current opened loop.
 
-Please note that the option "Create CL" can be used to create a closed 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
+Option *Modify* opens the window to add/remove different Operational Policies to the loop.
+Tab *Add Operational Policies* lists all the available operational policies.
+Click *Add* button to add the selected operational policies to the loop.
 
-|clamp-open-box|
+|clamp-add-operational-policies|
 
-Once the distributed closed loop has been chosen, the closed loop is shown to the user
+Tab *Remove Operational Policies* lists all the operational policies added to the loop.
+Click *Remove* button to remove the selected operational policies from the loop.
 
-|clamp-opened-closed-loop|
+|clamp-remove-operational-policies|
 
-Closed Loop properties
-----------------------
-You can check to which service/vnf the closed loop has been associated in SDC.
+
+Once opened, the user can start configure empty control loop using **Closed loop modeller**.
+
+|clamp-opened-loop|
+
+
+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.\***
+    |blueprint-node|
+
+#. 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 *Loop Instance* menu select *Properties*
 
 |clamp-menu-prop|
 
-This opens a box that gives the properties set during the SDC notification deployment in CLAMP.
-Do not change those settings
+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.
 
 |clamp-prop-box|
 
+
 Operational policy properties
------------------------------
-The box "policy" is clickable, so the operational policies can be defined.
-By clicking on the button "New Policy", it's possible to add new operational policies that can chosen in the configuration policy. 
+---------------------------------------
+Operational policies are added by the user using *Modify* window. The configuration view is generated using Policy Type assigned to selected operational policy.
+
+To configure operational policies, user has to click the corresponding operational policy boxes. Example popup dialog for operational policy looks like:
 
-|clamp-op-policy-box|
+|clamp-op-policy-box-policy|
 
-Once clicked, it's possible to configure each operational policy that can also contain multiple "sub policies", one per Recipe
+Operations and payload for CDS actor is fetched from CDS.
+Clamp receives CDS blueprint name and version information from sdnc_model_name and sdnc_model_version properties in CSAR distributed by SDC and queries CDS to get list of operations and payload for the corresponding CDS blueprint.
 
-|clamp-op-policy-box-policy1|
+|clamp-cds-operation|
 
-Configuration policy properties
+Micro-service policy properties
 -------------------------------
-The box "tca" is clickable, so the TCA configuration policy can be defined.
-In that popup dialog, multiple Thresholds can be defined, the operational policies defined previously can be chosen and set in the "Policy" field. 
-|clamp-config-policy-tca1|
+Boxes between `VES` and `Operational Policies` 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**.
 
-Saving Closed loop
-------------------
-Once all properties have been defined for all policies, the closed loop must be saved.
+After clicking microservice box Clamp opens popup dialog. Example popup dialog for microservice with default type looks like:
 
-|clamp-save-cl|
+|clamp-config-policy-tca|
 
-Submitting the Closed loop to policy
-------------------------------------
-In the "Manage Menu", the submit action can be used to send the configuration to policy engine.
-The "Validation test" can be used to check the data configured in the closed loop without sending anything to policy engine.
 
-|clamp-submit-cl|
 
-If everything is successful, this changes the status to "Distributed" 
+In the *Loop Operations* menu, lists the operations to be perform to the loop.
 
-|clamp-distributed|
+|clamp-loop-operation-menu|
 
-Deploy/undeploy the Closed loop to DCAE 
----------------------------------------
-Once sent to policy engine, Clamp can ask to DCAE to deploy the micro service
 
-|clamp-deploy|
+Submitting the Control loop to policy
+-------------------------------------
+The SUBMIT operation can be used to send the configuration to policy engine.
+If everything is successful, the status to the policy will become *SENT*. Clamp should also show proper logs in logs view.
+
+|clamp-policy-submitted|
+
+After Policies are submitted they should be visible in Policy PAP component.
+Please check  `Policy GUI <https://docs.onap.org/en/dublin/submodules/policy/engine.git/docs/platform/policygui.html>`_
+
+
+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.
 
 |clamp-deploy-params|
 
-Once deployed on DCAE the status Closed loop status goes to ACTIVE, it can then be Undeployed/Stopped or even Updated (this is to push new policies on policy engine)
-
-|clamp-undeploy|
+Once deployed on DCAE the status of DCAE goes to *MICROSERVICE_INSTALLED_SUCCESSFULLY*, it can then be Undeployed/Stopped/Restart.
 
-.. |clamp-open-menu| image:: images/user-guide/open-menu.png
-.. |clamp-open-box| image:: images/user-guide/open-box.png
-.. |clamp-opened-closed-loop| image:: images/user-guide/opened-closed-loop.png
+.. |clamp-template-menu| image:: images/user-guide/template-menu.png
+.. |clamp-policy-model-menu| image:: images/user-guide/policy-model-menu.png
+.. |clamp-loop-menu| image:: images/user-guide/loop-menu.png
+.. |clamp-create-loop| image:: images/user-guide/create-loop.png
+.. |clamp-open-loop| image:: images/user-guide/open-loop.png
+.. |clamp-add-operational-policies| image:: images/user-guide/add-operational-policies.png
+.. |clamp-remove-operational-policies| image:: images/user-guide/remove-operational-policies.png
+.. |clamp-opened-loop| image:: images/user-guide/opened-loop.png
 .. |clamp-menu-prop| image:: images/user-guide/open-menu-prop.png
-.. |clamp-prop-box| image:: images/user-guide/prop-box.png
-.. |clamp-op-policy-box| image:: images/user-guide/op-policy-box.png
-.. |clamp-op-policy-box-policy1| image:: images/user-guide/op-policy-box-policy1.png
-.. |clamp-config-policy-tca1| image:: images/user-guide/config-policy-tca1.png
-.. |clamp-save-cl| image:: images/user-guide/save-cl.png
-.. |clamp-submit-cl| image:: images/user-guide/submit-menu.png
-.. |clamp-distributed| image:: images/user-guide/distributed.png
-.. |clamp-deploy| image:: images/user-guide/deploy.png
+.. |clamp-prop-box| image:: images/user-guide/loop-properties.png
+.. |clamp-op-policy-box-policy| image:: images/user-guide/op-policy-box-policy.png
+.. |clamp-config-policy-tca| image:: images/user-guide/config-policy-tca.png
+.. |clamp-loop-operation-menu| image:: images/user-guide/loop-operation-menu.png
+.. |clamp-policy-submitted| image:: images/user-guide/policy-submitted.png
 .. |clamp-deploy-params| image:: images/user-guide/deploy-params.png
-.. |clamp-undeploy| image:: images/user-guide/undeploy.png
\ No newline at end of file
+.. |blueprint-node| image:: images/user-guide/blueprint_node_type.png
+.. |clamp-cds-operation| image:: images/user-guide/clamp-cds-operation.png