1 Feature: ACM migration workflow
2 # Verifies ACM migration of instance from one AC definition to another
4 Scenario: ACM Health check should be up
5 When the acm health check endpoint is invoked "/onap/policy/clamp/acm/health"
6 Then the response status code should be 200
8 Scenario Outline: Verify the ACM commissioning works
9 When the ACM commissioning endpoint "/onap/policy/clamp/acm/v2/compositions" is invoked with "<AcDefinitionFile>" "<isMigration>"
10 Then the response status code should be 201
12 | AcDefinitionFile | isMigration |
13 | src/test/resources/data/acelement-usecase2.json | false |
15 Scenario: Make sure the participants are registered with runtime
16 When the register participants endpoint is invoked "/onap/policy/clamp/acm/v2/participants"
17 Then the response status code should be 202
19 Scenario Outline: Verify the priming is accepted
20 When the ACM participants are primed "/onap/policy/clamp/acm/v2/compositions/{compositionId}" "<isMigration>"
21 Then the response status code should be 202
26 Scenario Outline: Wait until all the participants are primed
27 When the ACM composition is fetched "/onap/policy/clamp/acm/v2/compositions/{compositionId}"
28 Then the response status code should be 200
29 Then Wait and retry until the response contains the keyword "PRIMED" "/onap/policy/clamp/acm/v2/compositions/{compositionId}" "<isMigration>"
34 Scenario Outline: Verify AC Instantiation works
35 When the ACM instance is created "/onap/policy/clamp/acm/v2/compositions/{compositionId}/instances" with "<AcInstantiateFile>"
36 Then the response status code should be 201
39 | src/test/resources/data/AcInstantiate.json |
41 Scenario: Verify the AC deployment is accepted
42 When the AC instance is deployed "/onap/policy/clamp/acm/v2/compositions/{compositionId}/instances/{instanceId}"
43 Then the response status code should be 202
45 Scenario Outline: Wait until all the AC elements are deployed
46 When the AC instance is fetched "/onap/policy/clamp/acm/v2/compositions/{compositionId}/instances/{instanceId}" "<isMigration>"
47 Then the response status code should be 200
48 Then Wait and retry until the response contains the keyword "DEPLOYED" "/onap/policy/clamp/acm/v2/compositions/{compositionId}/instances/{instanceId}" "<isMigration>"
53 Scenario Outline: Commission the AC definition file for migration
54 When the ACM commissioning endpoint "/onap/policy/clamp/acm/v2/compositions" is invoked with "<AcDefinitionFile>" "<isMigration>"
55 Then the response status code should be 201
57 | AcDefinitionFile | isMigration |
58 | src/test/resources/data/acelement-usecase2.json | true |
60 Scenario Outline: Prime the second AC definition to the participants
61 When the ACM participants are primed "/onap/policy/clamp/acm/v2/compositions/{compositionId}" "<isMigration>"
62 Then the response status code should be 202
67 Scenario Outline: Wait until all the participants are primed
68 When the ACM composition is fetched "/onap/policy/clamp/acm/v2/compositions/{compositionId}"
69 Then the response status code should be 200
70 Then Wait and retry until the response contains the keyword "PRIMED" "/onap/policy/clamp/acm/v2/compositions/{compositionId}" "<isMigration>"
75 Scenario Outline: Migrate the existing instance to the new AC definition
76 When the ACM instance is migrated "/onap/policy/clamp/acm/v2/compositions/{compositionId}/instances" with "<AcMigrationFile>"
77 Then the response status code should be 200
80 | src/test/resources/data/AcMigrateInstance.json |
82 Scenario Outline: Wait until all the AC elements are migrated
83 When the AC instance is fetched "/onap/policy/clamp/acm/v2/compositions/{compositionId}/instances/{instanceId}" "<isMigration>"
84 Then the response status code should be 200
85 Then Wait and retry until the response contains the keyword "DEPLOYED" "/onap/policy/clamp/acm/v2/compositions/{compositionId}/instances/{instanceId}" "<isMigration>"