From 1890f6a811c461983bcd27b50b185b3baca392b5 Mon Sep 17 00:00:00 2001 From: jhh Date: Tue, 19 May 2020 13:31:39 -0500 Subject: add stability test scripts Issue-ID: POLICY-2456 Signed-off-by: jhh Change-Id: I89a325cfc2dedd10936c28176a0e11e5c54f24b4 Signed-off-by: jhh --- .../stability/src/main/resources/frankfurt/s3p.jmx | 3172 ++++++++++++++++++++ 1 file changed, 3172 insertions(+) create mode 100644 testsuites/stability/src/main/resources/frankfurt/s3p.jmx (limited to 'testsuites/stability/src') diff --git a/testsuites/stability/src/main/resources/frankfurt/s3p.jmx b/testsuites/stability/src/main/resources/frankfurt/s3p.jmx new file mode 100644 index 000000000..d16cb8240 --- /dev/null +++ b/testsuites/stability/src/main/resources/frankfurt/s3p.jmx @@ -0,0 +1,3172 @@ + + + + + + false + true + false + + + + API_HOST + 10.12.5.193 + = + + + API_PORT + 30709 + = + + + PAP_HOST + 10.12.5.193 + = + + + PAP_PORT + 32425 + = + + + DMAAP_HOST + 10.12.5.193 + = + + + DMAAP_PORT + 30226 + = + + + DROOLS_HOST + 10.12.5.193 + = + + + DROOLS_PORT + 30789 + = + + + duration + 259200 + = + + + + + + + + + + Accept + application/json + + + Content-Type + application/json + + + + + + + + https://${API_HOST}:${API_PORT}/policy/api/v1 + healthcheck + zb!XztG34 + + + + + https://${PAP_HOST}:${PAP_PORT}/policy/pap/v1 + healthcheck + zb!XztG34 + + + + + https://${DROOLS_HOST}:${DROOLS_PORT}/policy/pdp/engine + demo@people.osaaf.org + demo123456! + + + + + + + + + + + + 9696 + http + + + 6 + + + + + + continue + + false + 1 + + 1 + 1 + false + + + + + + + + + + + ${API_HOST} + ${API_PORT} + https + + /policy/api/v1/healthcheck + GET + false + false + false + false + + + + + + + + 200 + + + Assertion.response_code + false + 8 + + + + $.healthy + true + true + false + false + false + + + + + true + + + + false + { + "tosca_definitions_version": "tosca_simple_yaml_1_1_0", + "topology_template": { + "policies": [ + { + "operational.restart": { + "type": "onap.policies.controlloop.operational.common.Drools", + "type_version": "1.0.0", + "version": "1.0.0", + "metadata": { + "policy-id": "operational.restart" + }, + "properties": { + "id": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e", + "timeout": 60, + "abatement": false, + "trigger": "unique-policy-id-1-restart", + "operations": [ + { + "id": "unique-policy-id-1-restart", + "description": "Restart the VM", + "operation": { + "actor": "APPC", + "operation": "Restart", + "target": { + "targetType": "VNF" + } + }, + "timeout": 20, + "retries": 0, + "success": "final_success", + "failure": "final_failure", + "failure_timeout": "final_failure_timeout", + "failure_retries": "final_failure_retries", + "failure_exception": "final_failure_exception", + "failure_guard": "final_failure_guard" + } + ], + "controllerName": "frankfurt" + } + } + } + ] + } +} + = + + + + ${API_HOST} + ${API_PORT} + https + + policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Drools/versions/1.0.0/policies + POST + false + false + false + false + + + + + + + + 200 + + + Assertion.response_code + false + 8 + + + + + true + + + + false + { + "tosca_definitions_version": "tosca_simple_yaml_1_1_0", + "topology_template": { + "policies": [ + { + "operational.restart.fail": { + "type": "onap.policies.controlloop.operational.common.Drools", + "type_version": "1.0.0", + "version": "1.0.0", + "metadata": { + "policy-id": "operational.restart.fail" + }, + "properties": { + "id": "ControlLoop-vCPE-Fail", + "timeout": 60, + "abatement": false, + "trigger": "unique-policy-id-1-restart", + "operations": [ + { + "id": "unique-policy-id-1-restart", + "description": "Restart the VM", + "operation": { + "actor": "APPC", + "operation": "Restart", + "target": { + "targetType": "VNF" + } + }, + "timeout": 20, + "retries": 0, + "success": "final_success", + "failure": "final_failure", + "failure_timeout": "final_failure_timeout", + "failure_retries": "final_failure_retries", + "failure_exception": "final_failure_exception", + "failure_guard": "final_failure_guard" + } + ], + "controllerName": "frankfurt" + } + } + } + ] + } +} + = + + + + ${API_HOST} + ${API_PORT} + https + + policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Drools/versions/1.0.0/policies + POST + false + false + false + false + + + + + + + + 200 + + + Assertion.response_code + false + 8 + + + + + true + + + + false + { + "tosca_definitions_version": "tosca_simple_yaml_1_1_0", + "topology_template": { + "policies": [ + { + "operational.modifyconfig": { + "type": "onap.policies.controlloop.operational.common.Drools", + "type_version": "1.0.0", + "version": "1.0.0", + "metadata": { + "policy-id": "operational.modifyconfig" + }, + "properties": { + "id": "ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a", + "timeout": 60, + "abatement": false, + "trigger": "unique-policy-id-1-modifyConfig", + "operations": [ + { + "id": "unique-policy-id-1-modifyConfig", + "description": "Modify the packet generator", + "operation": { + "actor": "APPC", + "operation": "ModifyConfig", + "target": { + "targetType": "VNF", + "entityIds": { + "resourceID": "bbb3cefd-01c8-413c-9bdd-2b92f9ca3d38" + } + }, + "payload": { + "streams": "{\"active-streams\": 5 }" + } + }, + "timeout": 20, + "retries": 0, + "success": "final_success", + "failure": "final_failure", + "failure_timeout": "final_failure_timeout", + "failure_retries": "final_failure_retries", + "failure_exception": "final_failure_exception", + "failure_guard": "final_failure_guard" + } + ], + "controllerName": "frankfurt" + } + } + } + ] + } +} + = + + + + ${API_HOST} + ${API_PORT} + https + + policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Drools/versions/1.0.0/policies + POST + false + false + false + false + + + + + + + + 200 + + + Assertion.response_code + false + 8 + + + + + true + + + + false + { + "tosca_definitions_version": "tosca_simple_yaml_1_1_0", + "topology_template": { + "policies": [ + { + "operational.scaleout": { + "type": "onap.policies.controlloop.operational.common.Drools", + "type_version": "1.0.0", + "version": "1.0.0", + "metadata": { + "policy-id": "operational.scaleout" + }, + "properties": { + "id": "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3", + "timeout": 60, + "abatement": false, + "trigger": "unique-policy-id-1-scale-up", + "operations": [ + { + "id": "unique-policy-id-1-scale-up", + "description": "Create a new VF Module", + "operation": { + "actor": "SO", + "operation": "VF Module Create", + "target": { + "targetType": "VFMODULE", + "entityIds": { + "modelInvariantId": "e6130d03-56f1-4b0a-9a1d-e1b2ebc30e0e", + "modelVersionId": "94b18b1d-cc91-4f43-911a-e6348665f292", + "modelName": "VfwclVfwsnkBbefb8ce2bde..base_vfw..module-0", + "modelVersion": 1, + "modelCustomizationId": "47958575-138f-452a-8c8d-d89b595f8164" + } + }, + "payload": { + "requestParameters": "{\"usePreload\":true,\"userParams\":[]}", + "configurationParameters": "[{\"ip-addr\":\"$.vf-module-topology.vf-module-parameters.param[9]\",\"oam-ip-addr\":\"$.vf-module-topology.vf-module-parameters.param[16]\",\"enabled\":\"$.vf-module-topology.vf-module-parameters.param[23]\"}]" + } + }, + "timeout": 20, + "retries": 0, + "success": "final_success", + "failure": "final_failure", + "failure_timeout": "final_failure_timeout", + "failure_retries": "final_failure_retries", + "failure_exception": "final_failure_exception", + "failure_guard": "final_failure_guard" + } + ], + "controllerName": "frankfurt" + } + } + } + ] + } +} + = + + + + ${API_HOST} + ${API_PORT} + https + + policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Drools/versions/1.0.0/policies + POST + false + false + false + false + + + + + + + + 200 + + + Assertion.response_code + false + 8 + + + + + true + + + + false + { + "tosca_definitions_version": "tosca_simple_yaml_1_1_0", + "topology_template": { + "policies": [ + { + "operational.scaleout.fail": { + "type": "onap.policies.controlloop.operational.common.Drools", + "type_version": "1.0.0", + "version": "1.0.0", + "metadata": { + "policy-id": "operational.scaleout.fail" + }, + "properties": { + "id": "ControlLoop-vDNS-Fail", + "timeout": 60, + "abatement": false, + "trigger": "unique-policy-id-1-scale-up", + "operations": [ + { + "id": "unique-policy-id-1-scale-up", + "description": "Create a new VF Module", + "operation": { + "actor": "SO", + "operation": "VF Module Create", + "target": { + "targetType": "VFMODULE", + "entityIds": { + "modelInvariantId": "e6130d03-56f1-4b0a-9a1d-e1b2ebc30e0e", + "modelVersionId": "94b18b1d-cc91-4f43-911a-e6348665f292", + "modelName": "VfwclVfwsnkBbefb8ce2bde..base_vfw..module-0", + "modelVersion": 1, + "modelCustomizationId": "47958575-138f-452a-8c8d-d89b595f8164" + } + }, + "payload": { + "requestParameters": "{\"usePreload\":true,\"userParams\":[]}", + "configurationParameters": "[{\"ip-addr\":\"$.vf-module-topology.vf-module-parameters.param[9]\",\"oam-ip-addr\":\"$.vf-module-topology.vf-module-parameters.param[16]\",\"enabled\":\"$.vf-module-topology.vf-module-parameters.param[23]\"}]" + } + }, + "timeout": 20, + "retries": 0, + "success": "final_success", + "failure": "final_failure", + "failure_timeout": "final_failure_timeout", + "failure_retries": "final_failure_retries", + "failure_exception": "final_failure_exception", + "failure_guard": "final_failure_guard" + } + ], + "controllerName": "frankfurt" + } + } + } + ] + } +} + = + + + + ${API_HOST} + ${API_PORT} + https + + policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Drools/versions/1.0.0/policies + POST + false + false + false + false + + + + + + + + 200 + + + Assertion.response_code + false + 8 + + + + + + + + + + + ${PAP_HOST} + ${PAP_PORT} + https + + /policy/pap/v1/healthcheck + GET + false + false + false + false + + + + + + + + 200 + + + Assertion.response_code + false + 8 + + + + $.healthy + true + true + false + false + false + + + + + true + + + + false + {"policies":[{"policy-id":"operational.restart", "version": "1.0.0"}]} + = + + + + ${PAP_HOST} + ${PAP_PORT} + https + + policy/pap/v1/pdps/policies + POST + false + false + false + false + + + + + + + + 200 + + + Assertion.response_code + false + 8 + + + + + true + + + + false + {"policies":[{"policy-id":"operational.restart.fail", "version": "1.0.0"}]} + = + + + + ${PAP_HOST} + ${PAP_PORT} + https + + policy/pap/v1/pdps/policies + POST + false + false + false + false + + + + + + + + 200 + + + Assertion.response_code + false + 8 + + + + + true + + + + false + {"policies":[{"policy-id":"operational.modifyconfig", "version": "1.0.0"}]} + = + + + + ${PAP_HOST} + ${PAP_PORT} + https + + policy/pap/v1/pdps/policies + POST + false + false + false + false + + + + + + + + 200 + + + Assertion.response_code + false + 8 + + + + + true + + + + false + {"policies":[{"policy-id":"operational.scaleout", "version": "1.0.0"}]} + = + + + + ${PAP_HOST} + ${PAP_PORT} + https + + policy/pap/v1/pdps/policies + POST + false + false + false + false + + + + + + + + 200 + + + Assertion.response_code + false + 8 + + + + + true + + + + false + {"policies":[{"policy-id":"operational.scaleout.fail", "version": "1.0.0"}]} + = + + + + ${PAP_HOST} + ${PAP_PORT} + https + + policy/pap/v1/pdps/policies + POST + false + false + false + false + + + + + + + + 200 + + + Assertion.response_code + false + 8 + + + + + + + + + ${DMAAP_HOST} + ${DMAAP_PORT} + https + + events/POLICY-PDP-PAP/${__time()}/1?timeout=2000 + GET + false + false + false + false + + + + + + + + 200 + + + Assertion.response_code + false + 8 + + + + + + + + ${DMAAP_HOST} + ${DMAAP_PORT} + https + + events/POLICY-CL-MGT/vcpesuccess/1?timeout=20000 + GET + false + false + false + false + + + + + + + + 200 + + + Assertion.response_code + false + 8 + + + + + + + + ${DMAAP_HOST} + ${DMAAP_PORT} + https + + events/APPC-LCM-READ/vcpesuccess/1?timeout=20000 + GET + false + false + false + false + + + + + + + + 200 + + + Assertion.response_code + false + 8 + + + + + + + + ${DMAAP_HOST} + ${DMAAP_PORT} + https + + events/POLICY-CL-MGT/vcpefailure/1?timeout=20000 + GET + false + false + false + false + + + + + + + + 200 + + + Assertion.response_code + false + 8 + + + + + + + + ${DMAAP_HOST} + ${DMAAP_PORT} + https + + events/APPC-LCM-READ/vcpefailure/1?timeout=20000 + GET + false + false + false + false + + + + + + + + 200 + + + Assertion.response_code + false + 8 + + + + + + + + ${DROOLS_HOST} + ${DROOLS_PORT} + https + + policy/pdp/engine/controllers/frankfurt/drools/facts + GET + false + false + false + false + + + + + + + + 200 + + + Assertion.response_code + false + 8 + + + + $.frankfurt + 10 + true + false + false + false + + + + + + startnextloop + + false + -1 + + 1 + 1 + true + ${duration} + 1 + + + + + consumerGroup + + + + vcpesuccess + + + false + Global to the thread group + + + + + requestId + + + + ${__UUID()} + + + true + Update on a per iteration basis + + + + true + + + + false + { + "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e", + "closedLoopAlarmStart": 1463679805324, + "closedLoopEventClient": "DCAE_INSTANCE_ID.dcae-tca", + "closedLoopEventStatus": "ONSET", + "requestID": "${requestId}", + "target_type": "VNF", + "target": "generic-vnf.vnf-id", + "AAI": { + "vserver.is-closed-loop-disabled": "false", + "vserver.prov-status": "ACTIVE", + "generic-vnf.vnf-id": "vCPE_Infrastructure_vGMUX_demo_app" + }, + "from": "DCAE", + "version": "1.0.2" +} + = + + + + ${DROOLS_HOST} + ${DROOLS_PORT} + https + + policy/pdp/engine/topics/sources/dmaap/DCAE_TOPIC/events + PUT + false + false + false + false + + + + + + + + + Content-Type + text/plain + + + + + + + groovy + + + true + vars.put("counter", "0"); + + + + ${__javaScript(${counter} < 10)} + + + + + + + true + {"class":"And", "filters": [ { "class":"Equals", "field":"request-id", "value":"${requestId}" }, { "class":"Equals", "field":"rpc-name", "value":"restart" }]} + = + true + filter + + + + ${DMAAP_HOST} + ${DMAAP_PORT} + https + + events/APPC-LCM-READ/${consumerGroup}/1?timeout=15000&limit=1 + GET + false + false + false + false + + + + + + + + [] + + + Assertion.response_data + false + 12 + + + + false + requestIdOnset + \\"request-id\\":\\"(.+?)\\" + $1$ + none + + + + + false + correlationId + correlation-id\\":\\"(.+?)\\" + $1$ + none + + + + + false + subRequestId + sub-request-id\\":\\"(.+?)\\" + $1$ + none + + + + + groovy + + + true + String requestIdOnset = vars.get("requestIdOnset"); +String requestId = vars.get("requestId"); +String correlationId = vars.get("correlationId"); +String subRequestId = vars.get("subRequestId"); +String counter = vars.get("counter"); + +String transaction = "none"; + +log.info ("The requestId id is " + requestId); +log.info ("The requestIdOnset id is " + requestIdOnset); +log.info ("The correlation id is " + correlationId); +log.info ("The subrequest id is " + subRequestId); +log.info ("The counter is " + counter); + +if ( requestId == requestIdOnset ) { + if ( correlationId == "none" || subRequestId == "none" ) { + transaction = "FINAL"; + log.info ("Final Failure Transaction"); + AssertionResult.setFailureMessage("Missing correlationId or subRequestId"); + AssertionResult.setFailure(true); + } else { + transaction = "FINAL"; + vars.put("transaction", "FINAL"); + log.info ("Final Success Transaction"); + } +} + +int counterTemp = Integer.parseInt(counter) +1; +if (transaction == "FINAL") { + counterTemp = 99; +} else if (counterTemp >= 10) { + AssertionResult.setFailureMessage("Failure, reached maximum number of 10 attempts "); + AssertionResult.setFailure(true); +} + +vars.put("counter", Integer.toString(counterTemp)); + + + + + + + + true + + + + false + { + "body": { + "output": { + "common-header": { + "timestamp": "2020-05-05T15:56:34.845Z", + "api-ver": "2.00", + "originator-id": "${requestId}", + "request-id": "${requestId}", + "sub-request-id": "${subRequestId}", + "flags": {} + }, + "status": { + "code": 400, + "message": "Restart Successful" + } + } + }, + "version": "2.0", + "rpc-name": "restart", + "correlation-id": "${correlationId}", + "type": "response" +} + + = + + + + ${DROOLS_HOST} + ${DROOLS_PORT} + https + + policy/pdp/engine/topics/sources/dmaap/APPC-LCM-WRITE/events + PUT + false + false + false + false + + + + + + + + + Content-Type + text/plain + + + + + + + groovy + + + true + vars.put("counter", "0"); + + + + ${__javaScript(${counter} < 60)} + + + + + + + true + {"class":"And", "filters": [ { "class":"Equals", "field":"requestId", "value":"${requestId}" }, { "class":"Equals", "field":"notification", "value":"FINAL: SUCCESS" }]} + = + true + filter + + + + ${DMAAP_HOST} + ${DMAAP_PORT} + https + + events/POLICY-CL-MGT/${consumerGroup}/1?timeout=15000&limit=1 + GET + false + false + false + false + + + + + + + + [] + + + Assertion.response_data + false + 12 + + + + false + requestIdOnset + requestId\\": \\"(.+?)\\" + $1$ + none + + + + + false + notification + notification\\": \\"FINAL: (.+?)\\" + $1$ + none + + + + + groovy + + + true + String requestIdOnset = vars.get("requestIdOnset"); +String requestId = vars.get("requestId"); +String notification = vars.get("notification"); +String counter = vars.get("counter"); + +String transaction = "none"; + +log.info ("The requestId id is " + requestId); +log.info ("The requestIdOnset id is " + requestIdOnset); +log.info ("The notification is " + notification); +log.info ("The transaction is " + transaction); +log.info ("The counter is " + counter); + +if ( requestId == requestIdOnset ) { + if ( notification == "SUCCESS" ) { + transaction = "FINAL"; + log.info ("Final Success Transaction"); + log.info ("The notification is SUCCESS"); + } else if ( notification == "FAILURE" ) { + transaction = "FINAL"; + log.info ("Final Failure Transaction"); + AssertionResult.setFailureMessage("Bad final notification"); + AssertionResult.setFailure(true); + } +} + +int counterTemp = Integer.parseInt(counter) +1; +if (transaction == "FINAL") { + counterTemp = 99; +} else if (counterTemp >= 60) { + AssertionResult.setFailureMessage("Failure, reached maximum number of attempts "); + AssertionResult.setFailure(true); +} + +vars.put("counter", Integer.toString(counterTemp)); + + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + true + false + false + false + true + 0 + true + true + true + true + true + true + + + + + + + + startnextloop + + false + -1 + + 1 + 1 + true + ${duration} + 5 + + + + + consumerGroup + + + + vcpefailure + + + false + Global to the thread group + + + + + requestId + + + + ${__UUID()} + + + true + Update on a per iteration basis + + + + true + + + + false + { + "closedLoopControlName": "ControlLoop-vCPE-Fail", + "closedLoopAlarmStart": 1463679805324, + "closedLoopEventClient": "DCAE_INSTANCE_ID.dcae-tca", + "closedLoopEventStatus": "ONSET", + "requestID": "${requestId}", + "target_type": "VNF", + "target": "generic-vnf.vnf-id", + "AAI": { + "vserver.is-closed-loop-disabled": "false", + "vserver.prov-status": "ACTIVE", + "generic-vnf.vnf-id": "a_fail_vnf_id" + }, + "from": "DCAE", + "version": "1.0.2" +} + = + + + + ${DROOLS_HOST} + ${DROOLS_PORT} + https + + policy/pdp/engine/topics/sources/dmaap/DCAE_TOPIC/events + PUT + false + false + false + false + + + + + + + + + Content-Type + text/plain + + + + + + + groovy + + + true + vars.put("counter", "0"); + + + + ${__javaScript(${counter} < 10)} + + + + + + + true + {"class":"And", "filters": [ { "class":"Equals", "field":"request-id", "value":"${requestId}" }, { "class":"Equals", "field":"rpc-name", "value":"restart" }]} + = + true + filter + + + + ${DMAAP_HOST} + ${DMAAP_PORT} + https + + events/APPC-LCM-READ/${consumerGroup}/1?timeout=15000&limit=1 + GET + false + false + false + false + + + + + + + + [] + + + Assertion.response_data + false + 12 + + + + false + requestIdOnset + \\"request-id\\":\\"(.+?)\\" + $1$ + none + + + + + false + correlationId + correlation-id\\":\\"(.+?)\\" + $1$ + none + + + + + false + subRequestId + sub-request-id\\":\\"(.+?)\\" + $1$ + none + + + + + groovy + + + true + String requestIdOnset = vars.get("requestIdOnset"); +String requestId = vars.get("requestId"); +String correlationId = vars.get("correlationId"); +String subRequestId = vars.get("subRequestId"); +String counter = vars.get("counter"); + +String transaction = "none"; + +log.info ("The requestId id is " + requestId); +log.info ("The requestIdOnset id is " + requestIdOnset); +log.info ("The correlation id is " + correlationId); +log.info ("The subrequest id is " + subRequestId); +log.info ("The counter is " + counter); + +if ( requestId == requestIdOnset ) { + if ( correlationId == "none" || subRequestId == "none" ) { + transaction = "FINAL"; + log.info ("Final Failure Transaction"); + AssertionResult.setFailureMessage("Missing correlationId or subRequestId"); + AssertionResult.setFailure(true); + } else { + transaction = "FINAL"; + vars.put("transaction", "FINAL"); + log.info ("Final Success Transaction"); + } +} + +int counterTemp = Integer.parseInt(counter) +1; +if (transaction == "FINAL") { + counterTemp = 99; +} else if (counterTemp >= 10) { + AssertionResult.setFailureMessage("Failure, reached maximum number of 10 attempts "); + AssertionResult.setFailure(true); +} + +vars.put("counter", Integer.toString(counterTemp)); + + + + + + + + true + + + + false + { + "body": { + "output": { + "common-header": { + "timestamp": "2020-05-07T15:56:34.845Z", + "api-ver": "2.00", + "originator-id": "${requestId}", + "request-id": "${requestId}", + "sub-request-id": "${subRequestId}", + "flags": {} + }, + "status": { + "code": 450, + "message": "Restart Failed" + } + } + }, + "version": "2.0", + "rpc-name": "restart", + "correlation-id": "${correlationId}", + "type": "response" +} + + = + + + + ${DROOLS_HOST} + ${DROOLS_PORT} + https + + policy/pdp/engine/topics/sources/dmaap/APPC-LCM-WRITE/events + PUT + false + false + false + false + + + + + + + + + Content-Type + text/plain + + + + + + + groovy + + + true + vars.put("counter", "0"); + + + + ${__javaScript(${counter} < 60)} + + + + + + + true + {"class":"And", "filters": [ { "class":"Equals", "field":"requestId", "value":"${requestId}" }, { "class":"Equals", "field":"notification", "value":"FINAL: FAILURE" }]} + = + true + filter + + + + ${DMAAP_HOST} + ${DMAAP_PORT} + https + + events/POLICY-CL-MGT/${consumerGroup}/1?timeout=15000&limit=1 + GET + false + false + false + false + + + + + + + + [] + + + Assertion.response_data + false + 12 + + + + false + requestIdOnset + requestId\\": \\"(.+?)\\" + $1$ + none + + + + + false + notification + notification\\": \\"FINAL: (.+?)\\" + $1$ + none + + + + + groovy + + + true + String requestIdOnset = vars.get("requestIdOnset"); +String requestId = vars.get("requestId"); +String notification = vars.get("notification"); +String counter = vars.get("counter"); + +String transaction = "none"; + +log.info ("The requestId id is " + requestId); +log.info ("The requestIdOnset id is " + requestIdOnset); +log.info ("The notification is " + notification); +log.info ("The transaction is " + transaction); +log.info ("The counter is " + counter); + +if ( requestId == requestIdOnset ) { + if ( notification == "SUCCESS" ) { + transaction = "FINAL"; + log.info ("Final Success Transaction"); + AssertionResult.setFailureMessage("Unexpected SUCCESS notification"); + AssertionResult.setFailure(true); + } else if ( notification == "FAILURE" ) { + transaction = "FINAL"; + log.info ("Final Failure Transaction"); + } +} + +int counterTemp = Integer.parseInt(counter) +1; +if (transaction == "FINAL") { + counterTemp = 99; +} else if (counterTemp >= 60) { + AssertionResult.setFailureMessage("Failure, reached maximum number of 10 attempts "); + AssertionResult.setFailure(true); +} + +vars.put("counter", Integer.toString(counterTemp)); + + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + true + false + false + false + true + 0 + true + true + true + true + true + true + + + + + + + + startnextloop + + false + -1 + + 1 + 1 + true + ${duration} + 10 + + + + + consumerGroup + + + + vdnssuccess + + + false + Global to the thread group + + + + + requestId + + + + ${__UUID()} + + + true + Update on a per iteration basis + + + + true + + + + false + { + "closedLoopControlName": "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3", + "closedLoopAlarmStart": 1463679805324, + "closedLoopEventClient": "microservice.stringmatcher", + "closedLoopEventStatus": "ONSET", + "requestID": "${requestId}", + "target_type": "VNF", + "target": "vserver.vserver-name", + "AAI": { + "vserver.is-closed-loop-disabled": "false", + "vserver.prov-status": "ACTIVE", + "vserver.vserver-name": "OzVServer" + }, + "from": "DCAE", + "version": "1.0.2" +} + = + + + + ${DROOLS_HOST} + ${DROOLS_PORT} + https + + policy/pdp/engine/topics/sources/dmaap/DCAE_TOPIC/events + PUT + false + false + false + false + + + + + + + + + Content-Type + text/plain + + + + + + + groovy + + + true + vars.put("counter", "0"); +vars.put("transaction", "none"); + + + + ${__javaScript(${counter} < 60)} + + + + + + + true + {"class":"And", "filters": [ { "class":"Equals", "field":"requestId", "value":"${requestId}" }, { "class":"Equals", "field":"notification", "value":"FINAL: SUCCESS" }]} + = + true + filter + + + + ${DMAAP_HOST} + ${DMAAP_PORT} + https + + events/POLICY-CL-MGT/${consumerGroup}/1?timeout=20000&limit=1 + GET + false + false + false + false + + + + + + + + [] + + + Assertion.response_data + false + 12 + + + + false + requestIdOnset + requestId\\": \\"(.+?)\\" + $1$ + none + + + + + false + notification + notification\\": \\"FINAL: (.+?)\\" + $1$ + none + + + + + groovy + + + true + String requestIdOnset = vars.get("requestIdOnset"); +String requestId = vars.get("requestId"); +String notification = vars.get("notification"); +String counter = vars.get("counter"); + +String transaction = "none"; + +log.info ("The requestId id is " + requestId); +log.info ("The requestIdOnset id is " + requestIdOnset); +log.info ("The notification is " + notification); +log.info ("The transaction is " + transaction); +log.info ("The counter is " + counter); + +if ( requestId == requestIdOnset ) { + if ( notification == "SUCCESS" ) { + transaction = "FINAL"; + log.info ("Final Success Transaction"); + log.info ("The notification is SUCCESS"); + } else if ( notification == "FAILURE" ) { + transaction = "FINAL"; + log.info ("Final Failure Transaction"); + AssertionResult.setFailureMessage("Bad final notification"); + AssertionResult.setFailure(true); + } +} + +int counterTemp = Integer.parseInt(counter) +1; +if (transaction == "FINAL") { + counterTemp = 99; +} else if (counterTemp >= 60) { + AssertionResult.setFailureMessage("Failure, reached maximum number of attempts "); + AssertionResult.setFailure(true); +} + +vars.put("counter", Integer.toString(counterTemp)); + + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + true + false + false + false + true + 0 + true + true + true + true + true + true + + + + + + + + startnextloop + + false + -1 + + 1 + 1 + true + ${duration} + 15 + + + + + consumerGroup + + + + vdnsfailure + + + false + Global to the thread group + + + + + requestId + + + + ${__UUID()} + + + true + Update on a per iteration basis + + + + true + + + + false + { + "closedLoopControlName": "ControlLoop-vDNS-Fail", + "closedLoopAlarmStart": 1463679805324, + "closedLoopEventClient": "microservice.stringmatcher", + "closedLoopEventStatus": "ONSET", + "requestID": "${requestId}", + "target_type": "VNF", + "target": "vserver.vserver-name", + "AAI": { + "vserver.is-closed-loop-disabled": "false", + "vserver.prov-status": "ACTIVE", + "vserver.vserver-name": "AAA" + }, + "from": "DCAE", + "version": "1.0.2" +} + = + + + + ${DROOLS_HOST} + ${DROOLS_PORT} + https + + policy/pdp/engine/topics/sources/dmaap/DCAE_TOPIC/events + PUT + false + false + false + false + + + + + + + + + Content-Type + text/plain + + + + + + + groovy + + + true + vars.put("counter", "0"); +vars.put("transaction", "none"); + + + + ${__javaScript(${counter} < 60)} + + + + + + + true + {"class":"And", "filters": [ { "class":"Equals", "field":"requestId", "value":"${requestId}" }, { "class":"Equals", "field":"notification", "value":"FINAL: SUCCESS" }]} + = + true + filter + + + + ${DMAAP_HOST} + ${DMAAP_PORT} + https + + events/POLICY-CL-MGT/${consumerGroup}/1?timeout=20000&limit=1 + GET + false + false + false + false + + + + + + + + [] + + + Assertion.response_data + false + 12 + + + + false + requestIdOnset + requestId\\": \\"(.+?)\\" + $1$ + none + + + + + false + notification + notification\\": \\"FINAL: (.+?)\\" + $1$ + none + + + + + groovy + + + true + String requestIdOnset = vars.get("requestIdOnset"); +String requestId = vars.get("requestId"); +String notification = vars.get("notification"); +String counter = vars.get("counter"); + +String transaction = "none"; + +log.info ("The requestId id is " + requestId); +log.info ("The requestIdOnset id is " + requestIdOnset); +log.info ("The notification is " + notification); +log.info ("The transaction is " + transaction); +log.info ("The counter is " + counter); + +if ( requestId == requestIdOnset ) { + if ( notification == "SUCCESS" ) { + transaction = "FINAL"; + log.info ("Final Success Transaction"); + AssertionResult.setFailureMessage("Bad final notification"); + AssertionResult.setFailure(true); + } else if ( notification == "FAILURE" ) { + transaction = "FINAL"; + log.info ("Final Failure Transaction"); + } +} + +int counterTemp = Integer.parseInt(counter) +1; +if (transaction == "FINAL") { + counterTemp = 99; +} else if (counterTemp >= 60) { + AssertionResult.setFailureMessage("Failure, reached maximum number of attempts "); + AssertionResult.setFailure(true); +} + +vars.put("counter", Integer.toString(counterTemp)); + + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + true + false + false + false + true + 0 + true + true + true + true + true + true + + + + + + + + startnextloop + + false + -1 + + 1 + 1 + true + ${duration} + 20 + + + + + consumerGroup + + + + vfwsuccess + + + false + Global to the thread group + + + + + requestId + + + + ${__UUID()} + + + true + Update on a per iteration basis + + + + true + + + + false + { + "closedLoopControlName": "ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a", + "closedLoopAlarmStart": 1463679805324, + "closedLoopEventClient": "microservice.stringmatcher", + "closedLoopEventStatus": "ONSET", + "requestID": "${requestId}", + "target_type": "VNF", + "target": "generic-vnf.vnf-name", + "AAI": { + "vserver.is-closed-loop-disabled": "false", + "vserver.prov-status": "ACTIVE", + "generic-vnf.vnf-name": "fw0002vm002fw002", + "vserver.vserver-name": "OzVServer" + }, + "from": "DCAE", + "version": "1.0.2" +} + + = + + + + ${DROOLS_HOST} + ${DROOLS_PORT} + https + + policy/pdp/engine/topics/sources/dmaap/DCAE_TOPIC/events + PUT + false + false + false + false + + + + + + + + + Content-Type + text/plain + + + + + + + groovy + + + true + vars.put("counter", "0"); + + + + ${__javaScript(${counter} < 10)} + + + + + + + true + {"class":"And", "filters": [ { "class":"Equals", "field":"RequestID", "value":"${requestId}" }, { "class":"Equals", "field":"Action", "value":"ModifyConfig" }]} + = + true + filter + + + + ${DMAAP_HOST} + ${DMAAP_PORT} + https + + events/APPC-CL/${consumerGroup}/1?timeout=15000&limit=1 + GET + false + false + false + false + + + + + + + + [] + + + Assertion.response_data + false + 12 + + + + false + requestIdOnset + \\"RequestID\\":\\"(.+?)\\" + $1$ + none + + + + + false + subRequestId + SubRequestID\\":\\"(.+?)\\" + $1$ + none + + + + + groovy + + + true + String requestIdOnset = vars.get("requestIdOnset"); +String requestId = vars.get("requestId"); +String subRequestId = vars.get("subRequestId"); +String counter = vars.get("counter"); + +String transaction = "none"; + +log.info ("The requestId id is " + requestId); +log.info ("The requestIdOnset id is " + requestIdOnset); +log.info ("The subrequest id is " + subRequestId); +log.info ("The counter is " + counter); + +if ( requestId == requestIdOnset ) { + if ( subRequestId == "none" ) { + transaction = "FINAL"; + log.info ("APPC ModifyConfig does not contain enough information"); + AssertionResult.setFailureMessage("Missing subRequestId"); + AssertionResult.setFailure(true); + } else { + transaction = "FINAL"; + vars.put("transaction", "FINAL"); + log.info ("Final Success Transaction"); + } +} + +int counterTemp = Integer.parseInt(counter) +1; +if (transaction == "FINAL") { + counterTemp = 99; +} else if (counterTemp >= 10) { + AssertionResult.setFailureMessage("Failure, reached maximum number of 10 attempts "); + AssertionResult.setFailure(true); +} + +vars.put("counter", Integer.toString(counterTemp)); + + + + + + + + true + + + + false + { + "CommonHeader": { + "TimeStamp": 1506051879001, + "APIver": "1.01", + "RequestID": "${requestId}", + "SubRequestID": "${subRequestId}", + "RequestTrack": [], + "Flags": [] + }, + "Status": { + "Code": 400, + "Value": "SUCCESS" + }, + "Payload": { + "generic-vnf.vnf-id": "f17face5-69cb-4c88-9e0b-7426db7edddd" + } +} + = + + + + ${DROOLS_HOST} + ${DROOLS_PORT} + https + + policy/pdp/engine/topics/sources/dmaap/APPC-CL/events + PUT + false + false + false + false + + + + + + + + + Content-Type + text/plain + + + + + + + groovy + + + true + vars.put("counter", "0"); + + + + ${__javaScript(${counter} < 60)} + + + + + + + true + {"class":"And", "filters": [ { "class":"Equals", "field":"requestId", "value":"${requestId}" }, { "class":"Equals", "field":"notification", "value":"FINAL: SUCCESS" }]} + = + true + filter + + + + ${DMAAP_HOST} + ${DMAAP_PORT} + https + + events/POLICY-CL-MGT/${consumerGroup}/1?timeout=15000&limit=1 + GET + false + false + false + false + + + + + + + + [] + + + Assertion.response_data + false + 12 + + + + false + requestIdOnset + requestId\\": \\"(.+?)\\" + $1$ + none + + + + + false + notification + notification\\": \\"FINAL: (.+?)\\" + $1$ + none + + + + + groovy + + + true + String requestIdOnset = vars.get("requestIdOnset"); +String requestId = vars.get("requestId"); +String notification = vars.get("notification"); +String counter = vars.get("counter"); + +String transaction = "none"; + +log.info ("The requestId id is " + requestId); +log.info ("The requestIdOnset id is " + requestIdOnset); +log.info ("The notification is " + notification); +log.info ("The transaction is " + transaction); +log.info ("The counter is " + counter); + +if ( requestId == requestIdOnset ) { + if ( notification == "SUCCESS" ) { + transaction = "FINAL"; + log.info ("Final Success Transaction"); + log.info ("The notification is SUCCESS"); + } else if ( notification == "FAILURE" ) { + transaction = "FINAL"; + log.info ("Final Failure Transaction"); + AssertionResult.setFailureMessage("Bad final notification"); + AssertionResult.setFailure(true); + } +} + +int counterTemp = Integer.parseInt(counter) +1; +if (transaction == "FINAL") { + counterTemp = 99; +} else if (counterTemp >= 60) { + AssertionResult.setFailureMessage("Failure, reached maximum number of attempts "); + AssertionResult.setFailure(true); +} + +vars.put("counter", Integer.toString(counterTemp)); + + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + true + false + false + false + true + 0 + true + true + true + true + true + true + + + + + + + + continue + + false + 1 + + 1 + 1 + false + + + + + + + + + + + ${PAP_HOST} + ${PAP_PORT} + https + + policy/pap/v1/pdps/policies/operational.restart/versions/1.0.0 + DELETE + false + false + false + false + + + + + + + + 200 + + + Assertion.response_code + false + 16 + + + + + + + + ${PAP_HOST} + ${PAP_PORT} + https + + policy/pap/v1/pdps/policies/operational.restart.fail/versions/1.0.0 + DELETE + false + false + false + false + + + + + + + + 200 + + + Assertion.response_code + false + 16 + + + + + + + + ${PAP_HOST} + ${PAP_PORT} + https + + policy/pap/v1/pdps/policies/operational.modifyconfig/versions/1.0.0 + DELETE + false + false + false + false + + + + + + + + 200 + + + Assertion.response_code + false + 16 + + + + + + + + ${PAP_HOST} + ${PAP_PORT} + https + + policy/pap/v1/pdps/policies/operational.scaleout/versions/1.0.0 + DELETE + false + false + false + false + + + + + + + + 200 + + + Assertion.response_code + false + 16 + + + + + + + + ${PAP_HOST} + ${PAP_PORT} + https + + policy/pap/v1/pdps/policies/operational.scaleout.fail/versions/1.0.0 + DELETE + false + false + false + false + + + + + + + + 200 + + + Assertion.response_code + false + 16 + + + + + + + + + + + ${API_HOST} + ${API_PORT} + https + + policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Drools/versions/1.0.0/policies/operational.restart/versions/1.0.0 + DELETE + false + false + false + false + + + + + + + + 200 + + + Assertion.response_code + false + 16 + + + + + + + + ${API_HOST} + ${API_PORT} + https + + policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Drools/versions/1.0.0/policies/operational.restart.fail/versions/1.0.0 + DELETE + false + false + false + false + + + + + + + + 200 + + + Assertion.response_code + false + 16 + + + + + + + + ${API_HOST} + ${API_PORT} + https + + policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Drools/versions/1.0.0/policies/operational.modifyconfig/versions/1.0.0 + DELETE + false + false + false + false + + + + + + + + 200 + + + Assertion.response_code + false + 16 + + + + + + + + ${API_HOST} + ${API_PORT} + https + + policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Drools/versions/1.0.0/policies/operational.scaleout/versions/1.0.0 + DELETE + false + false + false + false + + + + + + + + 200 + + + Assertion.response_code + false + 16 + + + + + + + + ${API_HOST} + ${API_PORT} + https + + policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Drools/versions/1.0.0/policies/operational.scaleout.fail/versions/1.0.0 + DELETE + false + false + false + false + + + + + + + + 200 + + + Assertion.response_code + false + 16 + + + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + true + false + false + false + true + 0 + true + true + true + true + true + + + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + true + false + false + false + true + 0 + true + true + true + true + true + + + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + true + false + false + false + true + 0 + true + true + true + true + true + + + + + + + + -- cgit 1.2.3-korg