junit5 dependencies
[policy/parent.git] / docs / clamp / acm / acm-user-guide.rst
old mode 100755 (executable)
new mode 100644 (file)
index e14492e..3c56f90
@@ -75,8 +75,9 @@ org.onap.policy.clamp.acm.AutomationCompositionElement:
   the ACM elements.
   Here we are defining various timeout properties and startPhase parameter that are common for all the AC elements.
 
-  Note: This node type value can be customised if the user wants to change the default name. Please refer the
-        "Configure custom namings for TOSCA node types" section of the Automation Composition Runtime design and implementation.
+  Note:
+    This node type value can be customised if the user wants to change the default name. Please refer the "Configure custom namings for TOSCA node types"
+    section of the Automation Composition Runtime design and implementation.
 
 org.onap.policy.clamp.acm.K8SMicroserviceAutomationCompositionElement:
   This node type is used to define AC elements that are associated with kubernetes operations. It is further derived from the
@@ -93,8 +94,9 @@ org.onap.policy.clamp.acm.AutomationComposition:
   Primitive node type for defining Automation composition definitions that comprises one or more AC elements in it.
   The AC definition of this type will be created under the Node templates.
 
-  Note: This node type value can be customised if the user wants to change the default name. Please refer the
-        "Configure custom namings for TOSCA node types" section of the Automation Composition Runtime design and implementation.
+  Note:
+    This node type value can be customised if the user wants to change the default name. Please refer the "Configure custom namings for TOSCA node types"
+    section of the Automation Composition Runtime design and implementation.
 
 .. literalinclude:: files/acm-nodetypes.yaml
    :language: yaml
@@ -148,7 +150,7 @@ operations on a high level before proceeding with the workflow.
 
 
 Prerequisites:
-  - ACM components including acm-runtime, required participants (http and kubernetes in this case) and Dmaap/kafka clients are deployed in docker or kubernetes environment.
+  - ACM components including acm-runtime, required participants (http and kubernetes in this case) and kafka clients are deployed in docker or kubernetes environment.
   - Kubernetes and Helm are installed.
   - Chartmuseum server is installed to host the acelement microservice helm chart. (`Procedure to install chartmuseum <https://wiki.onap.org/display/DW/Microk8s+and+helm+setup+in+Ubuntu>`_.)
   - The helm chart for ACM test microservice is available in the policy/clamp repository that can be cloned locally and uploaded to the chartmuseum using helm push.(`AC element helm chart <https://github.com/onap/policy-clamp/tree/master/examples/src/main/resources/clamp/acm/acelement-helm>`_.)
@@ -357,10 +359,12 @@ Functionality covered:
 #. Set participantId and supportedElementType by properties file or by parameter environment.
 #. Set a delay for each operation at runtime by Rest-Api.
 #. Set success or fail for each operation at runtime by Rest-Api.
-#. update composition outProperties and send to ACM-runtime by Rest-Api.
-#. read all AC Definition inProperties/outProperties information by Rest-Api.
-#. update useState, operationalState and outProperties and send to ACM-runtime by Rest-Api.
-#. read all AC instance elements information by Rest-Api.
+#. Update composition outProperties and send to ACM-runtime by Rest-Api.
+#. Read all AC Definition inProperties/outProperties information by Rest-Api.
+#. Update useState, operationalState and outProperties and send to ACM-runtime by Rest-Api.
+#. Read all AC instance elements information by Rest-Api.
+#. Log of all information for each operation.
+#. Set the 'AcElementListenerV' version by properties file.
 
 Mock a participant using docker-compose
 ---------------------------------------
@@ -414,7 +418,7 @@ The Json below is an example of configuration:
 
 Update and send composition outProperites
 -----------------------------------------
-Data like useState operationalState and outProperites could be updated any time using the following endpoint:
+Composition Definition outProperites could be updated any time using the following endpoint:
 
 .. code-block:: bash
 
@@ -450,7 +454,7 @@ could be read using the following endpoint:
 
 Update and send useState operationalState and instance outProperites
 --------------------------------------------------------------------
-Data like useState operationalState and outProperites could be updated any time using the following endpoint:
+AC instance data like useState operationalState and outProperites could be updated any time using the following endpoint:
 
 .. code-block:: bash
 
@@ -462,7 +466,7 @@ The Json below is an example of update, where {{instanceId}} is the UUID of the
 
   {
         "outProperties": {
-            "Opresult": true,
+            "result": true,
             "list": [
                 {"id": 1 },
                 {"id": 2 }
@@ -482,3 +486,29 @@ could be read using the following endpoint:
 .. code-block:: bash
 
   Invoke a GET request 'http://participant_sim_ip:port/onap/policy/clamp/acm/simparticipant/v2/instances'
+
+Log of all information for each operation
+-----------------------------------------
+All information for each operation are logged, so the developer can monitoring what data are passed through the calls. Example of log during deploy.
+
+26-02-2024 09:55:38.547 [pool-4-thread-4] DEBUG  o.o.p.c.a.p.s.m.h.AutomationCompositionElementHandler.deploy **- deploy call**
+**compositionElement: CompositionElementDto[** compositionId=6502ba5e-1939-42b0-8bd2-bf89f0d51be6, elementDefinitionId=onap.policy.clamp.ac.element.Http_StarterAutomationCompositionElement 1.2.3, inProperties={ ... }, outProperties={} **], instanceElement: InstanceElementDto[** instanceId=022b3dee-a878-4b32-8544-de86e67e7335, elementId=2d614898-4945-41c7-9127-947b401aa753, toscaServiceTemplateFragment=ToscaServiceTemplate( ... ), inProperties={ ... }, outProperties={} **]**
+
+Set specific AcElementListenerV version
+---------------------------------------
+Set 'element.handler' property in properties file in order to test a specific AcElementListenerV version.
+Default value of 'element.handler' is the most recent version.
+
+==================== ====================
+** Property Value ** ** Abstract Class **
+==================== ====================
+AcElementHandlerV1   AcElementListenerV1
+AcElementHandlerV2   AcElementListenerV2
+==================== ====================
+
+Example:
+
+.. code-block:: yaml
+
+  element:
+    handler: AcElementHandlerV1