From c78136bd23f96c2c79d66f8494f914a3405f2876 Mon Sep 17 00:00:00 2001 From: FrancescoFioraEst Date: Fri, 26 Apr 2024 09:53:55 +0100 Subject: Update Participant Simulator docs Issue-ID: POLICY-4971 Change-Id: I4bb4ff00414ec1de935ed2bed3b50b4f7a0212d3 Signed-off-by: FrancescoFioraEst --- docs/clamp/acm/acm-participant-guide.rst | 104 +- docs/clamp/acm/acm-user-guide.rst | 6 +- .../acm/design-impl/participants/participants.rst | 1 + .../design-impl/participants/sim-participant.rst | 42 + .../participants/swagger/participant-sim.json | 1028 +++++++++++++------- docs/clamp/acm/draw.io/acm-participant-sim.drawio | 305 ++++++ .../acm/images/participants/sim-participant.png | Bin 0 -> 98976 bytes 7 files changed, 1154 insertions(+), 332 deletions(-) create mode 100644 docs/clamp/acm/design-impl/participants/sim-participant.rst create mode 100644 docs/clamp/acm/draw.io/acm-participant-sim.drawio create mode 100644 docs/clamp/acm/images/participants/sim-participant.png diff --git a/docs/clamp/acm/acm-participant-guide.rst b/docs/clamp/acm/acm-participant-guide.rst index a98e66b8..b4ca885d 100644 --- a/docs/clamp/acm/acm-participant-guide.rst +++ b/docs/clamp/acm/acm-participant-guide.rst @@ -194,6 +194,108 @@ Any new functionality in the future will be wrapped by this class. Default implementation are supported for the methods: lock, unlock, update, migrate, delete, prime, deprime, handleRestartComposition and handleRestartInstance. +Methods: deploy, undeploy, lock, unlock and delete + compositionElement: + ====================== ======================================= + **field** **description** + ====================== ======================================= + compositionId composition definition Id + elementDefinitionId composition definition element Id + inProperties composition definition in-properties + outProperties composition definition out-properties + ====================== ======================================= + instanceElement: + ============================== =========================== + **field** **description** + ============================== =========================== + instanceId instance id + elementId instance element id + toscaServiceTemplateFragment policies and policy types + inProperties instance in-properties + outProperties instance out-properties + ============================== =========================== + +Method: update + compositionElement: + ====================== ======================================= + **field** **description** + ====================== ======================================= + compositionId composition definition Id + elementDefinitionId composition definition element Id + inProperties composition definition in-properties + outProperties composition definition out-properties + ====================== ======================================= + instanceElement: + ============================== ================================================ + **field** **description** + ============================== ================================================ + instanceId instance id + elementId instance element id + toscaServiceTemplateFragment + inProperties instance in-properties **(before the update)** + outProperties instance out-properties + ============================== ================================================ + instanceElementUpdated: + ============================== ====================================== + **field** **description** + ============================== ====================================== + instanceId instance id + elementId instance element id + toscaServiceTemplateFragment + inProperties instance in-properties **(updated)** + outProperties instance out-properties + ============================== ====================================== + +Methods: prime, deprime + composition: + ====================== =================================================================== + **field** **description** + ====================== =================================================================== + compositionId composition definition Id + inProperties composition definition in-properties for each definition element + outProperties composition definition out-properties for each definition element + ====================== =================================================================== + +Method: migrate + compositionElement: + ====================== ======================================= + **field** **description** + ====================== ======================================= + compositionId composition definition Id + elementDefinitionId composition definition element Id + inProperties composition definition in-properties + outProperties composition definition out-properties + ====================== ======================================= + compositionElementTarget: + ====================== ============================================== + **field** **description** + ====================== ============================================== + compositionId composition definition target Id + elementDefinitionId composition definition target element Id + inProperties composition definition target in-properties + outProperties composition definition target out-properties + ====================== ============================================== + instanceElement: + ============================== =================================================== + **field** **description** + ============================== =================================================== + instanceId instance id + elementId instance element id + toscaServiceTemplateFragment + inProperties instance in-properties **(before the migration)** + outProperties instance out-properties + ============================== =================================================== + instanceElementMigrate: + ============================== ====================================== + **field** **description** + ============================== ====================================== + instanceId instance id + elementId instance element id + toscaServiceTemplateFragment + inProperties instance in-properties **(updated)** + outProperties instance out-properties + ============================== ====================================== + APIs to invoke -------------- ParticipantIntermediaryApi: @@ -665,4 +767,4 @@ error scenarios in the participant with the suitable approach. Tips: If the participant tries to undeploy an element which doesn’t exist in the system any more (due to various other external factors), -it could update the element state to ‘undeployed’ using the Intermediary api. \ No newline at end of file +it could update the element state to ‘undeployed’ using the Intermediary api. diff --git a/docs/clamp/acm/acm-user-guide.rst b/docs/clamp/acm/acm-user-guide.rst index faab7e61..3c56f906 100644 --- a/docs/clamp/acm/acm-user-guide.rst +++ b/docs/clamp/acm/acm-user-guide.rst @@ -418,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 @@ -454,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 @@ -466,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 } diff --git a/docs/clamp/acm/design-impl/participants/participants.rst b/docs/clamp/acm/design-impl/participants/participants.rst index 6b12b7c4..254d80c7 100644 --- a/docs/clamp/acm/design-impl/participants/participants.rst +++ b/docs/clamp/acm/design-impl/participants/participants.rst @@ -38,3 +38,4 @@ The detailed implementation of the CLAMP Participant ecosystem is described on t a1pms-participant kserve-participant policy-framework-participant + sim-participant diff --git a/docs/clamp/acm/design-impl/participants/sim-participant.rst b/docs/clamp/acm/design-impl/participants/sim-participant.rst new file mode 100644 index 00000000..96683a6a --- /dev/null +++ b/docs/clamp/acm/design-impl/participants/sim-participant.rst @@ -0,0 +1,42 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International License. + +.. _clamp-acm-sim-participant: + +Simulator Participant +##################### + +This can be used for simulation testing purpose when there are no actual frameworks or a full deployment. +Typically the Simulator Participant can be used with other Simulator participants with different supported element types. +Once the microservice is up, the Simulator participants can be used to test CLAMP runtime and intermediary library. +It supports the message Broker Kafka. + +.. image:: ../../images/participants/sim-participant.png + +Supported Element Types +----------------------- +Supported Element Types for Simulator participant will be used to define a whatever participant Element Definition Types in tosca template. +Participant Supported Element Types is defined in Simulator participant application.yaml. +The example below shows how to mock the HTTP participant: + +.. code-block:: YAML + + participantSupportedElementTypes: + - + typeName: org.onap.policy.clamp.acm.HttpAutomationCompositionElement + typeVersion: 1.0.0 + +Supported participant Interactions: +----------------------------------- +The Simulator participant interacts with ACM Runtime on the northbound via Message Broker. It interacts with tester via Rest Api. + +The communication for the Automation Composition updates and state change requests are sent from the ACM Runtime to the participant via Message Broker. +The tester can invoke the appropriate endpoint of the participant to change the behavior of how the participant should replay to ACM runtime. + +Participant Simulator API +========================= + +This API allows a Participant Simulator to be started and run for test purposes. + +:download:`Download Policy Participant Simulator API Swagger ` + +.. swaggerv2doc:: swagger/participant-sim.json diff --git a/docs/clamp/acm/design-impl/participants/swagger/participant-sim.json b/docs/clamp/acm/design-impl/participants/swagger/participant-sim.json index b258f85a..3be2d348 100644 --- a/docs/clamp/acm/design-impl/participants/swagger/participant-sim.json +++ b/docs/clamp/acm/design-impl/participants/swagger/participant-sim.json @@ -1,117 +1,205 @@ { - "swagger": "2.0", + "openapi": "3.0.1", "info": { - "description": "Api Documentation", - "version": "1.0", - "title": "Api Documentation", - "termsOfService": "urn:tos", - "contact": {}, + "title": "ACM Mock Participant", + "description": "CLAMP Mock Participant API", "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0" } }, + "externalDocs": { + "description": "CLAMP Automation Composition Management Documentation", + "url": "https://docs.onap.org/projects/onap-policy-parent/en/latest/clamp/clamp.html" + }, + "servers": [ + { + "url": "http://localhost:8084/onap/policy/clamp/acm/simparticipant", + "description": "Generated server url" + } + ], "paths": { - "/onap/participantsim/v2/elements": { - "put": { + "/v2/parameters": { + "get": { "tags": [ - "Clamp Automation Composition Participant Simulator API" - ], - "summary": "Updates simulated automation composition elements", - "description": "Updates simulated automation composition elements, returning the updated automation composition definition IDs", - "operationId": "updateUsingPUT", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json", - "application/yaml" + "Simulator-participant-controller" ], + "summary": "Return all Parameters", + "description": "Return all the parameters configured in the Simulator Participant", + "operationId": "getConfig", "parameters": [ { - "in": "body", - "name": "body", - "description": "Body of a automation composition element", - "required": true, + "name": "X-onap-RequestId", + "in": "header", + "description": "RequestID for http transaction", + "required": false, "schema": { - "$ref": "#/definitions/AutomationCompositionElementReq", - "originalRef": "AutomationCompositionElementReq" + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK, reutrns a serialised instance of [SimConfig](https://github.com/onap/policy-clamp/blob/master/participant/participant-impl/policy-clamp-participant-impl-simulator/src/main/java/org/onap/policy/clamp/acm/participant/sim/model/SimConfig.java)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SimConfig" + } + } } }, + "401": { + "description": "Authorization Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SimConfig" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/SimConfig" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SimConfig" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/SimConfig" + } + } + } + } + }, + "security": [ + { + "basicAuth": [] + } + ] + }, + "put": { + "tags": [ + "Simulator-participant-controller" + ], + "summary": "change the parameters", + "description": "Change the parameters the behaviour of the Simulator Participant", + "operationId": "setConfig", + "parameters": [ { "name": "X-ONAP-RequestID", "in": "header", "description": "RequestID for http transaction", "required": false, - "type": "string", - "format": "uuid" + "schema": { + "type": "string", + "format": "uuid" + } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SimConfig" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/SimConfig" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/TypedSimpleResponse«AutomationCompositionElement»", - "originalRef": "TypedSimpleResponse«AutomationCompositionElement»" - } + "description": "OK, the parameters has been saved" }, - "201": { - "description": "Created" + "400": { + "description": "Bad Request" }, "401": { - "description": "Authentication Error", - "headers": { - "X-LatestVersion": { - "type": "string" - }, - "X-PatchVersion": { - "type": "string" - }, - "X-MinorVersion": { - "type": "string" - }, - "X-ONAP-RequestID": { - "type": "string", - "format": "uuid" + "description": "Authorization Error" + }, + "500": { + "description": "Internal Server Error" + } + }, + "security": [ + { + "basicAuth": [] + } + ] + } + }, + "/v2/datas": { + "get": { + "tags": [ + "Simulator-participant-controller" + ], + "summary": "Query details of the requested internal datas", + "description": "Query details of the requested internal datas", + "operationId": "getDatas", + "parameters": [ + { + "name": "X-onap-RequestId", + "in": "header", + "description": "RequestID for http transaction", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Serialised instance of [InternalDatas](https://github.com/onap/policy-clamp/blob/master/participant/participant-impl/policy-clamp-participant-impl-simulator/src/main/java/org/onap/policy/clamp/acm/participant/sim/model/InternalDatas.java)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalDatas" + } } } }, - "403": { + "401": { "description": "Authorization Error", - "headers": { - "X-LatestVersion": { - "type": "string" - }, - "X-PatchVersion": { - "type": "string" - }, - "X-MinorVersion": { - "type": "string" - }, - "X-ONAP-RequestID": { - "type": "string", - "format": "uuid" + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalDatas" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/InternalDatas" + } } } }, - "404": { - "description": "Not Found" - }, "500": { "description": "Internal Server Error", - "headers": { - "X-LatestVersion": { - "type": "string" - }, - "X-PatchVersion": { - "type": "string" - }, - "X-MinorVersion": { - "type": "string" - }, - "X-ONAP-RequestID": { - "type": "string", - "format": "uuid" + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalDatas" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/InternalDatas" + } } } } @@ -120,114 +208,121 @@ { "basicAuth": [] } + ] + }, + "put": { + "tags": [ + "Simulator-participant-controller" ], - "x-interface info": { - "api-version": "1.0.0", - "last-mod-release": "Dublin" - } + "summary": "change the parameters", + "description": "Change the data of the Simulator Participant", + "operationId": "setData", + "parameters": [ + { + "name": "X-ONAP-RequestID", + "in": "header", + "description": "RequestID for http transaction", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalData" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/InternalData" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK, the data has been saved" + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Authorization Error" + }, + "500": { + "description": "Internal Server Error" + } + }, + "security": [ + { + "basicAuth": [] + } + ] } }, - "/onap/participantsim/v2/elements/{name}/{version}": { + "/v2/compositiondatas": { "get": { "tags": [ - "Clamp Automation Composition Participant Simulator API" - ], - "summary": "Query details of the requested simulated automation composition elements", - "description": "Queries details of the requested simulated automation composition elements, returning all automation composition element details", - "operationId": "elementsUsingGET", - "produces": [ - "application/json", - "application/yaml" + "Simulator-participant-controller" ], + "summary": "Query details of the requested internal composition datas", + "description": "Query details of the requested internal composition datas", + "operationId": "getCompositionDatas", "parameters": [ { - "name": "name", - "in": "path", - "description": "Automation Composition element name", - "required": true, - "type": "string" - }, - { - "name": "version", - "in": "path", - "description": "Automation Composition element version", - "required": true, - "type": "string" - }, - { - "name": "X-ONAP-RequestID", + "name": "X-onap-RequestId", "in": "header", "description": "RequestID for http transaction", "required": false, - "type": "string", - "format": "uuid" + "schema": { + "type": "string", + "format": "uuid" + } } ], "responses": { "200": { - "description": "OK", - "schema": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/AutomationCompositionElementRes", - "originalRef": "AutomationCompositionElementRes" + "description": "Serialised instance of [InternalDatas](https://github.com/onap/policy-clamp/blob/master/participant/participant-impl/policy-clamp-participant-impl-simulator/src/main/java/org/onap/policy/clamp/acm/participant/sim/model/InternalDatas.java)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalDatas" + } } } }, "401": { - "description": "Authentication Error", - "headers": { - "X-LatestVersion": { - "type": "string" - }, - "X-PatchVersion": { - "type": "string" - }, - "X-MinorVersion": { - "type": "string" - }, - "X-ONAP-RequestID": { - "type": "string", - "format": "uuid" - } - } - }, - "403": { "description": "Authorization Error", - "headers": { - "X-LatestVersion": { - "type": "string" - }, - "X-PatchVersion": { - "type": "string" - }, - "X-MinorVersion": { - "type": "string" - }, - "X-ONAP-RequestID": { - "type": "string", - "format": "uuid" + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalDatas" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/InternalDatas" + } } } }, - "404": { - "description": "Not Found" - }, "500": { "description": "Internal Server Error", - "headers": { - "X-LatestVersion": { - "type": "string" - }, - "X-PatchVersion": { - "type": "string" - }, - "X-MinorVersion": { - "type": "string" - }, - "X-ONAP-RequestID": { - "type": "string", - "format": "uuid" + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalDatas" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/InternalDatas" + } } } } @@ -236,113 +331,121 @@ { "basicAuth": [] } - ], - "x-interface info": { - "api-version": "1.0.0", - "last-mod-release": "Dublin" - } - } - }, - "/onap/participantsim/v2/participants": { + ] + }, "put": { "tags": [ - "Clamp Automation Composition Participant Simulator API" - ], - "summary": "Updates simulated participants", - "description": "Updates simulated participants, returning the updated automation composition definition IDs", - "operationId": "updateUsingPUT_1", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json", - "application/yaml" + "Simulator-participant-controller" ], + "summary": "change the parameters", + "description": "Change the data of the Simulator Participant", + "operationId": "setCompositionData", "parameters": [ - { - "in": "body", - "name": "body", - "description": "Body of a participant", - "required": true, - "schema": { - "$ref": "#/definitions/ParticipantReq", - "originalRef": "ParticipantReq" - } - }, { "name": "X-ONAP-RequestID", "in": "header", "description": "RequestID for http transaction", "required": false, - "type": "string", - "format": "uuid" + "schema": { + "type": "string", + "format": "uuid" + } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalData" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/InternalData" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/TypedSimpleResponse«Participant»", - "originalRef": "TypedSimpleResponse«Participant»" - } + "description": "OK, the data has been saved" }, - "201": { - "description": "Created" + "400": { + "description": "Bad Request" }, "401": { - "description": "Authentication Error", - "headers": { - "X-LatestVersion": { - "type": "string" - }, - "X-PatchVersion": { - "type": "string" - }, - "X-MinorVersion": { - "type": "string" - }, - "X-ONAP-RequestID": { - "type": "string", - "format": "uuid" + "description": "Authorization Error" + }, + "500": { + "description": "Internal Server Error" + } + }, + "security": [ + { + "basicAuth": [] + } + ] + } + }, + "/v2/instances": { + "get": { + "tags": [ + "Simulator-participant-controller" + ], + "summary": "Query details of the requested automation composition instances", + "description": "Query details of the requested automation composition instances for the given automation composition definition ID, returning details of all its automation composition instances", + "operationId": "getAutomationCompositions", + "parameters": [ + { + "name": "X-onap-RequestId", + "in": "header", + "description": "RequestID for http transaction", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Serialised instance of [AutomationCompositions](https://github.com/onap/policy-clamp/blob/master/models/src/main/java/org/onap/policy/clamp/models/acm/concepts/AutomationCompositions.java) containing a list of automation composition instances found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AutomationCompositions" + } } } }, - "403": { + "401": { "description": "Authorization Error", - "headers": { - "X-LatestVersion": { - "type": "string" - }, - "X-PatchVersion": { - "type": "string" - }, - "X-MinorVersion": { - "type": "string" - }, - "X-ONAP-RequestID": { - "type": "string", - "format": "uuid" + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AutomationCompositions" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/AutomationCompositions" + } } } }, - "404": { - "description": "Not Found" - }, "500": { "description": "Internal Server Error", - "headers": { - "X-LatestVersion": { - "type": "string" - }, - "X-PatchVersion": { - "type": "string" - }, - "X-MinorVersion": { - "type": "string" - }, - "X-ONAP-RequestID": { - "type": "string", - "format": "uuid" + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AutomationCompositions" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/AutomationCompositions" + } } } } @@ -351,114 +454,77 @@ { "basicAuth": [] } - ], - "x-interface info": { - "api-version": "1.0.0", - "last-mod-release": "Dublin" - } + ] } }, - "/onap/participantsim/v2/participants/{name}/{version}": { + "/v2/instances/{instanceId}": { "get": { "tags": [ - "Clamp Automation Composition Participant Simulator API" - ], - "summary": "Query details of the requested simulated participants", - "description": "Queries details of the requested simulated participants, returning all participant details", - "operationId": "participantsUsingGET", - "produces": [ - "application/json", - "application/yaml" + "Simulator-participant-controller" ], + "summary": "Get automation composition instance details.", + "description": "Get details of the requested automation composition instance.", + "operationId": "getAutomationComposition", "parameters": [ { - "name": "name", + "name": "instanceId", "in": "path", - "description": "Participant name", + "description": "The UUID of the automation composition instance to get", "required": true, - "type": "string" - }, - { - "name": "version", - "in": "path", - "description": "Participant version", - "required": true, - "type": "string" + "schema": { + "type": "string", + "format": "uuid" + } }, { - "name": "X-ONAP-RequestID", + "name": "X-onap-RequestId", "in": "header", "description": "RequestID for http transaction", "required": false, - "type": "string", - "format": "uuid" + "schema": { + "type": "string", + "format": "uuid" + } } ], "responses": { "200": { - "description": "OK", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/ParticipantRes", - "originalRef": "ParticipantRes" + "description": "Serialised instance of [AutomationComposition](https://github.com/onap/policy-clamp/blob/master/models/src/main/java/org/onap/policy/clamp/models/acm/concepts/AutomationComposition.java) containing the automation composition instance", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AutomationComposition" + } } } }, "401": { - "description": "Authentication Error", - "headers": { - "X-LatestVersion": { - "type": "string" - }, - "X-PatchVersion": { - "type": "string" - }, - "X-MinorVersion": { - "type": "string" - }, - "X-ONAP-RequestID": { - "type": "string", - "format": "uuid" - } - } - }, - "403": { "description": "Authorization Error", - "headers": { - "X-LatestVersion": { - "type": "string" - }, - "X-PatchVersion": { - "type": "string" - }, - "X-MinorVersion": { - "type": "string" - }, - "X-ONAP-RequestID": { - "type": "string", - "format": "uuid" + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AutomationComposition" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/AutomationComposition" + } } } }, - "404": { - "description": "Not Found" - }, "500": { "description": "Internal Server Error", - "headers": { - "X-LatestVersion": { - "type": "string" - }, - "X-PatchVersion": { - "type": "string" - }, - "X-MinorVersion": { - "type": "string" - }, - "X-ONAP-RequestID": { - "type": "string", - "format": "uuid" + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AutomationComposition" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/AutomationComposition" + } } } } @@ -467,12 +533,318 @@ { "basicAuth": [] } - ], - "x-interface info": { - "api-version": "1.0.0", - "last-mod-release": "Dublin" + ] + } + } + }, + "components": { + "schemas": { + "SimConfig": { + "type": "object", + "properties": { + "deploySuccess": { + "type": "boolean" + }, + "undeploySuccess": { + "type": "boolean" + }, + "lockSuccess": { + "type": "boolean" + }, + "unlockSuccess": { + "type": "boolean" + }, + "deleteSuccess": { + "type": "boolean" + }, + "updateSuccess": { + "type": "boolean" + }, + "migrateSuccess": { + "type": "boolean" + }, + "primeSuccess": { + "type": "boolean" + }, + "deprimeSuccess": { + "type": "boolean" + }, + "deployTimerMs": { + "type": "integer", + "format": "int32" + }, + "undeployTimerMs": { + "type": "integer", + "format": "int32" + }, + "lockTimerMs": { + "type": "integer", + "format": "int32" + }, + "unlockTimerMs": { + "type": "integer", + "format": "int32" + }, + "updateTimerMs": { + "type": "integer", + "format": "int32" + }, + "migrateTimerMs": { + "type": "integer", + "format": "int32" + }, + "deleteTimerMs": { + "type": "integer", + "format": "int32" + }, + "primeTimerMs": { + "type": "integer", + "format": "int32" + }, + "deprimeTimerMs": { + "type": "integer", + "format": "int32" + } + } + }, + "InternalData": { + "type": "object", + "properties": { + "intProperties": { + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "outProperties": { + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "compositionId": { + "type": "string", + "format": "uuid" + }, + "compositionDefinitionElementId": { + "$ref": "#/components/schemas/ToscaConceptIdentifier" + }, + "automationCompositionId": { + "type": "string", + "format": "uuid" + }, + "automationCompositionElementId": { + "type": "string", + "format": "uuid" + }, + "useState": { + "type": "string" + }, + "operationalState": { + "type": "string" + } + } + }, + "ToscaConceptIdentifier": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "version": { + "type": "string" + } + } + }, + "AutomationComposition": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "version": { + "type": "string" + }, + "derivedFrom": { + "type": "string" + }, + "metadata": { + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "description": { + "type": "string" + }, + "instanceId": { + "type": "string", + "format": "uuid" + }, + "compositionId": { + "type": "string", + "format": "uuid" + }, + "compositionTargetId": { + "type": "string", + "format": "uuid" + }, + "restarting": { + "type": "boolean" + }, + "deployState": { + "type": "string", + "enum": [ + "DEPLOYED", + "DEPLOYING", + "UNDEPLOYED", + "UNDEPLOYING", + "DELETING", + "DELETED", + "UPDATING", + "MIGRATING" + ] + }, + "lockState": { + "type": "string", + "enum": [ + "LOCKED", + "LOCKING", + "UNLOCKED", + "UNLOCKING", + "NONE" + ] + }, + "elements": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/AutomationCompositionElement" + } + }, + "stateChangeResult": { + "type": "string", + "enum": [ + "NO_ERROR", + "FAILED", + "TIMEOUT" + ] + }, + "definedName": { + "type": "string" + }, + "definedVersion": { + "type": "string" + }, + "typeVersion": { + "type": "string" + }, + "key": { + "$ref": "#/components/schemas/ToscaEntityKey" + }, + "type": { + "type": "string" + } + } + }, + "AutomationCompositionElement": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "definition": { + "$ref": "#/components/schemas/ToscaConceptIdentifier" + }, + "participantId": { + "type": "string", + "format": "uuid" + }, + "restarting": { + "type": "boolean" + }, + "deployState": { + "type": "string", + "enum": [ + "DEPLOYED", + "DEPLOYING", + "UNDEPLOYED", + "UNDEPLOYING", + "DELETING", + "DELETED", + "UPDATING", + "MIGRATING" + ] + }, + "lockState": { + "type": "string", + "enum": [ + "LOCKED", + "LOCKING", + "UNLOCKED", + "UNLOCKING", + "NONE" + ] + }, + "operationalState": { + "type": "string" + }, + "useState": { + "type": "string" + }, + "description": { + "type": "string" + }, + "message": { + "type": "string" + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "outProperties": { + "type": "object", + "additionalProperties": { + "type": "object" + } + } + } + }, + "AutomationCompositions": { + "type": "object", + "properties": { + "automationCompositionList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AutomationComposition" + } + } + } + }, + "ToscaEntityKey": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "version": { + "type": "string" + } + } + }, + "InternalDatas": { + "type": "object", + "properties": { + "list": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InternalData" + } + } } } } } -} \ No newline at end of file +} diff --git a/docs/clamp/acm/draw.io/acm-participant-sim.drawio b/docs/clamp/acm/draw.io/acm-participant-sim.drawio new file mode 100644 index 00000000..5bcab9c2 --- /dev/null +++ b/docs/clamp/acm/draw.io/acm-participant-sim.drawio @@ -0,0 +1,305 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/clamp/acm/images/participants/sim-participant.png b/docs/clamp/acm/images/participants/sim-participant.png new file mode 100644 index 00000000..8ceabb16 Binary files /dev/null and b/docs/clamp/acm/images/participants/sim-participant.png differ -- cgit 1.2.3-korg