Fix yaml code block in documentation
[policy/parent.git] / docs / clamp / acm / acm-user-guide.rst
old mode 100644 (file)
new mode 100755 (executable)
index 2ed4917..588b3b5
@@ -75,7 +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 should not be changed as the ACM framework identifies the AC elements based on this type.
+  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
@@ -92,7 +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 should not be changed as the ACM framework identifies the AC definitions based on this type.
+  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
@@ -275,6 +279,24 @@ required operation.
 Note:
   Please refer the request payload section for updating the instance properties before deployment.
 
+Migrate AC instance
+-------------------
+After the AC instance is deployed, the user can migrate it to other composition definition.
+The target composition have to be primed and have to contain the same element definitions present in the source composition.
+The user can update the instance property values if needed.
+
+.. code-block:: bash
+
+  Invoke a POST request
+  'http://policy_runtime_ip:port/onap/policy/clamp/acm/v2/compositions/${compositionId}/instances'
+
+Request Payload
+
+Example payload to migrate and update the base url of the http request
+
+.. literalinclude:: files/AC-migrate.json
+   :language: json
+
 UnDeploy AutomationComposition
 ------------------------------
 The AC instances can be undeployed from the system by the participants.
@@ -337,7 +359,9 @@ 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 useState, operationalState and outPropeties and send to ACM-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.
 
 Mock a participant using docker-compose
@@ -376,10 +400,12 @@ The Json below is an example of configuration:
     "unlockSuccess": true,
     "deleteSuccess": true,
     "updateSuccess": true,
+    "migrateSuccess": true,
     "primeSuccess": true,
     "deprimeSuccess": true,
     "deployTimerMs": 1000,
     "undeployTimerMs": 1000,
+    "migrateTimerMs": 100,
     "lockTimerMs": 100,
     "unlockTimerMs": 100,
     "updateTimerMs": 100,
@@ -388,8 +414,44 @@ The Json below is an example of configuration:
     "deprimeTimerMs": 100
   }
 
-Update and send useState operationalState and outProperites
------------------------------------------------------------
+Update and send composition outProperites
+-----------------------------------------
+Data like useState operationalState and outProperites could be updated any time using the following endpoint:
+
+.. code-block:: bash
+
+  Invoke a PUT request 'http://participant_sim_ip:port/onap/policy/clamp/acm/simparticipant/v2/compositiondatas'
+
+The Json below is an example of update, where {{compositionId}} is the UUID of the AC Definition
+and ("onap.policy.clamp.ac.element.Http_BridgeAutomationCompositionElement", "1.2.3") is the ToscaConceptIdentifier  of the AC Definition element:
+
+.. code-block:: json
+
+  {
+        "outProperties": {
+            "list": [
+                {"id": 10 },
+                {"id": 20 }
+            ]
+        },
+        "compositionId": "{{compositionId}}",
+        "compositionDefinitionElementId": {
+            "name": "onap.policy.clamp.ac.element.Http_BridgeAutomationCompositionElement",
+            "version": "1.2.3"
+        }
+  }
+
+Read all AC Definition elements information
+-------------------------------------------
+All AC Definition elements information like composition inProperties and outProperties
+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/compositiondatas'
+
+Update and send useState operationalState and instance outProperites
+--------------------------------------------------------------------
 Data like useState operationalState and outProperites could be updated any time using the following endpoint:
 
 .. code-block:: bash