Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This page details the test specification for ACM for all new and existing functionality.

Prerequisites

  • Access to a development laptop capable of running many docker containers
  • Access to a Kubernetes cluster, either locally or remotely (if carrying out kubernetes participant tests)

Environment Setup

The immediate components like, acm, participants, databases etc will be deployed in your local environment using docker compose configurations from the policy/docker repo details are in the documentation here. However, we want to add mock participants for http, k8s and policy participants. So, we have to replace the docker-compose.yaml  in the policy/docker `/compose` directory with this one

Once this change is made, we can bring up all our required components with `./start-compose.sh policy-clamp-runtime-acm`

Test Group Setup Steps

Steps for Scenario SetupScenario Finish StepsSuccessful Endpoint Interaction

This page details the test specification for ACM for all new and existing functionality.


Prerequisites

  • Access to a development laptop capable of running many docker containers
  • Access to a Kubernetes cluster, either locally or remotely (if carrying out kubernetes participant tests)

Environment Setup

The immediate components like, acm, participants, databases etc will be deployed in your local environment using docker compose configurations from the policy/docker repo details are in the documentation here. However, we want to add mock participants for http, k8s and policy participants. So, we have to replace the docker-compose.yaml  in the policy/docker `/compose` directory with this one

Once this change is made, we can bring up all our required components with `./start-compose.sh policy-clamp-runtime-acm`

Test Group Setup Steps

is correct in successful situations successful endpoint interaction Non-Successful Endpoint Interaction give that behaviour of the runtime in non successful situations successful endpoint interaction scenario here
  • Once the docker containers are deployed, you can confirm their health with the healthcheck calls specified in the collection for acm and the participants.
  • After each test or set of tests, the relevant calls in directory "Cleanup ACs" should be run. e.g. undeploy, deprime etc.

  • Steps for Scenario SetupScenario Finish Steps
    Successful Endpoint Interaction
    1. Deploy relevant policy components with instructions give in the above section
    2. In this case, we will be testing that the behaviour of the participant is correct in successful situations
    3. The mock participant can be used for http, k8s and policy participants
    4. Mock participant is also deployed with the policy docker compose.
    5. There is a postman collection specifically for the successful endpoint interaction scenario here
    6. Once the docker containers are deployed, you can confirm their health with the healthcheck calls specified in the collection for acm and the participants.
    7. After each test or set of tests, the relevant calls in directory "Cleanup ACs" should be run. e.g. undeploy, deprime etc.

    Non-Successful Endpoint Interaction
    1. Deploy relevant policy components with instructions give in the above section
    2. In this case, we will be testing that the behaviour of the runtime in non successful situations
    3. The mock participant can be used for http, k8s and policy participants
    4. Mock participant is also deployed with the policy docker compose.
    5. There is a postman collection specifically for the successful endpoint interaction scenario here
    6. Once the docker containers are deployed, you can confirm their health with the healthcheck calls specified in the collection for acm and the participants.
    7. After each test or set of tests, the relevant calls in directory "Cleanup ACs" should be run. e.g. undeploy, deprime etc.

    Failure Handling Scenario
    1. Deploy relevant policy components with instructions give in the above section
    2. In this case, we will be testing that the behaviour of the participant is correct in failure situations
    3. The mock participant can be used for http, k8s and policy participants
    4. Mock participant is also deployed with the policy docker compose.
    5. There is a postman collection specifically for the failure handling scenario here
    6. Once the docker containers are deployed, you can confirm their health with the healthcheck calls specified in the collection for acm and the participants.
    7. After each test or set of tests, the relevant calls in directory "Cleanup ACs" should be run. e.g. undeploy, deprime etc.

    Participant Set Properties Scenario
    1. Deploy relevant policy components with instructions give in the above section
    2. In this case, we will be testing that the behaviour of the participant is correct when the participant is used to set properties in "outProperties"
    3. The mock participant can be used for http, k8s and policy participants - the example will be for the http participant
    4. Mock participant is also deployed with the policy docker compose.
    5. There is a postman collection specifically for the participant set properties scenario here
    6. Once the docker containers are deployed, you can confirm their health with the healthcheck calls specified in the collection for acm and the participants.
    7. After each test or set of tests, the relevant calls in directory "Cleanup ACs" should be run. e.g. undeploy, deprime etc.

    Participant Restart Scenario
    1. Deploy relevant policy components with instructions given in the above section
    2. In this case, we will be testing the behaviour of the runtime and participants when restarted at various stages.
    3. Any of the actual participant can be used to carry out the tests
    4. The postman collection to test restart functionality with policy participant can be found here
    5. Once the docker containers are deployed, you can confirm their health with the healthcheck calls specified in the collection for acm and the participants.
    6. After each test or set of tests, the relevant calls in directory "Cleanup ACs" should be run. e.g. undeploy, deprime etc.

    Multiple Simultaneous Message Scenario

    Relevant instructions give in the below section


    Timeout Scenario
    1. Deploy relevant policy components with instructions give in the above section
    2. The example will be for the http mock, k8s mock and policy mock participants that are deployed with the policy docker compose.
    3. Relevant instructions and flow give in the below section

    Update Scenario
    1. Deploy relevant policy components with instructions given in the above section 
    2. In this case, we will be testing the behavior of ACM update properties functionality is correct
    3. Mock participant can be used for http, k8s and policy participant - the example will be for the http participant
    4. Please find the postman collection for update scenario here
    5. Once the docker containers are deployed, you can confirm their health with healthcheck calls specified in the collection for acm and the participants.
    6. After each test or set of tests, the relevant calls in directory "Cleanup ACs" should be run.

    Check Validation Scenario
    1. Deploy relevant policy components with instructions give in the above section
    2. In this case, we will be testing that the behaviour of the participant
    1. and checking the validaton scenarios
    2. The mock participant can be used for http, k8s and policy participants
    3. Mock participant is also deployed with the policy docker compose.
    4. There is a postman collection specifically for the
    1. checking validation scenario here
    2. Once the docker containers are deployed, you can confirm their health with the healthcheck calls specified in the collection for acm and the participants.
    3. After each test or set of tests, the relevant calls in directory "Cleanup ACs" should be run. e.g. undeploy, deprime etc.

    Migration Scenario
    1. Deploy relevant policy components with instructions
    1. given in the above section 
    2. In this case, we will be testing
    1. the
    1. behavior of ACM migration functionality is correct
    2. The mock participant can be used for http, k8s and policy participants
    3. Mock participant is also deployed with the policy docker compose.
    4. There is a postman collection specifically for the
    Failure Handling Scenario
    1. Deploy relevant policy components with instructions give in the above section
    2. In this case, we will be testing that the behaviour of the participant is correct in failure situations
    3. The mock participant can be used for http, k8s and policy participants
    4. Mock participant is also deployed with the policy docker compose.
    5. There is a postman collection specifically for the failure handling scenario here
    6. Once the docker containers are deployed, you can confirm their health with the healthcheck calls specified in the collection for acm and the participants.
    7. After each test or set of tests, the relevant calls in directory "Cleanup ACs" should be run. e.g. undeploy, deprime etc.
    Participant Set Properties Scenario
    1. Deploy relevant policy components with instructions give in the above section
    2. In this case, we will be testing that the behaviour of the participant is correct when the participant is used to set properties in "outProperties"
    3. The mock participant can be used for http, k8s and policy participants - the example will be for the http participant
    4. Mock participant is also deployed with the policy docker compose.
    5. There is a postman collection specifically for the participant set properties scenario here
    6. Once the docker containers are deployed, you can confirm their health with the healthcheck calls specified in the collection for acm and the participants.
    7. After each test or set of tests, the relevant calls in directory "Cleanup ACs" should be run. e.g. undeploy, deprime etc.
    Participant Restart Scenario
    1. Deploy relevant policy components with instructions given in the above section
    2. In this case, we will be testing the behaviour of the runtime and participants when restarted at various stages.
    3. Any of the actual participant can be used to carry out the tests
    4. The postman collection to test restart functionality with policy participant can be found here
    5. Once the docker containers are deployed, you can confirm their health with the healthcheck calls specified in the collection for acm and the participants.
    6. After each test or set of tests, the relevant calls in directory "Cleanup ACs" should be run. e.g. undeploy, deprime etc.
    Multiple Simultaneous Message Scenario

    Relevant instructions give in the below section

    Timeout Scenario
    1. Deploy relevant policy components with instructions give in the above section
    2. The example will be for the http mock, k8s mock and policy mock participants that are deployed with the policy docker compose.
    3. Relevant instructions and flow give in the below section
    Update Scenario
    1. Deploy relevant policy components with instructions given in the above section 
    2. In this case, we will be testing the behavior of ACM update properties functionality is correct
    3. Mock participant can be used for http, k8s and policy participant - the example will be for the http participant
    4. Please find the postman collection for update scenario here
    5. Once the docker containers are deployed, you can confirm their health with healthcheck calls specified in the collection for acm and the participants.
    6. After each test or set of tests, the relevant calls in directory "Cleanup ACs" should be run.
    Check Validation Scenario
    1. Deploy relevant policy components with instructions give in the above section
    2. In this case, we will be testing that the behaviour of the participant and checking the validaton scenarios
    3. The mock participant can be used for http, k8s and policy participants
    4. Mock participant is also deployed with the policy docker compose.
    5. There is a postman collection specifically for the checking validation scenario here
    6. Once the docker containers are deployed, you can confirm their health with the healthcheck calls specified in the collection for acm and the participants.
    7. After each test or set of tests, the relevant calls in directory "Cleanup ACs" should be run. e.g. undeploy, deprime etc.

    Test Cases

    In all test cases, that are calling rest endpoints, it is the ACM rest API that is being called. The url prefix to each rest call is: IP_ADDRESS:RUNTIME_PORT/onap/policy/clamp/acm/v2/. Use the provided POSTMAN collection to make the relevant calls.

    Prime AC Def
    Functionality Being TestedTitleTest caseStepsExpected ResultTest Result
    PASS/FAIL
    NotesMock Participant
    Failure Handling
    1. checking validation scenario: DEMO Simulator Migration.postman_collection.json
    2. After each test or set of tests, the relevant calls in directory "Cleanup ACs" should be run.


    Test Cases

    In all test cases, that are calling rest endpoints, it is the ACM rest API that is being called. The url prefix to each rest call is: IP_ADDRESS:RUNTIME_PORT/onap/policy/clamp/acm/v2/. Use the provided POSTMAN collection to make the relevant calls.

    Call each put request in the "Update Failure Scenario" directory - each should return 200

    HTTP Participant, K8s Participant, Policy Participant

    Make sure the AC instance is deployed successfully. - Verify the 'GET instance' Api shows the instance state as 'Deployed' 

    Call "Instantiation AC" Api with the updated properties of the instance elements in the request body. - response should be 202

    Make sure the AC instances are in UNDEPLOYED state. - Verify the 'GET instance' Api shows the instance state as 'Undeployed' 

    Call "Instantiation AC" with the updated properties of the instance elements in the request body. - response should be 202

    Trigger the deployment of an AC instance and make sure the AC instance is in DEPLOYING state. This can be achieved by using mock participant by configuring appropriate delays.

    Execute the test step 8 specified in the restart scenario section of this document.

    Verify the runtime sends out composition and instance info to the participant through kafka events.

    Execute GET AC instance to verify the updating operation gets executed by the participant again and the over all state is updated accordingly with success/fail 
    results
    Verify fetching the AC instance to confirm the properties of the AC instance are updated as per the update request.
    Functionality Being TestedTitleTest caseStepsExpected ResultTest Result
    PASS/FAIL
    NotesMock Participant
    Failure HandlingPrime AC Def and confirm test failure from http, k8s and policy participantsPrime AC def - http, k8s and policy participants should send back error message
    1. Call each put request in the "Prime Failure Scenario" directory - each should return 200
    2. Call "Create AC Definition" - response should be 201
    3. Call "Priming AC definition" - response should be 202
    4. Finally call "Get commission"

    200 response

    In the response json, we should see – "state": "PRIMING" – and also a message in each element "Prime failed!"


    HTTP Participant, K8s Participant, Policy ParticipantY
    Failure HandlingDeprime AC Def and confirm test failure from http, k8s and policy participantsDeprime AC def - http, k8s and policy participants should send back error message
    1. Call each put request in the "Deprime Failure Scenario" directory - each should return 200
    2. Call "Create AC Definition" - response should be 201
    3. Call "Priming AC definition" - response should be 202
    4. Call "Depriming AC definition" - response should be 202
    5. Finally call "Get commission"

    200 response

    In the response json, we should see – "state": "PRIMED" – and also a message in each element "Deprime failed!"


    HTTP Participant, K8s Participant, Policy ParticipantY
    Failure HandlingDeploy AC instance and confirm test failure from http, k8s and policy participantsDeploy AC instance - http, k8s and policy participants should send back error message
    1. Call each put request in the "Deploy Failure Scenario" directory - each should return 200
    2. Call "Create AC Definition" - response should be 201
    3. Call "Priming AC definition" - response should be 202
    4. Call "Instantiation AC" - response should be 201
    5. Call "Deploy Instantiated" - response should be 202
    6. Finally, we call "Get Instantiated List" and should get a 200 response

    200 response with an "automationCompositionList"

    In the JSON returned, the instance deployState should be "DEPLOYING"

    Each element should contain the message "Deploy failed!"


    HTTP Participant, K8s Participant, Policy ParticipantY
    Failure HandlingUndeploy AC instance and confirm test failure from http, k8s and policy participantsUndeploy AC instance - http, k8s and policy participants should send back error message
    1. Call each put request in the "Undeploy Failure Scenario" directory - each should return 200
    2. Call "Create AC Definition" - response should be 201
    3. Call "Priming AC definition" - response should be 202
    4. Call "Instantiation AC" - response should be 201
    5. Call "Deploy Instantiated" - response should be 202
    6. Call "Get Instantiated List" and should get a 200 response and we should see the "deployState: DEPLOYED" for the overall AC.
    7. Now, we call the "Undeploy Instantiated" call from the collection and should get a 202 response
    8. Call "Get Instantiated List" once again

    200 response

    we should see the overall "deployState: UNDEPLOYING" with a message in each element that says "Deployed"


    HTTP Participant, K8s Participant, Policy ParticipantY
    Failure HandlingDelete AC instance and confirm test failure from http, k8s and policy participantsPrime Delete AC def instance - http, k8s and policy participants should send back error message
    1. Call each put request in the "Prime Delete Failure Scenario" directory - each should return 200
    2. Call "Create AC Definition" - response should be 201
    3. Call "Priming AC definition" - response should be 202
    4. Finally call "Get commission"

    200 response

    In the response json, we should see – "state": "PRIMING" – and also a message in each element "Prime failed!
    1. Call "Instantiation AC" - response should be 201
    2. Call "Deploy Instantiated" - response should be 202
    3. Call "Get Instantiated List" and should get a 200 response and we should see the "deployState: DEPLOYED" for the overall AC.
    4. Now, we call the "Undeploy Instantiated" call from the collection and should get a 202 response
    5. Then, we can call "Delete Instantiated" - should get a 202
    6. Finally, Call "Get Instantiated List" once again

    200 response with an "automationCompositionList"

    In the JSON returned, the instance deployState should be "DELETING"

    Each element should contain the message "Undeployed"


    HTTP Participant, K8s Participant, Policy ParticipantY
    Failure HandlingDeprime Update AC Def instance and confirm test failure from http, k8s and policy participantsDeprime Update AC def instance - http, k8s and policy participants should send back error message
    1. Call each put request in the "Deprime Update Failure Scenario" directory - each should return 200
    2. Call "Create AC Definition" - response should be 201
    3. Call "Priming AC definition" - response should be 202
    4. Call "Depriming AC definitionInstantiation AC" - response should be 201
    5. Call "Deploy Instantiated" - response should be 202
    6. Call "Get Instantiated List" and should get a 200 response and we should see the "deployState: DEPLOYED" for the overall AC.
    7. Finally call "Get commission"

    200 response

    In the response json, we should see – "state": "PRIMED" – and also a message in each element "Deprime
    1. Now, we call the "Update Instantiation AC" call from the collection and should get a 200 response
    2. Finally, Call "Get Instantiated List" once again

    200 response with an "automationCompositionList"

    In the JSON returned, the instance deployState should be "UPDATING"

    Each element should contain the message "Update failed!"


    HTTP Participant, K8s Participant, Policy Participant


    Y
    Failure HandlingDeploy Unlock AC instance and confirm test failure from http, k8s and policy participantsDeploy Unlock AC instance - http, k8s and policy participants should send back error message
    1. Call each put request in the "Deploy Unlock Failure Scenario" directory - each should return 200
    2. Call "Create AC Definition" - response should be 201
    3. Call "Priming AC definition" - response should be 202
    4. Call "Instantiation AC" - response should be 201
    5. Call "Deploy Instantiated" - response should be 202
    6. Call "Get Instantiated List" and should get a 200 response should be 201
    7. Call "Deploy Instantiated" - response should be 202
    8. Finally, we call and we should see the "deployState: DEPLOYED" for the overall AC.
    9. Now, we call the "Unlock Instantiated" call from the collection and should get a 202 response
    10. Finally, Call "Get Instantiated List" and should get a 200 responseonce again

    200 response with an "automationCompositionList"

    In the JSON returned, the instance deployState should be "DEPLOYINGUNLOCKING"

    Each element should contain the message "Deploy Unlock failed!"


    HTTP Participant, K8s Participant, Policy ParticipantY
    Failure HandlingUndeploy Lock AC instance and confirm test failure from http, k8s and policy participantsUndeploy Lock AC instance - http, k8s and policy participants should send back error message
    1. Call each put request in the "Undeploy Lock Failure Scenario" directory - each should return 200
    2. Call "Create AC Definition" - response should be 201
    3. Call "Priming AC definition" - response should be beDeploy 202
    4. Call "Instantiation AC" - response should be 201
    5. Call "Deploy Instantiated" - response should be 202
    6. Call "Get Instantiated List" and should get a 200 response and we should see the "deployState: DEPLOYED" for the overall AC.
    7. Now, we call the "Undeploy Unlock Instantiated" call from the collection and should get a 202 response
    8. Then, call "Lock Instantiated" from the collection - should get a 202 response
    9. Finally, Call "Get Instantiated List" once again

    200 response we should see the overall "deployState: UNDEPLOYING" with a message in each element that says "Deployedwith an "automationCompositionList"

    In the JSON returned, the instance deployState should be "LOCKING"

    Each element should contain the message "Unlocked"


    HTTP Participant, K8s Participant, Policy ParticipantYFailure HandlingDelete AC instance and confirm test failure from http, k8s and policy participantsDelete AC instance - http, k8s and policy participants should send back error message
    1. Call each put request in the "Delete Failure Scenario" directory - each should return 200
    2. Call "Create AC Definition" - response should be 201
    3. Call "Priming AC definition" - response should be 202
    4. Call "Instantiation AC" - response should be 201
    5. Call "Deploy Instantiated" - response should be 202
    6. Call "Get Instantiated List" and should get a 200 response and we should see the "deployState: DEPLOYED" for the overall AC.
    7. Now, we call the "Undeploy Instantiated" call from the collection and should get a 202 response
    8. Then, we can call "Delete Instantiated" - should get a 202
    9. Finally, Call "Get Instantiated List" once again

    200 response with an "automationCompositionList"

    In the JSON returned, the instance deployState should be "DELETING"

    Each element should contain the message "Undeployed"

    HTTP Participant, K8s Participant, Policy ParticipantYFailure HandlingUpdate AC instance and confirm test failure from http, k8s and policy participantsUpdate AC instance - http, k8s and policy participants should send back error message








    Participant composition Out PropertiesSet  composition outProperties using the participant and retrieve them from the databaseAny properties we set on the participant-side "outProperties" object should be retrievable from ACM
    1. Call "Create AC Definition" - response should be 201
    2. Call "Set parameters in http-participant" (to increase the delay for priming, deploy and depriming) - response should be 200
    3. Call "Priming AC definition" - response should be 202
    4. Call "Get commission" and should get a 200 response and we should see the "state: PRIMING" for the overall AC Definition. We should also be able to see an empty "outProperties" object under the http element.
    5. Call "Set composition outProperties in http-participant" when participant is still priming - the response should be 200.
    6. Call "Get composition outProperties from http-participant" - the response should be 200. We should see the outProperties object with values set before
    7. Finally, Call "Get commission".

    200 response with an AC Definition object

    The outProperties object should now look like the json illustrated in the next column



    "outProperties": {
      "updateAll": "true",
      "nest": {
        "birdone": "jack",
        "birdtwo": "cuckoo",
      "egg": 4
      },
      "list": [
        {
          "id": 10
        },
        {
          "id": 20
        }
      ]
    }


    Participant composition Out PropertiesSet  composition outProperties using the participant and retrieve them from the databaseAny properties we set on the participant-side "outProperties" object should be retrievable from ACM
    1. Call "Create AC Definition" - response should be 201
    2. Call "Priming AC definition" - response should be 202
    3. Call "Instantiation AC" - response should be 201
    4. Call "Deploy Instantiated" - response should be 202
    5. Call "Get Instantiated ListGet commission" and should get a 200 response and we should see the "deployStatestate: DEPLOYEDPRIMED" for the overall AC .
    6. Now, we call the "Update Instantiation AC" call from the collection and should get a 200 response
    7. Finally, Call "Get Instantiated List" once again

    200 response with an "automationCompositionList"

    In the JSON returned, the instance deployState should be "UPDATING"

    Each element should contain the message "Update failed!"

    YFailure HandlingUnlock AC instance and confirm test failure from http, k8s and policy participantsUnlock AC instance - http, k8s and policy participants should send back error message
    1. Call each put request in the "Unlock Failure Scenario" directory - each should return 200
    2. Call "Create AC Definition" - response should be 201
    3. Call "Priming AC definition" - response should be 202
    4. Call "Instantiation AC" - response should be 201
    5. Call "Deploy Instantiated" - response should be 202
    6. Call "Get Instantiated List" and should get a 200 response and we should see the "deployState: DEPLOYED" for the overall AC.
    7. Now, we call the "Unlock Instantiated" call from the collection and should get a 202 response
    8. Finally, Call "Get Instantiated List" once again

    200 response with an "automationCompositionList"

    In the JSON returned, the instance deployState should be "UNLOCKING"

    Each element should contain the message "Unlock failed!"

    HTTP Participant, K8s Participant, Policy ParticipantYFailure HandlingLock AC instance and confirm test failure from http, k8s and policy participantsLock AC instance - http, k8s and policy participants should send back error message
    1. Call each put request in the "Lock Failure Scenario" directory - each should return 200Definition. We should also be able to see an empty "outProperties" object under the http element.
    2. Call "Set parameters in http-participant" (to increase the delay for priming, deploy and depriming) - response should be 200
    3. Call "Depriming AC definition" - response should be 202
    4. Call "Set composition outProperties in http-participant" when participant is still depriming - the response should be 200.
    5. Call "Get composition outProperties from http-participant" when participant is still depriming - the response should be 200. We should see the outProperties object with values set before
    6. Finally, Call "Get commission".

    200 response with an AC Definition object

    The outProperties object should now look like the json illustrated in the next column



    "outProperties": {
      "updateAll": "true",
      "nest": {
        "birdone": "jack",
        "birdtwo": "cuckoo",
      "egg": 4
      },
      "list": [
        {
          "id": 10
        },
        {
          "id": 20
        }
      ]
    }


    Participant  composition Out PropertiesTry to Set outProperties using the participant and retrieve them from the database before the composition is primedAny properties we set on the participant-side composition "outProperties" object should not be retrievable from ACM before the composition is primed
    1. Call "Create AC Definition" - response should be 201
    2. Call "Get Instantiated ListCall "Priming AC definition" - response should beDeploy 202
    3. Call "Instantiation AC" - response should be 201
    4. Call "Deploy Instantiated" - response should be 202
    5. Get commission" and should get a 200 response and we should see the "deployStateState: DEPLOYEDCOMMISSIONED" for the overall AC .
    6. Now, we call the "Unlock Instantiated" call from the collection and should get a 202 response
    7. Then, call "Lock Instantiated" from the collection - should get a 202 responseDefinition. We should also be able to see an empty "outProperties" object under the http element.
    8. Call "Set composition outProperties in http-participant" - the response should be 200.
    9. Finally, Call "Get Instantiated Listcommission" once again.

    200 response with an "automationCompositionList"

    In the JSON returned, the instance deployState should be "LOCKING"

    Each element should contain the message "Unlocked"

    HTTP Participant, K8s Participant, Policy ParticipantY

    AC Definition object

    The outProperties object should be empty as before













    Participant Out PropertiesSet outProperties using the participant and retrieve them from the databaseAny properties we set on the participant-side "outProperties" object should be retrievable from ACM
    1. Call "Create AC Definition" - response should be 201
    2. Call "Priming AC definition" - response should be 202
    3. Call "Instantiation AC" - response should be 201
    4. Call "Deploy Instantiated" - response should be 202
    5. Call "Get Instantiated List" and should get a 200 response and we should see the "deployState: DEPLOYED" for the overall AC. We should also be able to see an empty "outProperties" object under the http element.
    6. Call "Set outProperties in http-participant" - the response should be 200.
    7. Finally, Call "Get Instantiated List".

    200 response with an "automationCompositionList"

    The outProperties object should now look like the json illustrated in the next column



    "outProperties": {
      "deleteAll": "true",
      "nest": {
        "birdone": "sparrow",
        "birdtwo": "cuckoo",
      "egg": 4
      },
      "list": [
        {
          "id": 1
        },
        {
          "id": 2
        }
      ]
    }

    Y
    Participant Out PropertiesTry to Set outProperties using the participant and retrieve them from the database before the instance is deployedAny properties we set on the participant-side "outProperties" object should not be retrievable from ACM before the instance is deployed
    1. Call "Create AC Definition" - response should be 201
    2. Call "Priming AC definition" - response should be 202
    3. Call "Instantiation AC" - response should be 201
    4. Call "Get Instantiated List" and should get a 200 response and we should see the "deployState: DEPLOYEDUNDEPLOYED" for the overall AC. We should also be able to see an empty "outProperties" object under the http element.
    5. Call "Set outProperties in http-participant" - the response should be 200.
    6. Finally, Call "Get Instantiated List".

    200 response with an "automationCompositionList"

    The outProperties object should be empty as before




    Y








    Non-Successful Endpoint InteractionDelete AC defintion after primingDelete the commissioned defintion type2 after
    priming
    Execute DELETE request on runtime acm endpoint
    {{address}}:{{runtimeport}}/onap/policy/clamp/acm/v2/compositions/{{compositionId2}}
    400 Bad Request response.
    Should not allow to delete when primed

    "ACM not in COMMISSIONED state, Update of ACM Definition not allowed"
    Non-Successful Endpoint InteractionUpdate AC definition after primingUpdate AC definition type 2 after primingExecute PUT request on runtime acm endpoint
    {{address}}:{{runtimeport}}/onap/policy/clamp/acm/v2/compositions/{{compositionId2}}
    406 Not acceptable response
    Should not allow to update when primed



    Non-Successful Endpoint InteractionShut down participant and DeployShutdown one of the participants and trigger
    deployment
    Remove one of the participant.
    Execute PUT request on runtime acm endpoint
    {{address}}:{{runtimeport}}/onap/policy/clamp/acm/v2/compositions/{{compositionId1}}/instances/{{instanceId1}}
    409 Conflict response.
    Verify if runtime is restricting the deploy operation when one
    or more associated particpant is OFFLINE



    Non-Successful Endpoint InteractionDelete AC instance with OFFLINE
    participant
    Delete the AC instance after removing
    participant
    Execute DELETE request on runtime-acm
    {{address}}:{{runtimeport}}/onap/policy/clamp/acm/v2/compositions/{{compositionId2}}/instances/{{instanceId2}}
    409 Conflict response.
    Verify if runtime is restricting the delete operation when one
    or more associated particpant is OFFLINE



    Non-Successful Endpoint InteractionDeprime AC defintion with
     OFFLINE participant
    Deprime AC defintion when the participant is
    OFFLINE

    Make sure the AC instance is deleted and shutdown the participant again.
    Execute PUT request on runtime acm endpoint
    {{address}}:{{runtimeport}}/onap/policy/clamp/acm/v2/compositions/{{compositionId}}
    409 Conflict response.
    Verify if runtime is restricting the deprime operation when one
    or more associated particpant is OFFLINE



    Non-Successful Endpoint Interaction
    Verify restricted operations in deployed stateTry to perform the following operations
    Delete the AC instance2
    Deprime the Ac definition 2

    All the perfomed operations should return 400 response. The instances should not be allowed to get
    deleted or deprimed in Deployed state. Update IS allowed now



    Non-Successful Endpoint InteractionUpdate AC instance property after participant shutdownShutdown participant and trigger UPDATEShutdown the participant and trigger the update
    property event on a deployed instance
    409 Conflict response.
    Verify if runtime is restricting the update operation when one
    or more associated participant is OFFLINE



    Non-Successful Endpoint InteractionShut down participant on
    UNLOCKED state
    Shut down one of the participants on UNLOCKED stateManually stop one of the participants ???
    Verify the behaviour of runtime when the participant is OFFLINE and the instances are deployed(it depend how restart will be implemented)

    This should be updated because the operation will no longer be allowed by ACM if the participant is OFFLINE








    Successful Endpoint InteractionVerify Participant RegistrationVerify all the participants
    1. Call "Create AC Definition" - response should be 201
    2. Call "Priming AC definition" - response should be 202
    3. Call "Instantiation AC" - response should be 201
    4. Call "Deploy Instantiated" - response should be 202
    5. Call "Get Instantiated List" and should get a 200 response
    6. Finally, call "Get participants" and should get a 200 response.
    Verify all the deployed participants with their Ids and current status  are retrievedPASS

    Successful Endpoint InteractionCRUD
    Automation Composition Types
    Create Automation Composition Type 1
    1. Call "Create AC Definition" - response should be 201
    2. Call "Get AutomationCompositions" - response should be 200
    3. Finally, verify AC Definition has been created and returned in the list.
    201 Response with compositionIdPASS

    Successful Endpoint Interaction
    Create Automation composition Type 2
    1. Call "Create AC Definition" with a different definition than previously created - response should be 201
    2. Call "Get AutomationCompositions" - response should be 200
    3. Finally, verify AC Definition has been created and returned in the list.
    201 Response with compositionIdPASS

    Successful Endpoint InteractionUpdate AC definitionUpdate the AC type 1 with some changes
    in the common properties
    1. Call "

    Execute PUT request on runtime acm endpoint
    {{address}}:{{runtimeport}}/onap/policy/clamp/acm/v2/compositions/{{compositionId1}}

    201 Response with composition Id


    Successful Endpoint InteractionDelete AC definitionDelete the Ac type 2 
    1. Call "Delete Automation Composition" for Composition 2 - response should be 200
    200 Response PASS

    Successful Endpoint InteractionFetch Commissioned definition before PrimingGet all the commisioned definitions from  db
    1. Call "Get AutomationCompositions" - response should be 200
    2. Finally, verify the two AC Definitions are retrieved with all elements.

    OK


    Code Block
    languageyml
    firstline1
    titleResponse
    linenumberstrue
    collapsetrue
    {
        "service_templates": [
            {
                "tosca_definitions_version": "tosca_simple_yaml_1_3",
                "data_types": {
                    "onap.datatypes.ToscaConceptIdentifier": {
                        "properties": {
                            "name": {
                                "name": "name",
                                "type": "string",
                                "type_version": "0.0.0",
                                "required": true
                            },
                            "version": {
                                "name": "version",
                                "type": "string",
                                "type_version": "0.0.0",
                                "required": true
                            }
                        },
                        "name": "onap.datatypes.ToscaConceptIdentifier",
                        "version": "0.0.0",
                        "derived_from": "tosca.datatypes.Root",
                        "metadata": {}
                    },
                    "org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.RestRequest": {
                        "properties": {
                            "restRequestId": {
                                "name": "restRequestId",
                                "type": "onap.datatypes.ToscaConceptIdentifier",
                                "type_version": "0.0.0",
                                "description": "The name and version of a REST request to be sent to a REST endpoint",
                                "required": true
                            },
                            "httpMethod": {
                                "name": "httpMethod",
                                "type": "string",
                                "type_version": "0.0.0",
                                "description": "The REST method to use",
                                "required": true,
                                "constraints": [
                                    {
                                        "valid_values": [
                                            "POST",
                                            "PUT",
                                            "GET",
                                            "DELETE"
                                        ]
                                    }
                                ]
                            },
                            "path": {
                                "name": "path",
                                "type": "string",
                                "type_version": "0.0.0",
                                "description": "The path of the REST request relative to the base URL",
                                "required": true
                            },
                            "body": {
                                "name": "body",
                                "type": "string",
                                "type_version": "0.0.0",
                                "description": "The body of the REST request for PUT and POST requests",
                                "required": false
                            },
                            "expectedResponse": {
                                "name": "expectedResponse",
                                "type": "integer",
                                "type_version": "0.0.0",
                                "description": "THe expected HTTP status code for the REST request",
                                "required": true,
                                "constraints": []
                            }
                        },
                        "name": "org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.RestRequest",
                        "version": "1.0.0",
                        "derived_from": "tosca.datatypes.Root",
                        "metadata": {}
                    },
                    "org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.ConfigurationEntity": {
                        "properties": {
                            "configurationEntityId": {
                                "name": "configurationEntityId",
                                "type": "onap.datatypes.ToscaConceptIdentifier",
                                "type_version": "0.0.0",
                                "description": "The name and version of a Configuration Entity to be handled by the HTTP Automation Composition Element",
                                "required": true
                            },
                            "restSequence": {
                                "name": "restSequence",
                                "type": "list",
                                "type_version": "0.0.0",
                                "description": "A sequence of REST commands to send to the REST endpoint",
                                "required": false,
                                "entry_schema": {
                                    "type": "org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.RestRequest",
                                    "type_version": "1.0.0"
                                }
                            }
                        },
                        "name": "org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.ConfigurationEntity",
                        "version": "1.0.0",
                        "derived_from": "tosca.datatypes.Root",
                        "metadata": {}
                    }
                },
                "node_types": {
                    "org.onap.policy.clamp.acm.Participant": {
                        "properties": {
                            "provider": {
                                "name": "provider",
                                "type": "string",
                                "type_version": "0.0.0",
                                "required": false
                            }
                        },
                        "name": "org.onap.policy.clamp.acm.Participant",
                        "version": "1.0.1",
                        "derived_from": "tosca.nodetypes.Root",
                        "metadata": {}
                    },
                    "org.onap.policy.clamp.acm.AutomationCompositionElement": {
                        "properties": {
                            "provider": {
                                "name": "provider",
                                "type": "string",
                                "type_version": "0.0.0",
                                "description": "Specifies the organization that provides the automation composition element",
                                "required": false,
                                "metadata": {
                                    "common": "true"
                                }
                            },
                            "startPhase": {
                                "name": "startPhase",
                                "type": "integer",
                                "type_version": "0.0.0",
                                "description": "A value indicating the start phase in which this automation composition element will be started, the first start phase is zero. Automation Composition Elements are started in their start_phase order and stopped in reverse start phase order. Automation Composition Elements with the same start phase are started and stopped simultaneously",
                                "required": false,
                                "constraints": [
                                    {
                                        "greater_or_equal": "0"
                                    }
                                ],
                                "metadata": {
                                    "common": "true"
                                }
                            },
                            "uninitializedToPassiveTimeout": {
                                "name": "uninitializedToPassiveTimeout",
                                "type": "integer",
                                "type_version": "0.0.0",
                                "description": "The maximum time in seconds to wait for a state chage from uninitialized to passive",
                                "default": 60.0,
                                "required": false,
                                "constraints": [
                                    {
                                        "greater_or_equal": "0"
                                    }
                                ],
                                "metadata": {
                                    "common": "true"
                                }
                            },
                            "passiveToRunningTimeout": {
                                "name": "passiveToRunningTimeout",
                                "type": "integer",
                                "type_version": "0.0.0",
                                "description": "The maximum time in seconds to wait for a state chage from passive to running",
                                "default": 60.0,
                                "required": false,
                                "constraints": [
                                    {
                                        "greater_or_equal": "0"
                                    }
                                ],
                                "metadata": {
                                    "common": "true"
                                }
                            },
                            "runningToPassiveTimeout": {
                                "name": "runningToPassiveTimeout",
                                "type": "integer",
                                "type_version": "0.0.0",
                                "description": "The maximum time in seconds to wait for a state chage from running to passive",
                                "default": 60.0,
                                "required": false,
                                "constraints": [
                                    {
                                        "greater_or_equal": "0"
                                    }
                                ],
                                "metadata": {
                                    "common": "true"
                                }
                            },
                            "passiveToUninitializedTimeout": {
                                "name": "passiveToUninitializedTimeout",
                                "type": "integer",
                                "type_version": "0.0.0",
                                "description": "The maximum time in seconds to wait for a state chage from passive to uninitialized",
                                "default": 60.0,
                                "required": false,
                                "constraints": [
                                    {
                                        "greater_or_equal": "0"
                                    }
                                ],
                                "metadata": {
                                    "common": "true"
                                }
                            }
                        },
                        "name": "org.onap.policy.clamp.acm.AutomationCompositionElement",
                        "version": "1.0.1",
                        "derived_from": "tosca.nodetypes.Root",
                        "metadata": {}
                    },
                    "org.onap.policy.clamp.acm.AutomationComposition": {
                        "properties": {
                            "provider": {
                                "name": "provider",
                                "type": "string",
                                "type_version": "0.0.0",
                                "description": "Specifies the organization that provides the automation composition element",
                                "required": false,
                                "metadata": {
                                    "common": "true"
                                }
                            },
                            "elements": {
                                "name": "elements",
                                "type": "list",
                                "type_version": "0.0.0",
                                "description": "Specifies a list of automation composition element definitions that make up this automation composition definition",
                                "required": true,
                                "entry_schema": {
                                    "type": "onap.datatypes.ToscaConceptIdentifier",
                                    "type_version": "0.0.0"
                                },
                                "metadata": {
                                    "common": "true"
                                }
                            }
                        },
                        "name": "org.onap.policy.clamp.acm.AutomationComposition",
                        "version": "1.0.1",
                        "derived_from": "tosca.nodetypes.Root",
                        "metadata": {}
                    },
                    "org.onap.policy.clamp.acm.K8SMicroserviceAutomationCompositionElement": {
                        "properties": {
                            "chart": {
                                "name": "chart",
                                "type": "string",
                                "type_version": "0.0.0",
                                "required": true
                            },
                            "configs": {
                                "name": "configs",
                                "type": "list",
                                "type_version": "0.0.0",
                                "required": false
                            },
                            "requirements": {
                                "name": "requirements",
                                "type": "string",
                                "type_version": "0.0.0",
                                "required": false
                            },
                            "templates": {
                                "name": "templates",
                                "type": "list",
                                "type_version": "0.0.0",
                                "required": false
                            },
                            "values": {
                                "name": "values",
                                "type": "string",
                                "type_version": "0.0.0",
                                "required": true
                            }
                        },
                        "name": "org.onap.policy.clamp.acm.K8SMicroserviceAutomationCompositionElement",
                        "version": "1.0.0",
                        "derived_from": "org.onap.policy.clamp.acm.AutomationCompositionElement",
                        "metadata": {}
                    },
                    "org.onap.policy.clamp.acm.HttpAutomationCompositionElement": {
                        "properties": {
                            "baseUrl": {
                                "name": "baseUrl",
                                "type": "string",
                                "type_version": "0.0.0",
                                "description": "The base URL to be prepended to each path, identifies the host for the REST endpoints.",
                                "required": true
                            },
                            "httpHeaders": {
                                "name": "httpHeaders",
                                "type": "map",
                                "type_version": "0.0.0",
                                "description": "HTTP headers to send on REST requests",
                                "required": false,
                                "entry_schema": {
                                    "type": "string",
                                    "type_version": "0.0.0"
                                }
                            },
                            "configurationEntities": {
                                "name": "configurationEntities",
                                "type": "map",
                                "type_version": "0.0.0",
                                "description": "The connfiguration entities the Automation Composition Element is managing and their associated REST requests",
                                "required": true,
                                "entry_schema": {
                                    "type": "org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.ConfigurationEntity",
                                    "type_version": "1.0.0"
                                }
                            }
                        },
                        "name": "org.onap.policy.clamp.acm.HttpAutomationCompositionElement",
                        "version": "1.0.0",
                        "derived_from": "org.onap.policy.clamp.acm.AutomationCompositionElement",
                        "metadata": {}
                    }
                },
                "topology_template": {
                    "node_templates": {
                        "org.onap.k8s.acm.K8SAutomationCompositionParticipant": {
                            "type": "org.onap.policy.clamp.acm.Participant",
                            "type_version": "1.0.1",
                            "properties": {
                                "provider": "ONAP"
                            },
                            "name": "org.onap.k8s.acm.K8SAutomationCompositionParticipant",
                            "version": "2.3.4",
                            "metadata": {},
                            "description": "Participant for K8S"
                        },
                        "onap.policy.clamp.ac.element.K8S_StarterAutomationCompositionElement": {
                            "type": "org.onap.policy.clamp.acm.K8SMicroserviceAutomationCompositionElement",
                            "type_version": "1.0.0",
                            "properties": {
                                "provider": "ONAP",
                                "startPhase": 0,
                                "uninitializedToPassiveTimeout": 300,
                                "podStatusCheckInterval": 30
                            },
                            "name": "onap.policy.clamp.ac.element.K8S_StarterAutomationCompositionElement",
                            "version": "1.2.3",
                            "metadata": {},
                            "description": "Automation composition element for the K8S microservice for AC Element Starter"
                        },
                        "onap.policy.clamp.ac.element.K8S_BridgeAutomationCompositionElement": {
                            "type": "org.onap.policy.clamp.acm.K8SMicroserviceAutomationCompositionElement",
                            "type_version": "1.0.0",
                            "properties": {
                                "provider": "ONAP",
                                "startPhase": 0,
                                "uninitializedToPassiveTimeout": 300,
                                "podStatusCheckInterval": 30
                            },
                            "name": "onap.policy.clamp.ac.element.K8S_BridgeAutomationCompositionElement",
                            "version": "1.2.3",
                            "metadata": {},
                            "description": "Automation composition element for the K8S microservice for AC Element Bridge"
                        },
                        "onap.policy.clamp.ac.element.K8S_SinkAutomationCompositionElement": {
                            "type": "org.onap.policy.clamp.acm.K8SMicroserviceAutomationCompositionElement",
                            "type_version": "1.0.0",
                            "properties": {
                                "provider": "ONAP",
                                "startPhase": 0,
                                "uninitializedToPassiveTimeout": 300,
                                "podStatusCheckInterval": 30
                            },
                            "name": "onap.policy.clamp.ac.element.K8S_SinkAutomationCompositionElement",
                            "version": "1.2.3",
                            "metadata": {},
                            "description": "Automation composition element for the K8S microservice for AC Element Sink"
                        },
                        "org.onap.policy.clamp.acm.HttpParticipant": {
                            "type": "org.onap.policy.clamp.acm.Participant",
                            "type_version": "1.0.1",
                            "properties": {
                                "provider": "ONAP"
                            },
                            "name": "org.onap.policy.clamp.acm.HttpParticipant",
                            "version": "2.3.4",
                            "metadata": {},
                            "description": "Participant for Http requests"
                        },
                        "onap.policy.clamp.ac.element.Http_StarterAutomationCompositionElement": {
                            "type": "org.onap.policy.clamp.acm.HttpAutomationCompositionElement",
                            "type_version": "1.0.0",
                            "properties": {
                                "provider": "ONAP",
                                "uninitializedToPassiveTimeout": 300,
                                "startPhase": 1
                            },
                            "name": "onap.policy.clamp.ac.element.Http_StarterAutomationCompositionElement",
                            "version": "1.2.3",
                            "metadata": {},
                            "description": "Automation composition element for the http requests of AC Element Starter microservice"
                        },
                        "onap.policy.clamp.ac.element.Http_BridgeAutomationCompositionElement": {
                            "type": "org.onap.policy.clamp.acm.HttpAutomationCompositionElement",
                            "type_version": "1.0.0",
                            "properties": {
                                "provider": "ONAP",
                                "uninitializedToPassiveTimeout": 300,
                                "startPhase": 1
                            },
                            "name": "onap.policy.clamp.ac.element.Http_BridgeAutomationCompositionElement",
                            "version": "1.2.3",
                            "metadata": {},
                            "description": "Automation composition element for the http requests of AC Element Bridge microservice"
                        },
                        "onap.policy.clamp.ac.element.Http_SinkAutomationCompositionElement": {
                            "type": "org.onap.policy.clamp.acm.HttpAutomationCompositionElement",
                            "type_version": "1.0.0",
                            "properties": {
                                "provider": "ONAP",
                                "uninitializedToPassiveTimeout": 300,
                                "startPhase": 1
                            },
                            "name": "onap.policy.clamp.ac.element.Http_SinkAutomationCompositionElement",
                            "version": "1.2.3",
                            "metadata": {},
                            "description": "Automation composition element for the http requests of AC Element Sink microservice"
                        },
                        "onap.policy.clamp.ac.element.AutomationCompositionDefinition": {
                            "type": "org.onap.policy.clamp.acm.AutomationComposition",
                            "type_version": "1.0.1",
                            "properties": {
                                "provider": "ONAP",
                                "elements": [
                                    {
                                        "name": "onap.policy.clamp.ac.element.K8S_StarterAutomationCompositionElement",
                                        "version": "1.2.3"
                                    },
                                    {
                                        "name": "onap.policy.clamp.ac.element.K8S_BridgeAutomationCompositionElement",
                                        "version": "1.2.3"
                                    },
                                    {
                                        "name": "onap.policy.clamp.ac.element.K8S_SinkAutomationCompositionElement",
                                        "version": "1.2.3"
                                    },
                                    {
                                        "name": "onap.policy.clamp.ac.element.Http_StarterAutomationCompositionElement",
                                        "version": "1.2.3"
                                    },
                                    {
                                        "name": "onap.policy.clamp.ac.element.Http_BridgeAutomationCompositionElement",
                                        "version": "1.2.3"
                                    },
                                    {
                                        "name": "onap.policy.clamp.ac.element.Http_SinkAutomationCompositionElement",
                                        "version": "1.2.3"
                                    }
                                ]
                            },
                            "name": "onap.policy.clamp.ac.element.AutomationCompositionDefinition",
                            "version": "1.2.3",
                            "metadata": {},
                            "description": "Automation composition for Demo"
                        }
                    },
                    "policies": []
                },
                "name": "tosca",
                "version": "1.0.0",
                "metadata": {
                    "compositionId": "8c3f8b69-7464-40dc-b034-0f73f200729f"
                }
            }
        ]
    }



    Successful Endpoint InteractionPrimingPrime AC definition 1
    1. Ensure AC Type 1 & 2 are commissioned.
    2. Call "Prime Automation Composition Definition 1" - response 202
    3.  Finally, confirm compositionid1 is returned in the response body
    202 responsePASS

    Successful Endpoint Interaction
    Prime AC definition 2
    1. Ensure AC Type 1 & 2 are commissioned.
    2. Call "Prime Automation Composition Definition 2" - response 202
    3.  Finally, confirm compositionid2 is returned in the response body
    202 responsePASSCreate the composition Type 2 again after it was deleted earlier
    Successful Endpoint InteractionFetch Commisioned definition after  PrimingGet all the commisioned definitions from  db
    1. Call "Get AutomationCompositions" - response should be 200
    2. Finally, verify the two AC Definitions are retrieved with all elements.
    200 responseOK


    Code Block
    languageyml
    firstline1
    titleResponse
    linenumberstrue
    collapsetrue
    {
        "service_templates": [
            {
                "tosca_definitions_version": "tosca_simple_yaml_1_3",
                "data_types": {
                    "onap.datatypes.ToscaConceptIdentifier": {
                        "properties": {
                            "name": {
                                "name": "name",
                                "type": "string",
                                "type_version": "0.0.0",
                                "required": true
                            },
                            "version": {
                                "name": "version",
                                "type": "string",
                                "type_version": "0.0.0",
                                "required": true
                            }
                        },
                        "name": "onap.datatypes.ToscaConceptIdentifier",
                        "version": "0.0.0",
                        "derived_from": "tosca.datatypes.Root",
                        "metadata": {}
                    },
                    "org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.RestRequest": {
                        "properties": {
                            "restRequestId": {
                                "name": "restRequestId",
                                "type": "onap.datatypes.ToscaConceptIdentifier",
                                "type_version": "0.0.0",
                                "description": "The name and version of a REST request to be sent to a REST endpoint",
                                "required": true
                            },
                            "httpMethod": {
                                "name": "httpMethod",
                                "type": "string",
                                "type_version": "0.0.0",
                                "description": "The REST method to use",
                                "required": true,
                                "constraints": [
                                    {
                                        "valid_values": [
                                            "POST",
                                            "PUT",
                                            "GET",
                                            "DELETE"
                                        ]
                                    }
                                ]
                            },
                            "path": {
                                "name": "path",
                                "type": "string",
                                "type_version": "0.0.0",
                                "description": "The path of the REST request relative to the base URL",
                                "required": true
                            },
                            "body": {
                                "name": "body",
                                "type": "string",
                                "type_version": "0.0.0",
                                "description": "The body of the REST request for PUT and POST requests",
                                "required": false
                            },
                            "expectedResponse": {
                                "name": "expectedResponse",
                                "type": "integer",
                                "type_version": "0.0.0",
                                "description": "THe expected HTTP status code for the REST request",
                                "required": true,
                                "constraints": []
                            }
                        },
                        "name": "org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.RestRequest",
                        "version": "1.0.0",
                        "derived_from": "tosca.datatypes.Root",
                        "metadata": {}
                    },
                    "org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.ConfigurationEntity": {
                        "properties": {
                            "configurationEntityId": {
                                "name": "configurationEntityId",
                                "type": "onap.datatypes.ToscaConceptIdentifier",
                                "type_version": "0.0.0",
                                "description": "The name and version of a Configuration Entity to be handled by the HTTP Automation Composition Element",
                                "required": true
                            },
                            "restSequence": {
                                "name": "restSequence",
                                "type": "list",
                                "type_version": "0.0.0",
                                "description": "A sequence of REST commands to send to the REST endpoint",
                                "required": false,
                                "entry_schema": {
                                    "type": "org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.RestRequest",
                                    "type_version": "1.0.0"
                                }
                            }
                        },
                        "name": "org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.ConfigurationEntity",
                        "version": "1.0.0",
                        "derived_from": "tosca.datatypes.Root",
                        "metadata": {}
                    }
                },
                "node_types": {
                    "org.onap.policy.clamp.acm.Participant": {
                        "properties": {
                            "provider": {
                                "name": "provider",
                                "type": "string",
                                "type_version": "0.0.0",
                                "required": false
                            }
                        },
                        "name": "org.onap.policy.clamp.acm.Participant",
                        "version": "1.0.1",
                        "derived_from": "tosca.nodetypes.Root",
                        "metadata": {}
                    },
                    "org.onap.policy.clamp.acm.AutomationCompositionElement": {
                        "properties": {
                            "provider": {
                                "name": "provider",
                                "type": "string",
                                "type_version": "0.0.0",
                                "description": "Specifies the organization that provides the automation composition element",
                                "required": false,
                                "metadata": {
                                    "common": "true"
                                }
                            },
                            "startPhase": {
                                "name": "startPhase",
                                "type": "integer",
                                "type_version": "0.0.0",
                                "description": "A value indicating the start phase in which this automation composition element will be started, the first start phase is zero. Automation Composition Elements are started in their start_phase order and stopped in reverse start phase order. Automation Composition Elements with the same start phase are started and stopped simultaneously",
                                "required": false,
                                "constraints": [
                                    {
                                        "greater_or_equal": "0"
                                    }
                                ],
                                "metadata": {
                                    "common": "true"
                                }
                            },
                            "uninitializedToPassiveTimeout": {
                                "name": "uninitializedToPassiveTimeout",
                                "type": "integer",
                                "type_version": "0.0.0",
                                "description": "The maximum time in seconds to wait for a state chage from uninitialized to passive",
                                "default": 60.0,
                                "required": false,
                                "constraints": [
                                    {
                                        "greater_or_equal": "0"
                                    }
                                ],
                                "metadata": {
                                    "common": "true"
                                }
                            },
                            "passiveToRunningTimeout": {
                                "name": "passiveToRunningTimeout",
                                "type": "integer",
                                "type_version": "0.0.0",
                                "description": "The maximum time in seconds to wait for a state chage from passive to running",
                                "default": 60.0,
                                "required": false,
                                "constraints": [
                                    {
                                        "greater_or_equal": "0"
                                    }
                                ],
                                "metadata": {
                                    "common": "true"
                                }
                            },
                            "runningToPassiveTimeout": {
                                "name": "runningToPassiveTimeout",
                                "type": "integer",
                                "type_version": "0.0.0",
                                "description": "The maximum time in seconds to wait for a state chage from running to passive",
                                "default": 60.0,
                                "required": false,
                                "constraints": [
                                    {
                                        "greater_or_equal": "0"
                                    }
                                ],
                                "metadata": {
                                    "common": "true"
                                }
                            },
                            "passiveToUninitializedTimeout": {
                                "name": "passiveToUninitializedTimeout",
                                "type": "integer",
                                "type_version": "0.0.0",
                                "description": "The maximum time in seconds to wait for a state chage from passive to uninitialized",
                                "default": 60.0,
                                "required": false,
                                "constraints": [
                                    {
                                        "greater_or_equal": "0"
                                    }
                                ],
                                "metadata": {
                                    "common": "true"
                                }
                            }
                        },
                        "name": "org.onap.policy.clamp.acm.AutomationCompositionElement",
                        "version": "1.0.1",
                        "derived_from": "tosca.nodetypes.Root",
                        "metadata": {}
                    },
                    "org.onap.policy.clamp.acm.AutomationComposition": {
                        "properties": {
                            "provider": {
                                "name": "provider",
                                "type": "string",
                                "type_version": "0.0.0",
                                "description": "Specifies the organization that provides the automation composition element",
                                "required": false,
                                "metadata": {
                                    "common": "true"
                                }
                            },
                            "elements": {
                                "name": "elements",
                                "type": "list",
                                "type_version": "0.0.0",
                                "description": "Specifies a list of automation composition element definitions that make up this automation composition definition",
                                "required": true,
                                "entry_schema": {
                                    "type": "onap.datatypes.ToscaConceptIdentifier",
                                    "type_version": "0.0.0"
                                },
                                "metadata": {
                                    "common": "true"
                                }
                            }
                        },
                        "name": "org.onap.policy.clamp.acm.AutomationComposition",
                        "version": "1.0.1",
                        "derived_from": "tosca.nodetypes.Root",
                        "metadata": {}
                    },
                    "org.onap.policy.clamp.acm.K8SMicroserviceAutomationCompositionElement": {
                        "properties": {
                            "chart": {
                                "name": "chart",
                                "type": "string",
                                "type_version": "0.0.0",
                                "required": true
                            },
                            "configs": {
                                "name": "configs",
                                "type": "list",
                                "type_version": "0.0.0",
                                "required": false
                            },
                            "requirements": {
                                "name": "requirements",
                                "type": "string",
                                "type_version": "0.0.0",
                                "required": false
                            },
                            "templates": {
                                "name": "templates",
                                "type": "list",
                                "type_version": "0.0.0",
                                "required": false
                            },
                            "values": {
                                "name": "values",
                                "type": "string",
                                "type_version": "0.0.0",
                                "required": true
                            }
                        },
                        "name": "org.onap.policy.clamp.acm.K8SMicroserviceAutomationCompositionElement",
                        "version": "1.0.0",
                        "derived_from": "org.onap.policy.clamp.acm.AutomationCompositionElement",
                        "metadata": {}
                    },
                    "org.onap.policy.clamp.acm.HttpAutomationCompositionElement": {
                        "properties": {
                            "baseUrl": {
                                "name": "baseUrl",
                                "type": "string",
                                "type_version": "0.0.0",
                                "description": "The base URL to be prepended to each path, identifies the host for the REST endpoints.",
                                "required": true
                            },
                            "httpHeaders": {
                                "name": "httpHeaders",
                                "type": "map",
                                "type_version": "0.0.0",
                                "description": "HTTP headers to send on REST requests",
                                "required": false,
                                "entry_schema": {
                                    "type": "string",
                                    "type_version": "0.0.0"
                                }
                            },
                            "configurationEntities": {
                                "name": "configurationEntities",
                                "type": "map",
                                "type_version": "0.0.0",
                                "description": "The connfiguration entities the Automation Composition Element is managing and their associated REST requests",
                                "required": true,
                                "entry_schema": {
                                    "type": "org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.ConfigurationEntity",
                                    "type_version": "1.0.0"
                                }
                            }
                        },
                        "name": "org.onap.policy.clamp.acm.HttpAutomationCompositionElement",
                        "version": "1.0.0",
                        "derived_from": "org.onap.policy.clamp.acm.AutomationCompositionElement",
                        "metadata": {}
                    }
                },
                "topology_template": {
                    "node_templates": {
                        "org.onap.k8s.acm.K8SAutomationCompositionParticipant": {
                            "type": "org.onap.policy.clamp.acm.Participant",
                            "type_version": "1.0.1",
                            "properties": {
                                "provider": "ONAP"
                            },
                            "name": "org.onap.k8s.acm.K8SAutomationCompositionParticipant",
                            "version": "2.3.4",
                            "metadata": {},
                            "description": "Participant for K8S"
                        },
                        "onap.policy.clamp.ac.element.K8S_StarterAutomationCompositionElement": {
                            "type": "org.onap.policy.clamp.acm.K8SMicroserviceAutomationCompositionElement",
                            "type_version": "1.0.0",
                            "properties": {
                                "provider": "ONAP",
                                "startPhase": 0,
                                "uninitializedToPassiveTimeout": 300,
                                "podStatusCheckInterval": 30
                            },
                            "name": "onap.policy.clamp.ac.element.K8S_StarterAutomationCompositionElement",
                            "version": "1.2.3",
                            "metadata": {},
                            "description": "Automation composition element for the K8S microservice for AC Element Starter"
                        },
                        "onap.policy.clamp.ac.element.K8S_BridgeAutomationCompositionElement": {
                            "type": "org.onap.policy.clamp.acm.K8SMicroserviceAutomationCompositionElement",
                            "type_version": "1.0.0",
                            "properties": {
                                "provider": "ONAP",
                                "startPhase": 0,
                                "uninitializedToPassiveTimeout": 300,
                                "podStatusCheckInterval": 30
                            },
                            "name": "onap.policy.clamp.ac.element.K8S_BridgeAutomationCompositionElement",
                            "version": "1.2.3",
                            "metadata": {},
                            "description": "Automation composition element for the K8S microservice for AC Element Bridge"
                        },
                        "onap.policy.clamp.ac.element.K8S_SinkAutomationCompositionElement": {
                            "type": "org.onap.policy.clamp.acm.K8SMicroserviceAutomationCompositionElement",
                            "type_version": "1.0.0",
                            "properties": {
                                "provider": "ONAP",
                                "startPhase": 0,
                                "uninitializedToPassiveTimeout": 300,
                                "podStatusCheckInterval": 30
                            },
                            "name": "onap.policy.clamp.ac.element.K8S_SinkAutomationCompositionElement",
                            "version": "1.2.3",
                            "metadata": {},
                            "description": "Automation composition element for the K8S microservice for AC Element Sink"
                        },
                        "org.onap.policy.clamp.acm.HttpParticipant": {
                            "type": "org.onap.policy.clamp.acm.Participant",
                            "type_version": "1.0.1",
                            "properties": {
                                "provider": "ONAP"
                            },
                            "name": "org.onap.policy.clamp.acm.HttpParticipant",
                            "version": "2.3.4",
                            "metadata": {},
                            "description": "Participant for Http requests"
                        },
                        "onap.policy.clamp.ac.element.Http_StarterAutomationCompositionElement": {
                            "type": "org.onap.policy.clamp.acm.HttpAutomationCompositionElement",
                            "type_version": "1.0.0",
                            "properties": {
                                "provider": "ONAP",
                                "uninitializedToPassiveTimeout": 300,
                                "startPhase": 1
                            },
                            "name": "onap.policy.clamp.ac.element.Http_StarterAutomationCompositionElement",
                            "version": "1.2.3",
                            "metadata": {},
                            "description": "Automation composition element for the http requests of AC Element Starter microservice"
                        },
                        "onap.policy.clamp.ac.element.Http_BridgeAutomationCompositionElement": {
                            "type": "org.onap.policy.clamp.acm.HttpAutomationCompositionElement",
                            "type_version": "1.0.0",
                            "properties": {
                                "provider": "ONAP",
                                "uninitializedToPassiveTimeout": 300,
                                "startPhase": 1
                            },
                            "name": "onap.policy.clamp.ac.element.Http_BridgeAutomationCompositionElement",
                            "version": "1.2.3",
                            "metadata": {},
                            "description": "Automation composition element for the http requests of AC Element Bridge microservice"
                        },
                        "onap.policy.clamp.ac.element.Http_SinkAutomationCompositionElement": {
                            "type": "org.onap.policy.clamp.acm.HttpAutomationCompositionElement",
                            "type_version": "1.0.0",
                            "properties": {
                                "provider": "ONAP",
                                "uninitializedToPassiveTimeout": 300,
                                "startPhase": 1
                            },
                            "name": "onap.policy.clamp.ac.element.Http_SinkAutomationCompositionElement",
                            "version": "1.2.3",
                            "metadata": {},
                            "description": "Automation composition element for the http requests of AC Element Sink microservice"
                        },
                        "onap.policy.clamp.ac.element.AutomationCompositionDefinition": {
                            "type": "org.onap.policy.clamp.acm.AutomationComposition",
                            "type_version": "1.0.1",
                            "properties": {
                                "provider": "ONAP",
                                "elements": [
                                    {
                                        "name": "onap.policy.clamp.ac.element.K8S_StarterAutomationCompositionElement",
                                        "version": "1.2.3"
                                    },
                                    {
                                        "name": "onap.policy.clamp.ac.element.K8S_BridgeAutomationCompositionElement",
                                        "version": "1.2.3"
                                    },
                                    {
                                        "name": "onap.policy.clamp.ac.element.K8S_SinkAutomationCompositionElement",
                                        "version": "1.2.3"
                                    },
                                    {
                                        "name": "onap.policy.clamp.ac.element.Http_StarterAutomationCompositionElement",
                                        "version": "1.2.3"
                                    },
                                    {
                                        "name": "onap.policy.clamp.ac.element.Http_BridgeAutomationCompositionElement",
                                        "version": "1.2.3"
                                    },
                                    {
                                        "name": "onap.policy.clamp.ac.element.Http_SinkAutomationCompositionElement",
                                        "version": "1.2.3"
                                    }
                                ]
                            },
                            "name": "onap.policy.clamp.ac.element.AutomationCompositionDefinition",
                            "version": "1.2.3",
                            "metadata": {},
                            "description": "Automation composition for Demo"
                        }
                    },
                    "policies": []
                },
                "name": "tosca",
                "version": "1.0.0",
                "metadata": {
                    "compositionId": "19210df5-c5bf-4431-862a-82b148cfb668"
                }
            },
            {
                "tosca_definitions_version": "tosca_simple_yaml_1_3",
                "data_types": {
                    "onap.datatypes.ToscaConceptIdentifier": {
                        "properties": {
                            "name": {
                                "name": "name",
                                "type": "string",
                                "type_version": "0.0.0",
                                "required": true
                            },
                            "version": {
                                "name": "version",
                                "type": "string",
                                "type_version": "0.0.0",
                                "required": true
                            }
                        },
                        "name": "onap.datatypes.ToscaConceptIdentifier",
                        "version": "0.0.0",
                        "derived_from": "tosca.datatypes.Root",
                        "metadata": {}
                    },
                    "org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.RestRequest": {
                        "properties": {
                            "restRequestId": {
                                "name": "restRequestId",
                                "type": "onap.datatypes.ToscaConceptIdentifier",
                                "type_version": "0.0.0",
                                "description": "The name and version of a REST request to be sent to a REST endpoint",
                                "required": true
                            },
                            "httpMethod": {
                                "name": "httpMethod",
                                "type": "string",
                                "type_version": "0.0.0",
                                "description": "The REST method to use",
                                "required": true,
                                "constraints": [
                                    {
                                        "valid_values": [
                                            "POST",
                                            "PUT",
                                            "GET",
                                            "DELETE"
                                        ]
                                    }
                                ]
                            },
                            "path": {
                                "name": "path",
                                "type": "string",
                                "type_version": "0.0.0",
                                "description": "The path of the REST request relative to the base URL",
                                "required": true
                            },
                            "body": {
                                "name": "body",
                                "type": "string",
                                "type_version": "0.0.0",
                                "description": "The body of the REST request for PUT and POST requests",
                                "required": false
                            },
                            "expectedResponse": {
                                "name": "expectedResponse",
                                "type": "integer",
                                "type_version": "0.0.0",
                                "description": "THe expected HTTP status code for the REST request",
                                "required": true,
                                "constraints": []
                            }
                        },
                        "name": "org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.RestRequest",
                        "version": "1.0.0",
                        "derived_from": "tosca.datatypes.Root",
                        "metadata": {}
                    },
                    "org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.ConfigurationEntity": {
                        "properties": {
                            "configurationEntityId": {
                                "name": "configurationEntityId",
                                "type": "onap.datatypes.ToscaConceptIdentifier",
                                "type_version": "0.0.0",
                                "description": "The name and version of a Configuration Entity to be handled by the HTTP Automation Composition Element",
                                "required": true
                            },
                            "restSequence": {
                                "name": "restSequence",
                                "type": "list",
                                "type_version": "0.0.0",
                                "description": "A sequence of REST commands to send to the REST endpoint",
                                "required": false,
                                "entry_schema": {
                                    "type": "org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.RestRequest",
                                    "type_version": "1.0.0"
                                }
                            }
                        },
                        "name": "org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.ConfigurationEntity",
                        "version": "1.0.0",
                        "derived_from": "tosca.datatypes.Root",
                        "metadata": {}
                    }
                },
                "node_types": {
                    "org.onap.policy.clamp.acm.Participant": {
                        "properties": {
                            "provider": {
                                "name": "provider",
                                "type": "string",
                                "type_version": "0.0.0",
                                "required": false
                            }
                        },
                        "name": "org.onap.policy.clamp.acm.Participant",
                        "version": "1.0.1",
                        "derived_from": "tosca.nodetypes.Root",
                        "metadata": {}
                    },
                    "org.onap.policy.clamp.acm.AutomationCompositionElement": {
                        "properties": {": {
                            "provider": {
                                "name": "provider",
                                "type": "string",
                                "type_version": "0.0.0",
                                "description": "Specifies the organization that provides the automation composition element",
                                "required": false,
                                "metadata": {
                                    "common": "true"
                                }
                            },
                            "providerstartPhase": {
                                "name": "providerstartPhase",
                                "type": "stringinteger",
                                "type_version": "0.0.0",
                                "description": "SpecifiesA value indicating the organizationstart phase thatin provideswhich thethis automation composition element will be started, the first start phase is zero. Automation Composition Elements are started in their start_phase order and stopped in reverse start phase order. Automation Composition Elements with the same start phase are started and stopped simultaneously",
                                "required": false,
                                "constraints": [
                                    {
                                        "greater_or_equal": "0"
                                    }
                                ],
                                "metadata": {
                                    "common": "true"
                                }
                            },
                            "startPhaseuninitializedToPassiveTimeout": {
                                "name": "startPhaseuninitializedToPassiveTimeout",
                                "type": "integer",
                                "type_version": "0.0.0",
                                "description": "A value indicating the start phase in which this automation composition element will be started, the first start phase is zero. Automation Composition Elements are started in their start_phase order and stopped in reverse start phase order. Automation Composition Elements with the same start phase are started and stopped simultaneously",
                                "required": false,
                                "constraints": [
                                    {
                                        "greater_or_equal": "0"
                                    }
                                ],
                                "metadata": {
                                    "common": "true"
                                }
                            },
                            "uninitializedToPassiveTimeout": {
                                "name": "uninitializedToPassiveTimeout",
                                "type": "integer",
                                "type_version": "0.0.0",
                                "description": "The maximum time in seconds to wait for a state chage from uninitialized to passive",
                                "default": 60.0,
                                "required": false,
                                "constraints": [
                                    {
                        
    Successful Endpoint InteractionCreate AC instanceCreate AC instance 1
    1. Call "Create AC Instance 1".
    2. Verify 200 Response returned
    200 Response with InstanceIdPASSSuccessful Endpoint InteractionCreate AC instance 2
    1. Call "Create AC Instance 2".
    2. Verify 200 Response returned
    200 Response with InstanceIdPASSSuccessful Endpoint InteractionUpdate AC instanceUpdate AC instance1 with wrong paramter
    1. Call "Update AC Instance 1"
    2. Verify 200 Response returned
    200 Response with Instance idPASSSuccessful Endpoint InteractionUndeploy AC instanceUndeploy AC instance 1
    1. Call "Undeploy AC Instance 1"
    2. Call "Get AC Instance 1"
    3. Verify the AC Instance is "UNDEPLOYED"
    202 Response.
    Verify the AC instance's is "UNDEPLOYED"
    PASSSuccessful Endpoint InteractionUpdate AC instanceUpdate AC instance1 with correct paramter
    1. Call "Update AC Instance 1"
    2. Verify 200 Response returned
    200 Response with Instance idPASSSuccessful Endpoint InteractionDelete AC instanceDelete AC instance2
    1. Call "Delete AC Instance 2"
    2. Verify 200 Response
    200 Response PASSSuccessful Endpoint InteractionDeploy AC instanceDeploy AC instance 1
    1. Call "Get AC Instances"
    2. Verify AC Instance 1 and 2 are created
    3. Verify no operation has been carried out by the participants
    4. Call "Deploy AC Instance 1" 
    5. Verify 202 Response
    202 Response.
    Verify the AC instance's admin state is "LOCKED".
    No operation has been carried out by the participants. Depending on the participant being used and whether it has a specific implementation of lock and unlock.
    PASSSuccessful Endpoint InteractionDeploy AC instance 2
    1. Call "Get AC Instances"
    2. Verify AC Instance 1 and 2 are created
    3. Verify no operation has been carried out by the participants
    4. Call "Deploy AC Instance 2" 
    5. Verify 202 Response
    202 Response.
    Verify the AC instance's admin state is "LOCKED".
    No operation has been carried out by the participants. Depending on the participant being used and whether it has a specific implementation of lock and unlock.
    PASSSuccessful Endpoint InteractionGet deployed instance by id
    1. Call "Get AC Instances"
    2. Verify the instance 1 is retrieved and in LOCKED state 
    Verify the instance is retrieved and present in LOCKED state.PASSSuccessful Endpoint InteractionUNLOCK the AC instance
    1. Call "Get all participants"
    2. Verify all participants are on UNLOCKED STATE
    200 Response
    Verify the k8s , http and policy participants have performed the intended operations on UNLOCKED state
    PASSSuccessful Endpoint InteractionVerify the operational stateFetch the operational state of the AC instanceVerify the instance elements are reporting operational state "ACTIVE" in
    UNLOCKED state
    PASSSuccessful Endpoint InteractionVerify the usage stateFetch the usage state of the AC instanceVerify the instance elements are reporting usage state "IDLE/BUSY/AVAILABLE" in
    UNLOCKED state
    PASSSuccessful Endpoint InteractionVerify the operational stateFetch the operational state of the AC instanceVerify the instance elements are reporting operational state "INACTIVE" in LOCKED statePASSSuccessful Endpoint InteractionVerify the usage stateFetch the usage state of the AC instanceVerify the instance elements are reporting usage state "IDLE/BUSY/AVAILABLE" in
    LOCKED state
    PASSSuccessful Endpoint InteractionUndeploy AC instanceLOCK the AC instance with instanceid
    1. Call "Get AC Instance 1"
    2. Verify the instance is deployed and in UNLOCKED state
    3. Call "Lock AC Instance 1"
    4. Verify the participants have been removed
    200 Response. The instance should be moved to LOCKED state. Participants should have removed the
    corresponding deployments from the system
    PASSSuccessful Endpoint InteractionDelete AC instance
    1. Call "Delete AC Instance 1"
    2. Verify 202 Response and the AC instance has been deleted
    202 Response. The AC instance should get deleted from the db.PASSSuccessful Endpoint InteractionDeprime AC defintion
    1. Call "Deprime AC definition"
    2. Verify fetching the commisioned defintions and make sure the AC elements are unassigned from the participants
    202 Response. The AC instance should get deleted from the db.PASSSuccessful Endpoint InteractionDelete AC defintion
    1. Call "Delete AC Defintion" 
    2. Verify the AC Definition has been deleted from the DB
    200 Response. The AC defintion should get deleted from the dbPASSUpdate ScenarioUpdate AC instance property on the deployed
     instance
    Verify updating of AC properties in runtime

    Verify the runtime logs that the  'PROPERTIES_UPDATE' event is sent to the participants from runtime-acm.

    Call the 'GET instance' Api - should get the 200 response and the deploy state of the instance should be  "UPDATING"

    The ACM instance state should be "UPDATING" until the properties update is completed in the participant.
    Verify the properties are updated in runtime database and the GET instance Api returns the instance state as 'Deployed' after update operation

    Update ScenarioUpdate AC instance property on an Undeployed
     instance
    Verify updating of instance properties on an undeployed instance

    Call "get Instantiated List" - should get a 200 response and we should see the properties updated for the instance in the runtime database.

    In this case, there should not be any PROPERTIES_UPDATE event sends out from the runtime as the instance is not yet deployed to the participant.

    Restart TestingRestart acm runtimeRestart runtime applicationManually restart the container or mvn applicationVerify if the runtime comes up and running and get synced with the
    database. Retrieve participants and compositions from runtime endpoint.
    microk8s kubectl delete pod policy-clamp-runtime-acm-7ff68ff9fd-kllb7
    pod "policy-clamp-runtime-acm-7ff68ff9fd-kllb7" deleted
    Restart TestingShut down participant after
    priming
    Restart any of the participantManually restart the container or mvn application
    Execute GET request on the runtime-acm endpoint
    {{address}}:{{runtimeport}}/onap/policy/clamp/acm/v2/participants/
    Participants should get registered and get the primed definitions  from runtime once they are up again.Restart TestingShut down any of the participantDelete one of the participants permanently.
    Execute GET request on the runtime-acm endpoint
    {{address}}:{{runtimeport}}/onap/policy/clamp/acm/v2/participants/
    Verify the removed participants should have been marked OFFLINE by the runtime.
    Verify fetching the automation compositions where the element of removed participants should not have participant ids associated. (it depend how restart will be implemented)
    It needs 10 minutes on my deployment after requesting a Participant Report from all participantsRestart TestingRestart participant after PrimingRestart any of the participantManually restart the container or mvn applicationFetch participants list from runtime, restarted participant should get reregistered with runtime again.
    Fetch commisioned defintions, it should have elements with restarted participant id associated
    Restart ScenarioRestart participant after primingVerify restarting of participant after the composition is primed.

    Make sure the AC composition is commissioned and primed to the participants.

    Execute the test step 8 specified in the restart scenario section of this document.

    For the step 8d, execute the GET compositions to verify the Ac element info are primed to the restarted participant.

    Verify the restarted participant is primed again by the runtime with the AC element info.Restart ScenarioRestart after deploymentVerify restarting of participant after the deployment

    Make sure an AC instance is deployed successfully and the GET instance Api returns 200 response with the deploy state 'Deployed'

    Execute the test step 8 specified in the restart scenario section of this document.

    For the step 8d, execute the GET instance Api to verify the Ac element info are in deployed state without any changes.

    Verify the runtime logs for composition and instance events sent to the restarted participant. 

    The AC instance state should be preserved as 'DEPLOYED' without any changes.

    Restart ScenarioRestart during deploymentVerify restarting of participant when the deployment is in progressExecute GET AC instance to verify the deployment gets executed by the participant again and the over all state is updated accordingly with success/fail 
    results
    Restart ScenarioRestart during UndeploymentVerify restarting of participant when the undeployment is in progress

    Trigger the undeployment of an AC instance and make sure the AC instance is in UNDEPLOYING state. This can be achieved by using mock participant by configuring appropriate delays.

    Execute the test step 8 specified in the restart scenario section of this document.

    Verify the runtime sends out composition and instance info to the participant through kafka events.

    Execute GET AC instance to verify the undeployment gets executed by the participant again and the over all state is updated accordingly with success/fail 
    results
    Restart ScenarioRestart during UPDATEVerify restarting behavior of participant when the update operation is in progress

    Make sure an AC instance is deployed successfully and the GET instance API returns 200 response with the deploy state DEPLOYED.

    Trigger the update of an AC instance properties by executing the AC instantiation API call with updated properties on the request body.

    Make sure the AC instance is in UPDATING state. This can be achieved by using mock participant by configuring appropriate delays.

    Execute the test step 8 specified in the restart scenario section of this document.

    Verify the runtime sends out composition and instance info to the participant through kafka events.

     "The maximum time in seconds to wait for a state chage from uninitialized to passive",
                                "default": 60.0,
                                "required": false,
                                "constraints": [
                                    {


                        


    Successful Endpoint InteractionCreate AC instanceCreate AC instance 1
    1. Call "Create AC Instance 1".
    2. Verify 200 Response returned
    200 Response with InstanceIdPASS

    Successful Endpoint Interaction
    Create AC instance 2
    1. Call "Create AC Instance 2".
    2. Verify 200 Response returned
    200 Response with InstanceIdPASS

    Successful Endpoint InteractionUpdate AC instanceUpdate AC instance1 with wrong paramter
    1. Call "Update AC Instance 1"
    2. Verify 200 Response returned
    200 Response with Instance idPASS

    Successful Endpoint InteractionUndeploy AC instanceUndeploy AC instance 1
    1. Call "Undeploy AC Instance 1"
    2. Call "Get AC Instance 1"
    3. Verify the AC Instance is "UNDEPLOYED"
    202 Response.
    Verify the AC instance's is "UNDEPLOYED"
    PASS

    Successful Endpoint InteractionUpdate AC instanceUpdate AC instance1 with correct paramter
    1. Call "Update AC Instance 1"
    2. Verify 200 Response returned
    200 Response with Instance idPASS

    Successful Endpoint InteractionDelete AC instanceDelete AC instance2
    1. Call "Delete AC Instance 2"
    2. Verify 200 Response
    200 Response PASS

    Successful Endpoint InteractionDeploy AC instanceDeploy AC instance 1
    1. Call "Get AC Instances"
    2. Verify AC Instance 1 and 2 are created
    3. Verify no operation has been carried out by the participants
    4. Call "Deploy AC Instance 1" 
    5. Verify 202 Response
    202 Response.
    Verify the AC instance's admin state is "LOCKED".
    No operation has been carried out by the participants. Depending on the participant being used and whether it has a specific implementation of lock and unlock.
    PASS

    Successful Endpoint Interaction
    Deploy AC instance 2
    1. Call "Get AC Instances"
    2. Verify AC Instance 1 and 2 are created
    3. Verify no operation has been carried out by the participants
    4. Call "Deploy AC Instance 2" 
    5. Verify 202 Response
    202 Response.
    Verify the AC instance's admin state is "LOCKED".
    No operation has been carried out by the participants. Depending on the participant being used and whether it has a specific implementation of lock and unlock.
    PASS

    Successful Endpoint Interaction
    Get deployed instance by id
    1. Call "Get AC Instances"
    2. Verify the instance 1 is retrieved and in LOCKED state 
    Verify the instance is retrieved and present in LOCKED state.PASS

    Successful Endpoint Interaction
    UNLOCK the AC instance
    1. Call "Get all participants"
    2. Verify all participants are on UNLOCKED STATE
    200 Response
    Verify the k8s , http and policy participants have performed the intended operations on UNLOCKED state
    PASS

    Successful Endpoint Interaction
    Verify the operational stateFetch the operational state of the AC instanceVerify the instance elements are reporting operational state "ACTIVE" in
    UNLOCKED state
    PASS

    Successful Endpoint Interaction
    Verify the usage stateFetch the usage state of the AC instanceVerify the instance elements are reporting usage state "IDLE/BUSY/AVAILABLE" in
    UNLOCKED state
    PASS

    Successful Endpoint Interaction
    Verify the operational stateFetch the operational state of the AC instanceVerify the instance elements are reporting operational state "INACTIVE" in LOCKED statePASS

    Successful Endpoint Interaction
    Verify the usage stateFetch the usage state of the AC instanceVerify the instance elements are reporting usage state "IDLE/BUSY/AVAILABLE" in
    LOCKED state
    PASS

    Successful Endpoint InteractionUndeploy AC instanceLOCK the AC instance with instanceid
    1. Call "Get AC Instance 1"
    2. Verify the instance is deployed and in UNLOCKED state
    3. Call "Lock AC Instance 1"
    4. Verify the participants have been removed
    200 Response. The instance should be moved to LOCKED state. Participants should have removed the
    corresponding deployments from the system
    PASS

    Successful Endpoint Interaction
    Delete AC instance
    1. Call "Delete AC Instance 1"
    2. Verify 202 Response and the AC instance has been deleted
    202 Response. The AC instance should get deleted from the db.PASS

    Successful Endpoint Interaction
    Deprime AC defintion
    1. Call "Deprime AC definition"
    2. Verify fetching the commisioned defintions and make sure the AC elements are unassigned from the participants
    202 Response. The AC instance should get deleted from the db.PASS

    Successful Endpoint Interaction
    Delete AC defintion
    1. Call "Delete AC Defintion" 
    2. Verify the AC Definition has been deleted from the DB
    200 Response. The AC defintion should get deleted from the dbPASS









    Update ScenarioUpdate AC instance property on the deployed
     instance
    Verify updating of AC properties in runtime

    Make sure the AC instance is deployed successfully. - Verify the 'GET instance' Api shows the instance state as 'Deployed' 

    Call "Instantiation AC" Api with the updated properties of the instance elements in the request body. - response should be 202


    Verify the runtime logs that the  'PROPERTIES_UPDATE' event is sent to the participants from runtime-acm.

    Call the 'GET instance' Api - should get the 200 response and the deploy state of the instance should be  "UPDATING"

    The ACM instance state should be "UPDATING" until the properties update is completed in the participant.
    Verify the properties are updated in runtime database and the GET instance Api returns the instance state as 'Deployed' after update operation




    Update ScenarioUpdate AC instance property on an Undeployed
     instance
    Verify updating of instance properties on an undeployed instance

    Make sure the AC instances are in UNDEPLOYED state. - Verify the 'GET instance' Api shows the instance state as 'Undeployed' 

    Call "Instantiation AC" with the updated properties of the instance elements in the request body. - response should be 202


    Call "get Instantiated List" - should get a 200 response and we should see the properties updated for the instance in the runtime database.

    In this case, there should not be any PROPERTIES_UPDATE event sends out from the runtime as the instance is not yet deployed to the participant.












    Restart TestingRestart acm runtimeRestart runtime applicationManually restart the container or mvn applicationVerify if the runtime comes up and running and get synced with the
    database. Retrieve participants and compositions from runtime endpoint.

    microk8s kubectl delete pod policy-clamp-runtime-acm-7ff68ff9fd-kllb7
    pod "policy-clamp-runtime-acm-7ff68ff9fd-kllb7" deleted

    Restart TestingShut down participant after
    priming
    Restart any of the participantManually restart the container or mvn application
    Execute GET request on the runtime-acm endpoint
    {{address}}:{{runtimeport}}/onap/policy/clamp/acm/v2/participants/
    Participants should get registered and get the primed definitions  from runtime once they are up again.


    Restart Testing
    Shut down any of the participantDelete one of the participants permanently.
    Execute GET request on the runtime-acm endpoint
    {{address}}:{{runtimeport}}/onap/policy/clamp/acm/v2/participants/
    Verify the removed participants should have been marked OFFLINE by the runtime.
    Verify fetching the automation compositions where the element of removed participants should not have participant ids associated. (it depend how restart will be implemented)

    It needs 10 minutes on my deployment after requesting a Participant Report from all participants
    Restart TestingRestart participant after PrimingRestart any of the participantManually restart the container or mvn applicationFetch participants list from runtime, restarted participant should get reregistered with runtime again.
    Fetch commisioned defintions, it should have elements with restarted participant id associated



    Restart ScenarioRestart participant after primingVerify restarting of participant after the composition is primed.

    Make sure the AC composition is commissioned and primed to the participants.

    Execute the test step 8 specified in the restart scenario section of this document.

    For the step 8d, execute the GET compositions to verify the Ac element info are primed to the restarted participant.

    Verify the restarted participant is primed again by the runtime with the AC element info.


    Restart ScenarioRestart after deploymentVerify restarting of participant after the deployment

    Make sure an AC instance is deployed successfully and the GET instance Api returns 200 response with the deploy state 'Deployed'

    Execute the test step 8 specified in the restart scenario section of this document.

    For the step 8d, execute the GET instance Api to verify the Ac element info are in deployed state without any changes.

    Verify the runtime logs for composition and instance events sent to the restarted participant. 

    The AC instance state should be preserved as 'DEPLOYED' without any changes.




    Restart ScenarioRestart during deploymentVerify restarting of participant when the deployment is in progress

    Trigger the deployment of an AC instance and make sure the AC instance is in DEPLOYING state. This can be achieved by using mock participant by configuring appropriate delays.

    Execute the test step 8 specified in the restart scenario section of this document.

    Verify the runtime sends out composition and instance info to the participant through kafka events.


    Execute GET AC instance to verify the deployment gets executed by the participant again and the over all state is updated accordingly with success/fail 
    results



    Restart ScenarioRestart during UndeploymentVerify restarting of participant when the undeployment is in progress

    Trigger the undeployment of an AC instance and make sure the AC instance is in UNDEPLOYING state. This can be achieved by using mock participant by configuring appropriate delays.

    Execute the test step 8 specified in the restart scenario section of this document.

    Verify the runtime sends out composition and instance info to the participant through kafka events.

    Execute GET AC instance to verify the undeployment gets executed by the participant again and the over all state is updated accordingly with success/fail 
    results



    Restart ScenarioRestart during UPDATEVerify restarting behavior of participant when the update operation is in progress

    Make sure an AC instance is deployed successfully and the GET instance API returns 200 response with the deploy state DEPLOYED.

    Trigger the update of an AC instance properties by executing the AC instantiation API call with updated properties on the request body.

    Make sure the AC instance is in UPDATING state. This can be achieved by using mock participant by configuring appropriate delays.

    Execute the test step 8 specified in the restart scenario section of this document.

    Verify the runtime sends out composition and instance info to the participant through kafka events.

    Execute GET AC instance to verify the updating operation gets executed by the participant again and the over all state is updated accordingly with success/fail 
    results
    Verify fetching the AC instance to confirm the properties of the AC instance are updated as per the update request.











    Migration ScenarioCreation AC definition and instanceCreation AC definition and instance
    1. create AC definition "Group A" using the endpoint: "Create AC definition Group A"
    2. prime AC definition "Group A" using the endpoint: "Priming AC definition Group A"
    3. create AC instance using the endpoint "Instantiation AC Group A"
    4. deploy AC instance using the endpoint "Deploy Group A instantiated"
    5. fetch AC instance using the endpoint "Get instantiated by Group A and instanceId"

    Verify fetching the AC instance using "Get instantiated by Group A and instanceId"

    PASS

    Migration ScenarioCreation AC definition and instanceCreation second AC definition
    1. create AC definition "Group B" using the endpoint: "Create AC definition Group B"
    2. prime AC definition "Group B" using the endpoint: "Priming AC definition Group B"
    3. the endpoint "Get instantiated by Group B and instanceId" should not working

    Verify fetching the AC instance using "Get instantiated by Group B and instanceId"

    404 Bad request

    Migration ScenarioParticipant ConfigurationParticipant Configuration for migration delay

    using the endpoint "Post http-participant parameters", set migrateTimerMs to 30000 Ms


    PASS

    {
        "deploySuccess"true,
        "undeploySuccess"true,
        "lockSuccess"true,
        "unlockSuccess"true,
        "deleteSuccess"true,
        "updateSuccess"true,
        "migrateSuccess"true,
        "primeSuccess"true,
        "deprimeSuccess"true,
        "deployTimerMs"1000,
        "undeployTimerMs"1000,
        "lockTimerMs"100,
        "unlockTimerMs"100,
        "updateTimerMs"100,
        "migrateTimerMs"30000,
        "deleteTimerMs"100,
        "primeTimerMs"100,
        "deprimeTimerMs"100
    }


    Migration ScenarioTesting endpoint visibilityTesting endpoint visibility during migration
    1. start migration using the endpoint: "Migration instantiated Group A to Group B"
    2. fetch the AC instance using the endpoint "Get instantiated list Group A"
    3. fetch the AC instance using the endpoint "Get instantiated list Group B"

    Verify fetching the AC instance from composition source and composition target

    PASS

    DepolyState should be in "MIGRATING" state

    stateChangeResult should be "NO_ERROR"


    Migration ScenarioTesting endpoint visibilityTesting endpoint visibility after migration
    1. wait the end of the migration
    2. fetch the AC instance using the endpoint "Get instantiated list Group B"

    Verify fetching the AC instance from composition target

    PASS

    DepolyState should be in "DEPLOYED" state

    stateChangeResult should be "NO_ERROR"


    Migration ScenarioTesting endpoint visibilityTesting endpoint visibility after migration

    fetching the AC instance using the endpoint "Get instantiated list Group A" should fail

    Verify that fetching the AC instance from composition source should fail

    FAIL

    404 Bad request


    Migration ScenarioParticipant ConfigurationParticipant Configuration for migration fail

    using the endpoint "Post http-participant parameters", set "migrateSuccess" to false


    PASS

    {
        "deploySuccess"true,
        "undeploySuccess"true,
        "lockSuccess"true,
        "unlockSuccess"true,
        "deleteSuccess"true,
        "updateSuccess"true,
        "migrateSuccess"false,
        "primeSuccess"true,
        "deprimeSuccess"true,
        "deployTimerMs"1000,
        "undeployTimerMs"1000,
        "lockTimerMs"100,
        "unlockTimerMs"100,
        "updateTimerMs"100,
        "migrateTimerMs": 100,
        "deleteTimerMs"100,
        "primeTimerMs"100,
        "deprimeTimerMs"100
    }


    Migration ScenarioTesting migration failTesting migration fail
    1. start migration using the endpoint: "Migration instantiated Group B to Group A"
    2. fetch the AC instance using the endpoint "Get instantiated list Group A"
    3. fetch the AC instance using the endpoint "Get instantiated list Group B"

    Verify fetching the AC instance from composition source and composition target

    PASS

    DepolyState should be in "MIGRATING" state

    stateChangeResult should be "FAILED"



    Migration ScenarioTesting migration failTesting undeploy after migration fail
    1. undeploy the AC instance using the endpoint "Undeploy Group B instantiated"
    2. wait the undeploy completed
    3. fetch the AC instance using the endpoint "Get instantiated list Group B"


    PASS

    DepolyState should be in "UNDEPLOYED" state

    stateChangeResult should be "NO_ERROR"



    Handle multiple messages from ACM to Participant simultaneously

    Description

    Functionality to test

    Test the ability for participants to Handle multiple messages.

    Environment

    CSIT with microk8s

    Requirements and preconditions

    Containers have to be configured to work at least with 4 CPU:

     resources:
       small:
         limits:
          cpu: 4

    How to test

    Create two instances and deploy/undeploy at same time

    Expected result

    Check into participants log, the threads that are executing deploy/undeploy at same time

    Flow for participantHttp and participantKubernetes

    Postman collection: ACM DEMO Test 2.postman_collection.json

    StepResultNote

    Call "Create Commissioned AC definition"

    Success

    Call "Priming AC definition"

    Success

    Call "Create AC Instantiation Group A"

    Success

    Call "Create AC Instantiation Group B"

    Success
    Call "Deploy instantiated Group A" and "Deploy instantiated Group B" at same timeSuccess
    Check the participants log during deploymentthreads that are executing deploy at same time

    Check that elements of both groups are getting deployed

    starter-a, bridge-a and sink-a for group A

    and starter-b, bridge-b and sink-b for group B


    Call "Get instantiated Group A" to check the final state

    check deployState as DEPLOYED
    Call "Get instantiated Group B" to check the final statecheck deployState as DEPLOYED
    Check elements are working as expectedCheck into the sink log the "Cycle completed"microk8s kubectl logs <acm-sink-....> | grep completed
    Call "Undeploy instantiated Group A" and "Undeploy instantiated Group B" at same timeSuccess
    Check the participants log during undeploymentthreads that are executing undeploy at same time
    Check that elements of both groups are getting undeployed

    Call "Delete instantiated Group A" and "Delete instantiated Group B" at same timeSuccess
    Depriming AC definitionSuccess
    Delete AC definitionSuccess


    Timeout handling in AutomationComposition Definition and Instance

    Description

    Functionality to test

    Test ACM runtime timeout handling during prime, deprime, delete, deploy, undeploy, update, lock and unlock

    Environment

    Custom Docker compose with three mock participants

    Requirements and preconditions

    reduce the time in runtime:

    runtime:
      participantParameters:
      heartBeatMs: 10000
      maxStatusWaitMs: 30000

    reduce the time in participant:

    participant:
      intermediaryParameters:
      reportingTimeIntervalMs: 8000

    How to test

    Configure mock participants to delay the operations of 30 seconds. The timeout will be triggered after 10 seconds 

    Expected result

    During a change state, user cannot do any actions, with timeout, the user is allowed to replay the action or go back

    Flow

    Postman collection: DEMO Simulator.postman_collection.json

    StepResultNote

    Call "Create AC definition"

    Success

    Call "Post http-participant parameters"

    Success

    {
        "deploySuccess"true,
        "undeploySuccess"true,
        "lockSuccess"true,
        "unlockSuccess"true,
        "deleteSuccess"true,
        "updateSuccess"true,
        "primeSuccess"true,
        "deprimeSuccess"true,
        "deployTimerMs": 100000,
        "undeployTimerMs": 100000,
        "lockTimerMs": 100000,
        "unlockTimerMs": 100000,
        "updateTimerMs": 100000,
        "deleteTimerMs": 100000,
        "primeTimerMs": 100000,
        "deprimeTimerMs": 100000
    }

    Call "Priming AC definition"

    Success
    Call "Get commission"

    state = "PRIMING",

    stateChangeResult = "NO_ERROR"


    At the time the state is "PRIMING" call:

    • "Priming AC definition"
    • "Depriming AC definition"
    • "Delete AC definition"
    Fail

    User is not allowed to re-prime, deprime and delete
    when the composition is in priming

    Wait Timeout and call "Get commission"

    state = "PRIMING",

    stateChangeResult = "TIMEOUT"


    At the time the state is "PRIMING" and stateChangeResult is "TIMEOUT":

    call "Delete AC definition"

    FailUser is not allowed to delete when the composition is in priming

    At the time the state is "PRIMING" and stateChangeResult is "TIMEOUT":

    call "Priming AC definition"

    SuccessUser is allowed to re-prime when the composition is in priming and timeout

    Call "Get commission"

    state = "PRIMING",

    stateChangeResult = "NO_ERROR"

    After re-prime action, stateChangeResult will be back to NO_ERROR

    At the time the state is "PRIMING" and stateChangeResult is "TIMEOUT":

    call "Depriming AC definition"

    SuccessUser is allowed to deprime when the composition is in priming and timeout

    Call "Get commission"

    state = "DEPRIMING",

    stateChangeResult = "NO_ERROR"

    After deprime action, stateChangeResult will be back to NO_ERROR

    At the time the state is "DEPRIMING" call:

    • "Priming AC definition"
    • "Depriming AC definition"
    • "Delete AC definition"

    Fail

    User is not allowed to prime, deprime and delete
    when the composition is in depriming

    At the time the state is "DEPRIMING" and stateChangeResult is "TIMEOUT":

    call "Delete AC definition"

    Fail

    User is not allowed to delete
    when the composition is in depriming

    At the time the state is "DEPRIMING" and stateChangeResult is "TIMEOUT":

    call "Depriming AC definition"

    Success

    User is allowed to deprime
    when the composition is in depriming and timeout

    Call "Get commission"

    state = "DEPRIMING",

    stateChangeResult = "NO_ERROR"

    After deprime action, stateChangeResult will be back to NO_ERROR

    At the time the state is "DEPRIMING" and stateChangeResult is "TIMEOUT":

    call "Priming AC definition"

    Success

    User is allowed to prime
    when the composition is in depriming and timeout

    when state is "PRIMED" call "Get commission"

    state = "PRIMED",

    stateChangeResult = "NO_ERROR"


    Call "Instantiation AC"Success
    Call "Deploy instantiated"Success
    Call "Get instantiated by instanceId"

    deployState = "DEPLOYING",

    stateChangeResult = "NO_ERROR"


    At the time the deployState is "DEPLOYING" call:

    • "Deploy instantiated"
    • "Undeploy instantiated"
    • "Unlock instantiated"
    • "Lock instantiated"
    • "Update Instantiation AC"
    • "Delete instantiated"
    Fail

    User is not allowed to re-deploy, undeploy, lock, unlock, update and delete
    when the instance is in deploying

    Wait Timeout and call "Get instantiated by instanceId"

    deployState = "DEPLOYING",

    stateChangeResult = "TIMEOUT"


    At the time the deployState is "DEPLOYING" and stateChangeResult is "TIMEOUT":

    • "Unlock instantiated"
    • "Lock instantiated"
    • "Update Instantiation AC"
    • "Delete instantiated"
    Fail

    User is not allowed to lock, unlock, update and delete
    when the instance is in deploying

    At the time the deployState is "DEPLOYING" and stateChangeResult is "TIMEOUT":

    call "Deploy instantiated"

    Success

    User is allowed to re-deploy when the instance is in deploying and timeout

    Call "Get instantiated by instanceId"

    deployState = "DEPLOYING",

    stateChangeResult = "NO_ERROR"

    After deploy action, stateChangeResult will be back to NO_ERROR

    At the time the deployState is "DEPLOYING" and stateChangeResult is "TIMEOUT":

    call "Undeploy instantiated"

    Success

    User is allowed to undeploy when the instance is in deploying and timeout

    Call "Get instantiated by instanceId"

    deployState = "UNDEPLOYING",

    stateChangeResult = "NO_ERROR"

    After undeploy action, stateChangeResult will be back to NO_ERROR

    At the time the deployState is "UNDEPLOYING" call:

    • "Deploy instantiated"
    • "Undeploy instantiated"
    • "Unlock instantiated"
    • "Lock instantiated"
    • "Update Instantiation AC"
    • "Delete instantiated"
    Fail

    User is not allowed to deploy, undeploy, lock, unlock, update and delete
    when the instance is in undeploying

    Wait Timeout and call "Get instantiated by instanceId"

    deployState = "UNDEPLOYING",

    stateChangeResult = "TIMEOUT"


    At the time the deployState is "UNDEPLOYING" and stateChangeResult is "TIMEOUT":

    • "Unlock instantiated"
    • "Lock instantiated"
    • "Update Instantiation AC"
    • "Delete instantiated"
    Fail

    User is not allowed to lock, unlock, update and delete
    when the instance is in undeploying

    At the time the deployState is "UNDEPLOYING" and stateChangeResult is "TIMEOUT":

    call "Undeploy instantiated"

    Success

    User is allowed to undeploy when the instance is in undeploying and timeout

    Call "Get instantiated by instanceId"

    deployState = "UNDEPLOYING",

    stateChangeResult = "NO_ERROR"

    After undeploy action, stateChangeResult will be back to NO_ERROR

    At the time the deployState is "UNDEPLOYING" and stateChangeResult is "TIMEOUT":

    call "Deploy instantiated"

    SuccessUser is allowed to deploy when the instance is in undeploying and timeout
    Wait DEPLOYED and call "Get instantiated by instanceId"

    deployState = "DEPLOYED",

    stateChangeResult = "NO_ERROR"


    Call "Update Instantiation AC"

    Success
    Call "Get instantiated by instanceId"

    deployState = "UPDATING",

    stateChangeResult = "NO_ERROR"


    At the time the lockState is "UPDATING" call:

    • "Deploy instantiated"
    • "Undeploy instantiated"
    • "Unlock instantiated"
    • "Lock instantiated"
    • "Update Instantiation AC"
    • "Delete instantiated"
    Fail

    User is not allowed to deploy, undeploy, lock, unlock, update and delete
    when the instance is in updating

    Wait Timeout and call "Get instantiated by instanceId"

    deployState = "UPDATING",

    stateChangeResult = "TIMEOUT"


    At the time the lockState is "UPDATING" and stateChangeResult is "TIMEOUT" call:

    • "Deploy instantiated"
    • "Undeploy instantiated"
    • "Unlock instantiated"
    • "Lock instantiated"
    • "Delete instantiated"
    Fail

    User is not allowed to deploy, undeploy, lock, unlock and delete
    when the instance is in updating and timeout

    Call "Update Instantiation AC"

    SuccessUser is allowed to update when the instance is in updating and timeout
    Wait the completion of update and call "Get instantiated by instanceId"

    deployState = "DEPLOYED",

    stateChangeResult = "NO_ERROR"


    Call "Unlock instantiated"Success
    Call "Get instantiated by instanceId"

    lockState = "UNLOCKING",

    stateChangeResult = "NO_ERROR"


    At the time the lockState is "UNLOCKING" call:

    • "Deploy instantiated"
    • "Undeploy instantiated"
    • "Unlock instantiated"
    • "Lock instantiated"
    • "Update Instantiation AC"
    • "Delete instantiated"
    Fail

    User is not allowed to deploy, undeploy, lock, unlock, update and delete
    when the instance is in unlocking

    Wait Timeout and call "Get instantiated by instanceId"

    lockState = "UNLOCKING",

    stateChangeResult = "TIMEOUT"


    At the time the lockState is "UNLOCKING" and stateChangeResult is "TIMEOUT" call:

    • "Deploy instantiated"
    • "Undeploy instantiated"
    • "Update Instantiation AC"
    • "Delete instantiated"
    Fail

    User is not allowed to deploy, undeploy, update and delete
    when the instance is in unlocking

    At the time the lockState is "UNLOCKING" and stateChangeResult is "TIMEOUT":

    call "Unlock instantiated"

    Success

    User is allowed to unlock when the instance is in unlocking and timeout

    Call "Get instantiated by instanceId"

    lockState = "UNLOCKING",

    stateChangeResult = "NO_ERROR"

    After unlock action, stateChangeResult will be back to NO_ERROR

    At the time the lockState is "UNLOCKING" and stateChangeResult is "TIMEOUT":

    call "Lock instantiated"

    Success

    User is allowed to lock when the instance is in unlocking and timeout

    Call "Get instantiated by instanceId"

    lockState = "LOCKING",

    stateChangeResult = "NO_ERROR"

    After lock action, stateChangeResult will be back to NO_ERROR

    At the time the lockState is "LOCKING" call:

    • "Deploy instantiated"
    • "Undeploy instantiated"
    • "Unlock instantiated"
    • "Lock instantiated"
    • "Delete instantiated"
    Fail

    User is not allowed to deploy, undeploy, lock, unlock and delete
    when the instance is in locking

    Wait Timeout and call "Get instantiated by instanceId"

    lockState = "LOCKING",

    stateChangeResult = "TIMEOUT"


    At the time the lockState is "LOCKING" and stateChangeResult is "TIMEOUT" call:

    • "Deploy instantiated"
    • "Undeploy instantiated"
    • "Delete instantiated"
    Fail

    User is not allowed to deploy, undeploy and delete
    when the instance is in locking

    At the time the lockState is "LOCKING" and stateChangeResult is "TIMEOUT":

    call "Lock instantiated"

    Success

    User is allowed to lock when the instance is in locking and timeout

    Call "Get instantiated by instanceId"

    lockState = "LOCKING",

    stateChangeResult = "NO_ERROR"

    After lock action, stateChangeResult will be back to NO_ERROR

    At the time the lockState is "LOCKING" and stateChangeResult is "TIMEOUT":

    call "Unlock instantiated"

    Success

    User is allowed to unlock when the instance is in locking and timeout

    Call "Get instantiated by instanceId"

    lockState = "UNLOCKING",

    stateChangeResult = "NO_ERROR"

    After unlock action, stateChangeResult will be back to NO_ERROR
    Wait UNLOCKED and call "Get instantiated by instanceId"

    lockState = "UNLOCKED",

    stateChangeResult = "NO_ERROR"


    Call "Post http-participant parameters"

    Success

    {
        "deploySuccess"true,
        "undeploySuccess"true,
        "lockSuccess"true,
        "unlockSuccess"true,
        "deleteSuccess"true,
        "updateSuccess"true,
        "primeSuccess"true,
        "deprimeSuccess"true,
        "deployTimerMs"100,
        "undeployTimerMs"100,
        "lockTimerMs"100,
        "unlockTimerMs"100,
        "updateTimerMs"100,
        "deleteTimerMs": 100000,
        "primeTimerMs"100,
        "deprimeTimerMs"100
    }

    Call "Lock instantiated"Success
    Call "Get instantiated by instanceId"

    lockState = "LOCKED",

    stateChangeResult = "NO_ERROR"


    Call "Undeploy instantiated"Success
    Call "Get instantiated by instanceId"

    deployState = "UNDEPLOYED",

    stateChangeResult = "NO_ERROR"


    Call "Delete instantiated"Success
    Call "Get instantiated by instanceId"

    deployState = "DELETING",

    stateChangeResult = "NO_ERROR"


    At the time the deployState is "DELETING" call:

    • "Deploy instantiated"
    • "Undeploy instantiated"
    • "Unlock instantiated"
    • "Lock instantiated"
    • "Update Instantiation AC"
    • "Delete instantiated"
    Fail

    User is not allowed to deploy, undeploy, lock, unlock, update and delete
    when the instance is in deleting

    Wait Timeout and call "Get instantiated by instanceId"

    deployState = "DELETING",

    stateChangeResult = "TIMEOUT"


    At the time the deployState is "DELETING" and stateChangeResult is "TIMEOUT" call:

    • "Deploy instantiated"
    • "Undeploy instantiated"
    • "Unlock instantiated"
    • "Lock instantiated"
    • "Update Instantiation AC"
    Fail

    User is not allowed to deploy, undeploy, lock, unlock and update
    when the instance is in deleting and timeout

    Call "Delete instantiated"SuccessUser is allowed to delete when the instance is in deleting and timeout
    Call "Get instantiated by instanceId"

    deployState = "DELETING",

    stateChangeResult = "NO_ERROR"

    After delete action, stateChangeResult will be back to NO_ERROR
    Wait for delete and call "Get instantiated list"No instances
    Call "Depriming AC definition"Success
    Call "Delete AC definition"Success