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

  • Description: Return all the parameters configured in the Simulator Participant

Parameters

Name

Position

Description

Type

X-onap-RequestId

header

RequestID for http transaction

Responses

200 - 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)

401 - Authorization Error

500 - Internal Server Error

PUT /v2/parameters

change the parameters

  • Description: Change the parameters the behaviour of the Simulator Participant

Parameters

Name

Position

Description

Type

X-ONAP-RequestID

header

RequestID for http transaction

Responses

200 - OK, the parameters has been saved

400 - Bad Request

401 - Authorization Error

500 - Internal Server Error

GET /v2/datas

Query details of the requested internal datas

  • Description: Query details of the requested internal datas

Parameters

Name

Position

Description

Type

X-onap-RequestId

header

RequestID for http transaction

Responses

200 - 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)

401 - Authorization Error

500 - Internal Server Error

PUT /v2/datas

change the parameters

  • Description: Change the data of the Simulator Participant

Parameters

Name

Position

Description

Type

X-ONAP-RequestID

header

RequestID for http transaction

Responses

200 - OK, the data has been saved

400 - Bad Request

401 - Authorization Error

500 - Internal Server Error

GET /v2/compositiondatas

Query details of the requested internal composition datas

  • Description: Query details of the requested internal composition datas

Parameters

Name

Position

Description

Type

X-onap-RequestId

header

RequestID for http transaction

Responses

200 - 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)

401 - Authorization Error

500 - Internal Server Error

PUT /v2/compositiondatas

change the parameters

  • Description: Change the data of the Simulator Participant

Parameters

Name

Position

Description

Type

X-ONAP-RequestID

header

RequestID for http transaction

Responses

200 - OK, the data has been saved

400 - Bad Request

401 - Authorization Error

500 - Internal Server Error

GET /v2/instances

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

Parameters

Name

Position

Description

Type

X-onap-RequestId

header

RequestID for http transaction

Responses

200 - 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

401 - Authorization Error

500 - Internal Server Error

GET /v2/instances/{instanceId}

Get automation composition instance details.

  • Description: Get details of the requested automation composition instance.

Parameters

Name

Position

Description

Type

instanceId

path

The UUID of the automation composition instance to get

X-onap-RequestId

header

RequestID for http transaction

Responses

200 - 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

401 - Authorization Error

500 - Internal Server Error