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.

../../../../_images/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:

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 Policy Participant Simulator API Swagger

GET /v2/parameters

Return all Parameters

Return all the parameters configured in the Simulator Participant

Status Codes:
Request Headers:
  • X-onap-RequestId – RequestID for http transaction

PUT /v2/parameters

change the parameters

Change the parameters the behaviour of the Simulator Participant

Status Codes:
Request Headers:
  • X-ONAP-RequestID – RequestID for http transaction

GET /v2/datas

Query details of the requested internal datas

Query details of the requested internal datas

Status Codes:
Request Headers:
  • X-onap-RequestId – RequestID for http transaction

PUT /v2/datas

change the parameters

Change the data of the Simulator Participant

Status Codes:
Request Headers:
  • X-ONAP-RequestID – RequestID for http transaction

GET /v2/compositiondatas

Query details of the requested internal composition datas

Query details of the requested internal composition datas

Status Codes:
Request Headers:
  • X-onap-RequestId – RequestID for http transaction

PUT /v2/compositiondatas

change the parameters

Change the data of the Simulator Participant

Status Codes:
Request Headers:
  • X-ONAP-RequestID – RequestID for http transaction

GET /v2/instances

Query details of the requested automation composition instances

Query details of the requested automation composition instances for the given automation composition definition ID, returning details of all its automation composition instances

Status Codes:
Request Headers:
  • X-onap-RequestId – RequestID for http transaction

GET /v2/instances/{instanceId}

Get automation composition instance details.

Get details of the requested automation composition instance.

Parameters:
  • instanceId (string) – The UUID of the automation composition instance to get

Status Codes:
Request Headers:
  • X-onap-RequestId – RequestID for http transaction