From 91f91bb6181e0f7629f46aa6d8bb3816d1f63108 Mon Sep 17 00:00:00 2001 From: Taka Cho Date: Thu, 29 Oct 2020 12:53:26 -0400 Subject: correct filename and restructure directories for s3p move s3p jmx and shell script under resources remove old jmx files from the previous release Issue-ID: POLICY-2832 Change-Id: I2c1d4f2137655bc096b402b12625fa4add15ecf5 Signed-off-by: Taka Cho --- .../amsterdam/droolsPdpStabilityTestPlan.jmx | 1883 ------------ .../amsterdam/generate_performace_report.sh | 185 -- .../stability/src/main/resources/frankfurt/s3p.jmx | 3172 ------------------- .../main/resources/generate_performance_report.sh | 240 ++ .../resources/guilin/generate_performace_report.sh | 240 -- .../stability/src/main/resources/guilin/s3p.jmx | 3189 -------------------- testsuites/stability/src/main/resources/s3p.jmx | 3189 ++++++++++++++++++++ 7 files changed, 3429 insertions(+), 8669 deletions(-) delete mode 100644 testsuites/stability/src/main/resources/amsterdam/droolsPdpStabilityTestPlan.jmx delete mode 100644 testsuites/stability/src/main/resources/amsterdam/generate_performace_report.sh delete mode 100644 testsuites/stability/src/main/resources/frankfurt/s3p.jmx create mode 100755 testsuites/stability/src/main/resources/generate_performance_report.sh delete mode 100755 testsuites/stability/src/main/resources/guilin/generate_performace_report.sh delete mode 100644 testsuites/stability/src/main/resources/guilin/s3p.jmx create mode 100644 testsuites/stability/src/main/resources/s3p.jmx (limited to 'testsuites/stability/src/main/resources') diff --git a/testsuites/stability/src/main/resources/amsterdam/droolsPdpStabilityTestPlan.jmx b/testsuites/stability/src/main/resources/amsterdam/droolsPdpStabilityTestPlan.jmx deleted file mode 100644 index 570fe0a04..000000000 --- a/testsuites/stability/src/main/resources/amsterdam/droolsPdpStabilityTestPlan.jmx +++ /dev/null @@ -1,1883 +0,0 @@ - - - - - - - - false - true - true - - - - - - - - - - - - - - - @1b3rt - 31nst31n - - - - - - - - - - - - 9696 - http - - - 6 - - - - - - - - size - 2000 - = - max number of VNF instances - - - wait - 500 - = - Sleep time for each request - - - vCPEControlLoop - ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e - = - vCPE Control loop name - - - vDNSControlLoop - ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3 - = - vDNS Control loop name - - - vFWControlLoop - ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a - = - vFW Controll loop name - - - VOLTEControlLoop - ControlLoop-VOLTE-2179b738-fd36-4843-a71a-a8c24c70c55b - = - VOLTE Control loop name - - - threads - 2 - = - - - threadsTimeOutInMs - 5000 - = - - - controller - amsterdam - = - - - session - amsterdam - = - - - - - - stoptest - - false - -1 - - ${threads} - 1 - false - - - - - - - - - - - - - - - - - policy/pdp/engine/controllers/${controller}/drools/facts/${session}/ - GET - true - false - true - false - - - - - - - - {"org.onap.policy.controlloop.Params":4} - - - Assertion.response_data - false - 16 - - - - - ${threads} - ${threadsTimeOutInMs} - - - - - - - - - Run vCPE Sucess flow - - - - Run vCPE Sucess flow - - - - java - - - true - import java.util.ArrayList; -import java.util.List; - -final List vCPECache = new ArrayList(); -vars.putObject("vCPECache", vCPECache); - - - This sampler intializes cache to store generate requestID for vCPE success flow - - - - 1 - ${size} - 1 - vnfID - vCPE_Infrastructure_vGMUX_demo_app-00 - false - This counter generate unique vnf-id - - - - true - - - import java.util.List; -import java.util.UUID; - -final List vCPECache = vars.getObject("vCPECache"); - -final String uuid = UUID.randomUUID().toString(); -vars.put("requestID",uuid); - -vCPECache.add(uuid); -log.debug("[vCPE] requestID " + uuid); - java - this sampler generates unique requestId using UUID and adds it to local cache - - - - true - - - - false - { - "closedLoopControlName": "${vCPEControlLoop}", - "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", - "generic-vnf.vnf-id": "${vnfID}" - }, - "from": "DCAE", - "version": "1.0.2" -} - - = - - - - - - - - policy/pdp/engine/topics/sources/ueb/unauthenticated.DCAE_CL_OUTPUT/events - PUT - true - false - true - false - - - - - - - - 200 - - - Assertion.response_code - false - 8 - Response code - - - - - true - - - - false - { - "body": { - "output": { - "common-header": { - "timestamp": "2017-08-25T21:06:23.037Z", - "api-ver": "5.00", - "originator-id": "664be3d2-6c12-4f4b-a3e7-c349acced200", - "request-id": "${requestID}", - "sub-request-id": "1", - "flags": {} - }, - "status": { - "code": 400, - "message": "Restart Successful" - } - } - }, - "version": "2.0", - "rpc-name": "restart", - "correlation-id": "664be3d2-6c12-4f4b-a3e7-c349acced200-1", - "type": "response" -} - = - - - - - - - - policy/pdp/engine/topics/sources/ueb/APPC-LCM-WRITE/events - PUT - true - false - true - false - - - - - - - - 200 - - - Assertion.response_code - false - 16 - - - - ${wait} - - - - - true - - - - false - { - "closedLoopControlName": "${vCPEControlLoop}", - "closedLoopAlarmStart": 1463679805324, - "closedLoopAlarmEnd": 1463699805324, - "closedLoopEventClient": "DCAE_INSTANCE_ID.dcae-tca", - "closedLoopEventStatus": "ABATED", - "requestID": "${requestID}", - "target_type": "VNF", - "target": "generic-vnf.vnf-id", - "AAI": { - "generic-vnf.is-closed-loop-disabled": "false", - "generic-vnf.vnf-id": "${vnfID}" - }, - "from": "DCAE", - "version": "1.0.2" -} - - = - - - - - - - - policy/pdp/engine/topics/sources/ueb/unauthenticated.DCAE_CL_OUTPUT/events - PUT - true - false - true - false - - - - - - - - 200 - - - Assertion.response_code - false - 16 - - - - ${wait} - - - - - - - - - - - - - - - policy/pdp/engine/topics/sinks/noop/POLICY-CL-MGT - GET - true - false - true - false - - - - - - - ${wait} - - - - ${threads} - ${threadsTimeOutInMs} - - - - result - $ - - - - - java - - - true - import net.minidev.json.parser.JSONParser; -import net.minidev.json.JSONObject; -import net.minidev.json.JSONArray; - -final Map records = new HashMap(); -final JSONParser p = new JSONParser(JSONParser.MODE_PERMISSIVE); - -final String result = vars.get("result"); -final JSONObject jsonObj = (JSONObject) p.parse(result); - - if (jsonObj != null) { - final JSONArray events = (JSONArray) jsonObj.get("recentEvents"); - if (events != null) { - for (int j = 0; j < events.size(); j++) { - final String event = (String) events.get(j); - if (event != null ) { - final JSONParser parser = new JSONParser(JSONParser.MODE_PERMISSIVE); - final JSONObject eventObj = (JSONObject) parser.parse(event); - final String controlLoopName = vars.get("vCPEControlLoop"); - if (eventObj.get("closedLoopControlName").equals(controlLoopName)) { - final String requestId = eventObj.get("requestId"); - final String notification = eventObj.get("notification"); - records.put(requestId, notification); - } - } - } - } - } - -boolean failure = false; -final String expectedNotification = "FINAL: SUCCESS"; -final List cache = vars.getObject("vCPECache"); - -for (int i = 0; i < cache.size(); i++) { - final String requestId = cache.get(i); - final String notification = records.get(requestId); - if (!(notification != null && expectedNotification.equals(notification))) { - log.error("[vCPE] Assertion failed for requestId: " + requestId +" Expected notification: " + expectedNotification + " But found: " + notification); - failure = true; - } -} - -if (failure || cache.isEmpty()) { - final String error = "[vCPE] Unable to find notification with " + expectedNotification + " in topic 'POLICY-CL-MGT'"; - AssertionResult.setFailureMessage(error); - AssertionResult.setFailure(true); - log.error(error); - log.info("[vCPE] vCPECache: " + cache); - log.info("[vCPE] Success Records found: " + records); - log.info("[vCPE] " + result); -} else { - AssertionResult.setFailure(false); -} - - - this assertion handler parse sink event response and checks notification result for each request made - - - - - - - Run vCPE failure flow - - - - Run vCPE failure flow - - - - java - - - true - import java.util.ArrayList; -import java.util.List; - -List vCPEFailureCache = new ArrayList(); -vars.putObject("vCPEFailureCache", vCPEFailureCache); - - - - - 1 - ${size} - 1 - vnfID - vCPE_Infrastructure_vGMUX_demo_app-00 - false - - - - true - - - import java.util.List; -import java.util.UUID; - -final List vCPEFailureCache = vars.getObject("vCPEFailureCache"); - -final String uuid = UUID.randomUUID().toString(); -vars.put("requestID",uuid); - -vCPEFailureCache.add(uuid); -log.debug("[vCPE Failure] requestID "+ uuid); - java - - - - true - - - - false - { - "closedLoopControlName": "${vCPEControlLoop}", - "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", - "generic-vnf.vnf-id": "${vnfID}" - }, - "from": "DCAE", - "version": "1.0.2" -} - - = - - - - - - - - policy/pdp/engine/topics/sources/ueb/unauthenticated.DCAE_CL_OUTPUT/events - PUT - true - false - true - false - - - - - - - - 200 - - - Assertion.response_code - false - 8 - Response code - - - - - true - - - - false - { - "body": { - "output": { - "common-header": { - "timestamp": "2017-08-25T21:06:23.037Z", - "api-ver": "5.00", - "originator-id": "664be3d2-6c12-4f4b-a3e7-c349acced200", - "request-id": "${requestID}", - "sub-request-id": "1", - "flags": {} - }, - "status": { - "code": 500, - "message": "Restart Failed" - } - } - }, - "version": "2.0", - "rpc-name": "restart", - "correlation-id": "664be3d2-6c12-4f4b-a3e7-c349acced200-1", - "type": "response" -} - = - - - - - - - - policy/pdp/engine/topics/sources/ueb/APPC-LCM-WRITE/events - PUT - true - false - true - false - - - - - - - - 200 - - - Assertion.response_code - false - 16 - - - - ${wait} - - - - - - - - - - - - - - - policy/pdp/engine/topics/sinks/noop/POLICY-CL-MGT - GET - true - false - true - false - - - - - - - ${wait} - - - - ${threads} - ${threadsTimeOutInMs} - - - - result - $ - - - - - java - - - true - import net.minidev.json.parser.JSONParser; -import net.minidev.json.JSONObject; -import net.minidev.json.JSONArray; - -final Map records = new HashMap(); -final JSONParser p = new JSONParser(JSONParser.MODE_PERMISSIVE); - -final String result = vars.get("result"); -final JSONObject jsonObj = (JSONObject) p.parse(result); - - if (jsonObj != null) { - final JSONArray events = (JSONArray) jsonObj.get("recentEvents"); - if (events != null) { - for (int j = 0; j < events.size(); j++) { - final String event = (String) events.get(j); - if (event != null ) { - final JSONParser parser = new JSONParser(JSONParser.MODE_PERMISSIVE); - final JSONObject eventObj = (JSONObject) parser.parse(event); - final String controlLoopName = vars.get("vCPEControlLoop"); - if (eventObj.get("closedLoopControlName").equals(controlLoopName)) { - final String requestId = eventObj.get("requestId"); - final String notification = eventObj.get("notification"); - records.put(requestId, notification); - } - } - } - } - } - - -boolean failure = false; -final String expectedNotification = "FINAL: FAILURE"; -final List cache = vars.getObject("vCPEFailureCache"); - -for (int i = 0; i < cache.size(); i++) { - final String requestId = cache.get(i); - final String notification = records.get(requestId); - if (!(notification != null && expectedNotification.equals(notification))) { - log.error("[vCPE Failue] Assertion failed for requestId: " + requestId + - " Expected notification: " + expectedNotification + " But found: " + notification); - failure = true; - } -} - -if (failure || cache.isEmpty()) { - final String error = "[vCPE] Unable to find notification with " + expectedNotification + " in topic 'POLICY-CL-MGT'"; - AssertionResult.setFailureMessage(error); - AssertionResult.setFailure(true); - log.error(error); - log.info("[vCPE Failue] vCPECache: " + cache); - log.info("[vCPE Failue] Success Records found: " + records); - log.info("[vCPE Failue] " + result); -} else { - AssertionResult.setFailure(false); -} - - - - - - - - - - - - java - - - true - import java.util.ArrayList; -import java.util.List; - -final List vDNSCache = new ArrayList(); -vars.putObject("vDNSCache", vDNSCache); - - - - - - 1 - ${size} - 1 - vserver-name - dnsvserver-name-0 - false - - - - true - - - import java.util.List; -import java.util.UUID; - -final List vDNSCache = vars.getObject("vDNSCache"); - -final String uuid = UUID.randomUUID().toString(); -vars.put("requestID", uuid); - -vDNSCache.add(uuid); -log.debug("[vDNS] requestID "+ uuid); - java - - - - true - - - - false - { - "closedLoopControlName": "${vDNSControlLoop}", - "closedLoopAlarmStart": 1484677482204798, - "closedLoopEventClient": "DCAE_INSTANCE_ID.dcae-tca", - "closedLoopEventStatus": "ONSET", - "requestID": "${requestID}", - "target_type": "VNF", - "target": "vserver.vserver-name", - "AAI": { - "vserver.is-closed-loop-disabled": "false", - "vserver.vserver-name": "${vserver-name}" - }, - "from": "DCAE", - "version": "1.0.2" -} - = - - - - - - - - policy/pdp/engine/topics/sources/ueb/unauthenticated.DCAE_CL_OUTPUT/events - PUT - true - false - true - false - - - - - - - - 200 - - - Assertion.response_code - false - 8 - Response code - - - - - - - - - - - - - - - policy/pdp/engine/topics/sinks/noop/POLICY-CL-MGT - GET - true - false - true - false - - - - - - - ${wait} - - - - ${threads} - ${threadsTimeOutInMs} - - - - result - $ - - - - - java - - - true - import net.minidev.json.parser.JSONParser; -import net.minidev.json.JSONObject; -import net.minidev.json.JSONArray; - -final Map records = new HashMap(); -final JSONParser p = new JSONParser(JSONParser.MODE_PERMISSIVE); - -final String result = vars.get("result"); -final JSONObject jsonObj = (JSONObject) p.parse(result); - - if (jsonObj != null) { - final JSONArray events = (JSONArray) jsonObj.get("recentEvents"); - if (events != null) { - for (int j = 0; j < events.size(); j++) { - final String event = (String) events.get(j); - if (event != null ) { - final JSONParser parser = new JSONParser(JSONParser.MODE_PERMISSIVE); - final JSONObject eventObj = (JSONObject) parser.parse(event); - final String controlLoopName = vars.get("vDNSControlLoop"); - if (eventObj.get("closedLoopControlName").equals(controlLoopName)) { - final String requestId = eventObj.get("requestId"); - final String notification = eventObj.get("notification"); - records.put(requestId, notification); - } - } - } - } - } - -boolean failure = false; -final String expectedNotification = "FINAL: SUCCESS"; -final List cache = vars.getObject("vDNSCache"); - -for (int i = 0; i < cache.size(); i++) { - final String requestId = cache.get(i); - final String notification = records.get(requestId); - if (!(notification != null && expectedNotification.equals(notification))) { - log.error("[vDNS] Assertion failed for requestId: " + requestId +" Expected notification: " + expectedNotification + " But found: " + notification); - failure = true; - } -} - -if (failure || cache.isEmpty()) { - final String error = "[vDNS] Unable to find notification with " + expectedNotification + " in topic 'POLICY-CL-MGT'"; - AssertionResult.setFailureMessage(error); - AssertionResult.setFailure(true); - log.error(error); - log.info("[vDNS] vDNSCache: " + cache); - log.info("[vDNS] Success Records found: " + records); - log.info("[vDNS] " + result); -} else { - AssertionResult.setFailure(false); -} - - - - - - - - - - - - - - - java - - - true - import java.util.ArrayList; -import java.util.List; - -final List vFWCache = new ArrayList(); -vars.putObject("vFWCache", vFWCache); - - - - 1 - ${size} - 1 - vnf-id - fwvnfid-0 - false - - - - true - - - import java.util.List; -import java.util.UUID; - -final List vFWCache = vars.getObject("vFWCache"); - -final String uuid = UUID.randomUUID().toString(); -vars.put("requestID", uuid); - -vFWCache.add(uuid); -log.debug("[vFW] requestID "+ uuid); - java - - - - true - - - - false - { - "closedLoopControlName": "${vFWControlLoop}", - "closedLoopAlarmStart": 1463679805324, - "closedLoopEventClient": "microservice.stringmatcher", - "closedLoopEventStatus": "ONSET", - "requestID": "${requestID}", - "target_type": "VNF", - "target": "generic-vnf.vnf-id", - "AAI": { - "generic-vnf.is-closed-loop-disabled": "false", - "generic-vnf.vnf-id": "${vnf-id}" - }, - "from": "DCAE", - "version": "1.0.2" -} - = - - - - - - - - policy/pdp/engine/topics/sources/ueb/unauthenticated.DCAE_CL_OUTPUT/events - PUT - true - false - true - false - - - - - - - - 200 - - - Assertion.response_code - false - 8 - Response code - - - - - true - - - - false - { - "CommonHeader": { - "TimeStamp": 1506051879001, - "APIver": "1.01", - "RequestID": "${requestID}", - "SubRequestID": "1", - "RequestTrack": [], - "Flags": [] - }, - "Status": { - "Code": 400, - "Value": "SUCCESS" - }, - "Payload": { - "generic-vnf.vnf-id": "${vnf-id}", - "pg-streams": { - "pg-stream": [ - { - "id": "fw_udp1", - "is-enabled": "true" - }, - { - "id": "fw_udp2", - "is-enabled": "true" - }, - { - "id": "fw_udp3", - "is-enabled": "true" - }, - { - "id": "fw_udp4", - "is-enabled": "true" - }, - { - "id": "fw_udp5", - "is-enabled": "true" - } - ] - } - } -} - = - - - - - - - - policy/pdp/engine/topics/sources/ueb/APPC-CL/events - PUT - true - false - true - false - - - - - - - ${wait} - - - - - 200 - - - Assertion.response_code - false - 16 - - - - - - - - - - - - - - - policy/pdp/engine/topics/sinks/noop/POLICY-CL-MGT - GET - true - false - true - false - - - - - - - ${wait} - - - - ${threads} - ${threadsTimeOutInMs} - - - - result - $ - - - - - java - - - true - import net.minidev.json.parser.JSONParser; -import net.minidev.json.JSONObject; -import net.minidev.json.JSONArray; - -final Map records = new HashMap(); -final JSONParser p = new JSONParser(JSONParser.MODE_PERMISSIVE); - -final String result = vars.get("result"); -final JSONObject jsonObj = (JSONObject) p.parse(result); - - if (jsonObj != null) { - final JSONArray events = (JSONArray) jsonObj.get("recentEvents"); - if (events != null) { - for (int j = 0; j < events.size(); j++) { - final String event = (String) events.get(j); - if (event != null ) { - final JSONParser parser = new JSONParser(JSONParser.MODE_PERMISSIVE); - final JSONObject eventObj = (JSONObject) parser.parse(event); - final String controlLoopName = vars.get("vFWControlLoop"); - if (eventObj.get("closedLoopControlName").equals(controlLoopName)) { - final String requestId = eventObj.get("requestId"); - final String notification = eventObj.get("notification"); - records.put(requestId, notification); - } - } - } - } - } - -boolean failure = false; -final String expectedNotification = "FINAL: SUCCESS"; -final List cache = vars.getObject("vFWCache"); - -for (int i = 0; i < cache.size(); i++) { - final String requestId = cache.get(i); - final String notification = records.get(requestId); - if (!(notification != null && expectedNotification.equals(notification))) { - log.error("[vFW] Assertion failed for requestId: " + requestId +" Expected notification: " + expectedNotification + " But found: " + notification); - failure = true; - } -} - -if (failure || cache.isEmpty()) { - final String error = "[vFW] Unable to find notification with " + expectedNotification + " in topic 'POLICY-CL-MGT'"; - AssertionResult.setFailureMessage(error); - AssertionResult.setFailure(true); - log.error(error); - log.info("[vFW] vFWCache: " + cache); - log.info("[vFW] Success Records found: " + records); - log.info("[vFW] " + result); -} else { - AssertionResult.setFailure(false); -} - - - - - - - - - - - - - java - - - true - import java.util.ArrayList; -import java.util.List; - -final List vFWFailueCache = new ArrayList(); -vars.putObject("vFWFailueCache", vFWFailueCache); - - - - 1 - ${size} - 1 - vnf-id - fwvnfid-0 - false - - - - true - - - import java.util.List; -import java.util.UUID; - -final List vFWFailueCache = vars.getObject("vFWFailueCache"); - -final String uuid = UUID.randomUUID().toString(); -vars.put("requestID", uuid); - -vFWFailueCache.add(uuid); -log.debug("[vFW FAILURE] requestID "+ uuid); - java - - - - true - - - - false - { - "closedLoopControlName": "${vFWControlLoop}", - "closedLoopAlarmStart": 1463679805324, - "closedLoopEventClient": "microservice.stringmatcher", - "closedLoopEventStatus": "ONSET", - "requestID": "${requestID}", - "target_type": "VNF", - "target": "generic-vnf.vnf-id", - "AAI": { - "generic-vnf.is-closed-loop-disabled": "false", - "generic-vnf.vnf-id": "${vnf-id}" - }, - "from": "DCAE", - "version": "1.0.2" -} - = - - - - - - - - policy/pdp/engine/topics/sources/ueb/unauthenticated.DCAE_CL_OUTPUT/events - PUT - true - false - true - false - - - - - - - - 200 - - - Assertion.response_code - false - 8 - Response code - - - - - true - - - - false - { - "CommonHeader": { - "TimeStamp": 1506051879001, - "APIver": "1.01", - "RequestID": "${requestID}", - "SubRequestID": "1", - "RequestTrack": [], - "Flags": [] - }, - "Status": { - "Code": 500, - "Value": "FAILED" - }, - "Payload": { - "generic-vnf.vnf-id": "${vnf-id}", - "pg-streams": { - "pg-stream": [ - { - "id": "fw_udp1", - "is-enabled": "true" - }, - { - "id": "fw_udp2", - "is-enabled": "true" - }, - { - "id": "fw_udp3", - "is-enabled": "true" - }, - { - "id": "fw_udp4", - "is-enabled": "true" - }, - { - "id": "fw_udp5", - "is-enabled": "true" - } - ] - } - } -} - = - - - - - - - - policy/pdp/engine/topics/sources/ueb/APPC-CL/events - PUT - true - false - true - false - - - - - - - ${wait} - - - - - 200 - - - Assertion.response_code - false - 16 - - - - - - - - - - - - - - - policy/pdp/engine/topics/sinks/noop/POLICY-CL-MGT - GET - true - false - true - false - - - - - - - ${wait} - - - - ${threads} - ${threadsTimeOutInMs} - - - - result - $ - - - - - java - - - true - import net.minidev.json.parser.JSONParser; -import net.minidev.json.JSONObject; -import net.minidev.json.JSONArray; - -final Map records = new HashMap(); -final JSONParser p = new JSONParser(JSONParser.MODE_PERMISSIVE); - -final String result = vars.get("result"); -final JSONObject jsonObj = (JSONObject) p.parse(result); - - if (jsonObj != null) { - final JSONArray events = (JSONArray) jsonObj.get("recentEvents"); - if (events != null) { - for (int j = 0; j < events.size(); j++) { - final String event = (String) events.get(j); - if (event != null ) { - final JSONParser parser = new JSONParser(JSONParser.MODE_PERMISSIVE); - final JSONObject eventObj = (JSONObject) parser.parse(event); - final String controlLoopName = vars.get("vFWControlLoop"); - if (eventObj.get("closedLoopControlName").equals(controlLoopName)) { - final String requestId = eventObj.get("requestId"); - final String notification = eventObj.get("notification"); - records.put(requestId, notification); - } - } - } - } - } - -boolean failure = false; -final String expectedNotification = "FINAL: FAILURE"; -final List cache = vars.getObject("vFWFailueCache"); - -for (int i = 0; i < cache.size(); i++) { - final String requestId = cache.get(i); - final String notification = records.get(requestId); - if (!(notification != null && expectedNotification.equals(notification))) { - log.error("[vFW] Assertion failed for requestId: " + requestId +" Expected notification: " + expectedNotification + " But found: " + notification); - failure = true; - } -} - -if (failure || cache.isEmpty()) { - final String error = "[vFW] Unable to find notification with " + expectedNotification + " in topic 'POLICY-CL-MGT'"; - AssertionResult.setFailureMessage(error); - AssertionResult.setFailure(true); - log.error(error); - log.info("[vFW] vFWCache: " + cache); - log.info("[vFW] Success Records found: " + records); - log.info("[vFW] " + result); -} else { - AssertionResult.setFailure(false); -} - - - - - - - - - - - - java - - - true - import java.util.ArrayList; -import java.util.List; - -final List vVOLTECache = new ArrayList(); -vars.putObject("vVOLTECache", vVOLTECache); - - - - - - true - - - import java.util.List; -import java.util.UUID; - -final List vVOLTECache = vars.getObject("vVOLTECache"); - -final String uuid = UUID.randomUUID().toString(); -vars.put("requestID",uuid); - -vVOLTECache.add(uuid); -log.debug("[VOLTE] requestID "+ uuid); - java - - - - 1 - ${size} - 1 - service-instance-id - volte-service-instance-id-0 - false - - - - 1 - ${size} - 1 - vserver-name - dnsvserver-name-0 - false - - - - true - - - - false - { - "closedLoopControlName":"${VOLTEControlLoop}", - "closedLoopAlarmStart":1484677482204798, - "closedLoopEventClient":"DCAE.HolmesInstance", - "closedLoopEventStatus":"ONSET", - "requestID":"${requestID}", - "target_type":"VM", - "target":"vserver.vserver-name", - "AAI":{ - "vserver.is-closed-loop-disabled":"false", - "vserver.vserver-name":"${vserver-name}", - "service-instance.service-instance-id":"vserver-name-${service-instance-id}", - "generic-vnf.vnf-id":"vnf-id-${service-instance-id}", - "generic-vnf.vnf-name":"vnf-name-${service-instance-id}" - }, - "from":"DCAE", - "version":"1.0.2" -} - = - - - - - - - - policy/pdp/engine/topics/sources/ueb/unauthenticated.DCAE_CL_OUTPUT/events - PUT - true - false - true - false - - - - - - - - 200 - - - Assertion.response_code - false - 8 - Response code - - - - - - - - - - - - - - policy/pdp/engine/topics/sinks/noop/POLICY-CL-MGT - GET - true - false - true - false - - - - - - - ${wait} - - - - ${threads} - ${threadsTimeOutInMs} - - - - result - $ - - - - - java - - - true - import net.minidev.json.parser.JSONParser; -import net.minidev.json.JSONObject; -import net.minidev.json.JSONArray; - -final Map records = new HashMap(); -final JSONParser p = new JSONParser(JSONParser.MODE_PERMISSIVE); - -final String result = vars.get("result"); -final JSONObject jsonObj = (JSONObject) p.parse(result); - - if (jsonObj != null) { - final JSONArray events = (JSONArray) jsonObj.get("recentEvents"); - if (events != null) { - for (int j = 0; j < events.size(); j++) { - final String event = (String) events.get(j); - if (event != null ) { - final JSONParser parser = new JSONParser(JSONParser.MODE_PERMISSIVE); - final JSONObject eventObj = (JSONObject) parser.parse(event); - final String controlLoopName = vars.get("VOLTEControlLoop"); - if (eventObj.get("closedLoopControlName").equals(controlLoopName)) { - final String requestId = eventObj.get("requestId"); - final String notification = eventObj.get("notification"); - records.put(requestId, notification); - } - } - } - } - } - -boolean failure = false; -final String expectedNotification = "FINAL: SUCCESS"; -final List cache = vars.getObject("vVOLTECache"); - -for (int i = 0; i < cache.size(); i++) { - final String requestId = cache.get(i); - final String notification = records.get(requestId); - if (!(notification != null && expectedNotification.equals(notification))) { - log.error("[VOLTE] Assertion failed for requestId: " + requestId +" Expected notification: " + expectedNotification + " But found: " + notification); - failure = true; - } -} - -if (failure || cache.isEmpty()) { - final String error = "[VOLTE] Unable to find notification with " + expectedNotification + " in topic 'POLICY-CL-MGT'"; - AssertionResult.setFailureMessage(error); - AssertionResult.setFailure(true); - log.error(error); - log.info("[VOLTE] vVOLTECache: " + cache); - log.info("[VOLTE] Success Records found: " + records); - log.info("[VOLTE] " + result); -} else { - AssertionResult.setFailure(false); -} - - - - - - - - - - - - - - - - - - - - policy/pdp/engine/controllers/${controller}/drools/facts/${session}/ - GET - true - false - true - false - - - - - - - - {"org.onap.policy.controlloop.Params":4} - - - Assertion.response_data - 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 - - - - - - - - \ No newline at end of file diff --git a/testsuites/stability/src/main/resources/amsterdam/generate_performace_report.sh b/testsuites/stability/src/main/resources/amsterdam/generate_performace_report.sh deleted file mode 100644 index 846628543..000000000 --- a/testsuites/stability/src/main/resources/amsterdam/generate_performace_report.sh +++ /dev/null @@ -1,185 +0,0 @@ -#!/bin/bash - -# Copyright (C) 2018 Ericsson. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# The aim of this script is to collect performance metric for policies running in PDP-D. -# -# Pre-requisites: -# -# Run the JMeter Stability test plan (see below link) on the PDP-D for atleast few hours so that enough samples are collected and used for performance calculation. -# -# Recommendation: -# Run for 72 hours -# -# https://gerrit.onap.org/r/gitweb?p=policy/drools-applications.git;a=blob;f=testsuites/stability/src/main/resources/amsterdam/droolsPdpStabilityTestPlan.jmx;h=8a327622acc38b4615e000bfab3f778d1997e6e7;hb=refs/heads/master -# -# How to run: -# 1: Copy this script to drools container -# 2: Pass following parameters to run the script -# - log-dir : the complete directory location of audit.log file. -# - wait : the wait time configured in JMeter test plan. -# -# Sample command for running the script: ./generate_performance_report -l /var/log/onap/policy/pdpd -w 500 -# Note: -h or --help can be used to display details about input parameters. -# -# How it works -# The script will parse the audit.log file at the specified location and fetch the running time of each policy. -# Take enough samples and then calculate the average time taken for policies to complete. - -usage() -{ -_msg_="$@" -scriptname=$(basename $0) - -cat<<-EOF - -Command Arguments: - --l, --log-dir - Mandatory argument. Directory location of audit logs. - --w, --wait - Mandatory argument. Wait time between onset and appc for vCPE and vFW (in milliseconds) - --h, --help - Optional argument. Display this usage. - -EOF -exit 1 - -} - -process_vCPE() { - # vCPE use case - vcpe_perf_list=($(ls -lrth $LOG_DIR/audit.* | awk '{print $9}'| xargs -n1 zgrep vCPE | grep COMPLETE | grep generic-vnf.vnf-id | awk -F'|' '{print $7 }' | tail -10000)) - - vcpeTotal=0 - vcpeSum=0 - for count in "${vcpe_perf_list[@]}" - do - vcpeSum=$(($vcpeSum + $count)) - vcpeTotal=$(($vcpeTotal + 1)) - done - # Multiplying by 2 because stability test waits after onset and abatement - average=$((($vcpeSum / $vcpeTotal)-(2*$WAIT))) - echo "Average time taken to execute vCPE use case: $average ms [samples taken for average: $vcpeTotal]" -} - -process_vFW() { - # vFirewall use case - vfw_perf_list=($(ls -lrth $LOG_DIR/audit.* | awk '{print $9}'| xargs -n1 zgrep vFirewall | grep COMPLETE | grep generic-vnf.vnf-id | awk -F'|' '{print $7 }' | tail -10000)) - - vfwTotal=0 - vfwSum=0 - for count in "${vfw_perf_list[@]}" - do - vfwSum=$(($vfwSum + $count)) - vfwTotal=$(($vfwTotal + 1)) - done - # Substracting wait as stability test waits after onset - average=$((($vfwSum / $vfwTotal)-$WAIT)) - echo "Average time taken to execute vFirewall use case: $average ms [samples taken for average: $vfwTotal]" -} - -process_vDNS() { - # vDNS use case - vdns_perf_list=($(ls -lrth $LOG_DIR/audit.* | awk '{print $9}'| xargs -n1 zgrep vDNS | grep COMPLETE | grep vserver.vserver-name | awk -F'|' '{print $7 }' | tail -10000)) - - vdnsTotal=0 - vdnsSum=0 - for count in "${vdns_perf_list[@]}" - do - vdnsSum=$(($vdnsSum + $count)) - vdnsTotal=$(($vdnsTotal + 1)) - done - average=$(($vdnsSum / $vdnsTotal)) - echo "Average time taken to execute vDNS use case: $average ms [samples taken for average: $vdnsTotal]" -} - -process_VOLTE() { - # VOLTE use case - volte_perf_list=($(ls -lrth $LOG_DIR/audit.* | awk '{print $9}'| xargs -n1 zgrep VOLTE | grep COMPLETE | awk -F'|' '{print $7 }' | tail -10000)) - - volteTotal=0 - volteSum=0 - for count in "${volte_perf_list[@]}" - do - volteSum=$(($volteSum + $count)) - volteTotal=$(($volteTotal + 1)) - done - average=$(($volteSum / $volteTotal)) - echo "Average time taken to execute VOLTE use case: $average ms [samples taken for average: $volteTotal]" -} - -# Called when script is executed with invalid arguments -invalid_arguments() { -echo "Missing or invalid option(s):" -echo "$@" -echo "Try -help for more information" - exit 1 -} - -# Process the arguments passed to the script -process_arguments() { -short_args="hl:w:" -long_args="help,log-dir:wait:" - -args=$(getopt -o $short_args -l $long_args -n "$0" -- "$@" 2>&1 ) -[[ $? -ne 0 ]] && invalid_arguments $( echo " $args"| head -1 ) -[[ $# -eq 0 ]] && invalid_arguments "No options provided" -eval set -- "$args" -cmd_arg="$0" - -while true; do - case "$1" in - -l|--log-dir) - LOG_DIR=$2 - shift 2 ;; - -w|--wait) - WAIT=$2 - shift 2 ;; - -h|--help) - usage - exit 0 - ;; - --) - shift - break ;; - *) - echo BAD ARGUMENTS # perhaps error - break ;; - esac -done - -if ! [[ -d $LOG_DIR ]]; then - echo "$LOG_DIR does not exists" >&2; exit 1 -fi - -re='^[0-9]+$' -if ! [[ $WAIT =~ $re ]] ; then - echo "error: WAIT must be number " >&2; exit 1 -fi - -} - - -# main body -process_arguments $@ -process_vCPE -process_vFW -process_vDNS -process_VOLTE - - diff --git a/testsuites/stability/src/main/resources/frankfurt/s3p.jmx b/testsuites/stability/src/main/resources/frankfurt/s3p.jmx deleted file mode 100644 index 46401c901..000000000 --- a/testsuites/stability/src/main/resources/frankfurt/s3p.jmx +++ /dev/null @@ -1,3172 +0,0 @@ - - - - - - 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 - - - - - - - - diff --git a/testsuites/stability/src/main/resources/generate_performance_report.sh b/testsuites/stability/src/main/resources/generate_performance_report.sh new file mode 100755 index 000000000..f8745e179 --- /dev/null +++ b/testsuites/stability/src/main/resources/generate_performance_report.sh @@ -0,0 +1,240 @@ +#!/bin/bash + +# Copyright (C) 2020 AT&T. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# The aim of this script is to collect performance metric for policies running in PDP-D. +# +# Pre-requisites: +# +# Run the JMeter Stability test plan on the PDP-D for at least few hours so that enough samples +# are collected and used for performance calculation. +# +# Recommendation: +# Run for 72 hours +# +# How to run: +# 1: Copy this script to drools container +# 2: Pass following parameters to run the script +# - log-dir : the complete directory location of audit.log file. +# - wait : the wait time configured in JMeter test plan. (in Guilin Release is no wait time) +# +# Sample command for running the script: ./generate_performance_report -l /var/log/onap/policy/pdpd -w 500 +# Note: -h or --help can be used to display details about input parameters. +# +# How it works +# The script will parse the audit.log file at the specified location and fetch the running time of each policy. +# Take enough samples and then calculate the average time taken for policies to complete. + +usage() +{ +_msg_="$@" +scriptname=$(basename $0) + +cat<<-EOF + +Command Arguments: + +-l, --log-dir + Mandatory argument. Directory location of audit logs. + +-w, --wait + Mandatory argument. Wait time between onset and appc for vCPE and vFW (in milliseconds) + +-h, --help + Optional argument. Display this usage. + +EOF +exit 1 + +} + +process_vCPE_FAIL() { + # vCPE use case + vcpe0_perf_list=($(ls -lrth $LOG_DIR/audit.* | awk '{print $9}'| xargs -n1 zgrep ControlLoop-vCPE-Fail | grep "FINAL.FAILURE.ACCEPTED" | awk -F'|' '{print $7 }'| tail -200000)) + + vcpe0Total=0 + vcpe0Sum=0 + vcpe0Max=0 + vcpe0Min=10000 + for count in "${vcpe0_perf_list[@]}" + do + if [ "$count" -gt "$vcpe0Max" ]; then + vcpe0Max=$count + fi + if [ "$count" -lt "$vcpe0Min" ]; then + vcpe0Min=$count + fi + vcpe0Sum=$(($vcpe0Sum + $count)) + vcpe0Total=$(($vcpe0Total + 1)) + done + # Multiplying by 2 because stability test waits after onset and abatement + average=$((($vcpe0Sum / $vcpe0Total)-(2*$WAIT))) + echo "vCPE Failure cuse case ==> Max: $vcpe0Max, Min: $vcpe0Min, Average: $average ms [samples taken for average: $vcpe0Total]" +} + +process_vCPE_OK() { + # vCPE use case + vcpe_perf_list=($(ls -lrth $LOG_DIR/audit.* | awk '{print $9}'| xargs -n1 zgrep ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e | grep COMPLETE | grep FINAL | awk -F'|' '{print $7 }' | tail -200000)) + + vcpeTotal=0 + vcpeSum=0 + vcpeMax=0 + vcpeMin=10000 + for count in "${vcpe_perf_list[@]}" + do + if [ "$count" -gt "$vcpeMax" ]; then + vcpeMax=$count + fi + if [ "$count" -lt "$vcpeMin" ]; then + vcpeMin=$count + fi + vcpeSum=$(($vcpeSum + $count)) + vcpeTotal=$(($vcpeTotal + 1)) + done + # Multiplying by 2 because stability test waits after onset and abatement + average=$((($vcpeSum / $vcpeTotal)-(2*$WAIT))) + echo "vCPE Success cuse case ==> Max: $vcpeMax, Min: $vcpeMin, Average: $average ms [samples taken for average: $vcpeTotal]" +} + +process_vFW() { + # vFirewall use case + vfw_perf_list=($(ls -lrth $LOG_DIR/audit.* | awk '{print $9}'| xargs -n1 zgrep ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a | grep COMPLETE | grep FINAL | awk -F'|' '{print $7 }' | tail -200000)) + + vfwTotal=0 + vfwSum=0 + vfwMax=0 + vfwMin=10000 + for count in "${vfw_perf_list[@]}" + do + if [ "$count" -gt "$vfwMax" ]; then + vfwMax=$count + fi + if [ "$count" -lt "$vfwMin" ]; then + vfwMin=$count + fi + vfwSum=$(($vfwSum + $count)) + vfwTotal=$(($vfwTotal + 1)) + done + # Substracting wait as stability test waits after onset + average=$((($vfwSum / $vfwTotal)-$WAIT)) + echo "vFirewall Success use case => Max: $vfwMax, Min: $vfwMin, Average: $average ms [samples taken for average: $vfwTotal]" +} + +process_vDNS_OK() { + # vDNS use case + vdns_perf_list=($(ls -lrth $LOG_DIR/audit.* | awk '{print $9}'| xargs -n1 zgrep ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3 | grep COMPLETE | grep FINAL | awk -F'|' '{print $7 }' | tail -200000)) + + vdnsTotal=0 + vdnsSum=0 + vdnsMax=0 + vdnsMin=10000 + for count in "${vdns_perf_list[@]}" + do + if [ "$count" -gt "$vdnsMax" ]; then + vdnsMax=$count + fi + if [ "$count" -lt "$vdnsMin" ]; then + vdnsMin=$count + fi + vdnsSum=$(($vdnsSum + $count)) + vdnsTotal=$(($vdnsTotal + 1)) + done + average=$(($vdnsSum / $vdnsTotal)) + echo "vDNS Success use case => Max: $vdnsMax, Min: $vdnsMin, Average: $average ms [samples taken for average: $vdnsTotal]" +} + +process_vDNS_FAIL() { + # vDNS use case + vdns_perf_list=($(ls -lrth $LOG_DIR/audit.* | awk '{print $9}'| xargs -n1 zgrep ControlLoop-vDNS-Fail | grep "failed to execute the next step" | awk -F'|' '{print $7 }' | tail -200000)) + + vdns0Total=0 + vdns0Sum=0 + vdns0Max=0 + vdns0Min=10000 + for count in "${vdns_perf_list[@]}" + do + if [ "$count" -gt "$vdns0Max" ]; then + vdns0Max=$count + fi + if [ "$count" -lt "$vdns0Min" ]; then + vdns0Min=$count + fi + vdns0Sum=$(($vdns0Sum + $count)) + vdns0Total=$(($vdns0Total + 1)) + done + average=$(($vdns0Sum / $vdns0Total)) + echo "vDNS Failure use case => Max: $vdns0Max, Min: $vdns0Min, Average: $average ms [samples taken for average: $vdns0Total]" +} + +# Called when script is executed with invalid arguments +invalid_arguments() { +echo "Missing or invalid option(s):" +echo "$@" +echo "Try -help for more information" + exit 1 +} + +# Process the arguments passed to the script +process_arguments() { +short_args="hl:w:" +long_args="help,log-dir:wait:" + +args=$(getopt -o $short_args -l $long_args -n "$0" -- "$@" 2>&1 ) +[[ $? -ne 0 ]] && invalid_arguments $( echo " $args"| head -1 ) +[[ $# -eq 0 ]] && invalid_arguments "No options provided" +eval set -- "$args" +cmd_arg="$0" + +while true; do + case "$1" in + -l|--log-dir) + LOG_DIR=$2 + shift 2 ;; + -w|--wait) + WAIT=$2 + shift 2 ;; + -h|--help) + usage + exit 0 + ;; + --) + shift + break ;; + *) + echo BAD ARGUMENTS # perhaps error + break ;; + esac +done + +if ! [[ -d $LOG_DIR ]]; then + echo "$LOG_DIR does not exists" >&2; exit 1 +fi + +re='^[0-9]+$' +if ! [[ $WAIT =~ $re ]] ; then + echo "error: WAIT must be number " >&2; exit 1 +fi + +} + + +# main body +process_arguments $@ +process_vCPE_OK +process_vCPE_FAIL +process_vDNS_OK +process_vDNS_FAIL +process_vFW + diff --git a/testsuites/stability/src/main/resources/guilin/generate_performace_report.sh b/testsuites/stability/src/main/resources/guilin/generate_performace_report.sh deleted file mode 100755 index f8745e179..000000000 --- a/testsuites/stability/src/main/resources/guilin/generate_performace_report.sh +++ /dev/null @@ -1,240 +0,0 @@ -#!/bin/bash - -# Copyright (C) 2020 AT&T. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# The aim of this script is to collect performance metric for policies running in PDP-D. -# -# Pre-requisites: -# -# Run the JMeter Stability test plan on the PDP-D for at least few hours so that enough samples -# are collected and used for performance calculation. -# -# Recommendation: -# Run for 72 hours -# -# How to run: -# 1: Copy this script to drools container -# 2: Pass following parameters to run the script -# - log-dir : the complete directory location of audit.log file. -# - wait : the wait time configured in JMeter test plan. (in Guilin Release is no wait time) -# -# Sample command for running the script: ./generate_performance_report -l /var/log/onap/policy/pdpd -w 500 -# Note: -h or --help can be used to display details about input parameters. -# -# How it works -# The script will parse the audit.log file at the specified location and fetch the running time of each policy. -# Take enough samples and then calculate the average time taken for policies to complete. - -usage() -{ -_msg_="$@" -scriptname=$(basename $0) - -cat<<-EOF - -Command Arguments: - --l, --log-dir - Mandatory argument. Directory location of audit logs. - --w, --wait - Mandatory argument. Wait time between onset and appc for vCPE and vFW (in milliseconds) - --h, --help - Optional argument. Display this usage. - -EOF -exit 1 - -} - -process_vCPE_FAIL() { - # vCPE use case - vcpe0_perf_list=($(ls -lrth $LOG_DIR/audit.* | awk '{print $9}'| xargs -n1 zgrep ControlLoop-vCPE-Fail | grep "FINAL.FAILURE.ACCEPTED" | awk -F'|' '{print $7 }'| tail -200000)) - - vcpe0Total=0 - vcpe0Sum=0 - vcpe0Max=0 - vcpe0Min=10000 - for count in "${vcpe0_perf_list[@]}" - do - if [ "$count" -gt "$vcpe0Max" ]; then - vcpe0Max=$count - fi - if [ "$count" -lt "$vcpe0Min" ]; then - vcpe0Min=$count - fi - vcpe0Sum=$(($vcpe0Sum + $count)) - vcpe0Total=$(($vcpe0Total + 1)) - done - # Multiplying by 2 because stability test waits after onset and abatement - average=$((($vcpe0Sum / $vcpe0Total)-(2*$WAIT))) - echo "vCPE Failure cuse case ==> Max: $vcpe0Max, Min: $vcpe0Min, Average: $average ms [samples taken for average: $vcpe0Total]" -} - -process_vCPE_OK() { - # vCPE use case - vcpe_perf_list=($(ls -lrth $LOG_DIR/audit.* | awk '{print $9}'| xargs -n1 zgrep ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e | grep COMPLETE | grep FINAL | awk -F'|' '{print $7 }' | tail -200000)) - - vcpeTotal=0 - vcpeSum=0 - vcpeMax=0 - vcpeMin=10000 - for count in "${vcpe_perf_list[@]}" - do - if [ "$count" -gt "$vcpeMax" ]; then - vcpeMax=$count - fi - if [ "$count" -lt "$vcpeMin" ]; then - vcpeMin=$count - fi - vcpeSum=$(($vcpeSum + $count)) - vcpeTotal=$(($vcpeTotal + 1)) - done - # Multiplying by 2 because stability test waits after onset and abatement - average=$((($vcpeSum / $vcpeTotal)-(2*$WAIT))) - echo "vCPE Success cuse case ==> Max: $vcpeMax, Min: $vcpeMin, Average: $average ms [samples taken for average: $vcpeTotal]" -} - -process_vFW() { - # vFirewall use case - vfw_perf_list=($(ls -lrth $LOG_DIR/audit.* | awk '{print $9}'| xargs -n1 zgrep ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a | grep COMPLETE | grep FINAL | awk -F'|' '{print $7 }' | tail -200000)) - - vfwTotal=0 - vfwSum=0 - vfwMax=0 - vfwMin=10000 - for count in "${vfw_perf_list[@]}" - do - if [ "$count" -gt "$vfwMax" ]; then - vfwMax=$count - fi - if [ "$count" -lt "$vfwMin" ]; then - vfwMin=$count - fi - vfwSum=$(($vfwSum + $count)) - vfwTotal=$(($vfwTotal + 1)) - done - # Substracting wait as stability test waits after onset - average=$((($vfwSum / $vfwTotal)-$WAIT)) - echo "vFirewall Success use case => Max: $vfwMax, Min: $vfwMin, Average: $average ms [samples taken for average: $vfwTotal]" -} - -process_vDNS_OK() { - # vDNS use case - vdns_perf_list=($(ls -lrth $LOG_DIR/audit.* | awk '{print $9}'| xargs -n1 zgrep ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3 | grep COMPLETE | grep FINAL | awk -F'|' '{print $7 }' | tail -200000)) - - vdnsTotal=0 - vdnsSum=0 - vdnsMax=0 - vdnsMin=10000 - for count in "${vdns_perf_list[@]}" - do - if [ "$count" -gt "$vdnsMax" ]; then - vdnsMax=$count - fi - if [ "$count" -lt "$vdnsMin" ]; then - vdnsMin=$count - fi - vdnsSum=$(($vdnsSum + $count)) - vdnsTotal=$(($vdnsTotal + 1)) - done - average=$(($vdnsSum / $vdnsTotal)) - echo "vDNS Success use case => Max: $vdnsMax, Min: $vdnsMin, Average: $average ms [samples taken for average: $vdnsTotal]" -} - -process_vDNS_FAIL() { - # vDNS use case - vdns_perf_list=($(ls -lrth $LOG_DIR/audit.* | awk '{print $9}'| xargs -n1 zgrep ControlLoop-vDNS-Fail | grep "failed to execute the next step" | awk -F'|' '{print $7 }' | tail -200000)) - - vdns0Total=0 - vdns0Sum=0 - vdns0Max=0 - vdns0Min=10000 - for count in "${vdns_perf_list[@]}" - do - if [ "$count" -gt "$vdns0Max" ]; then - vdns0Max=$count - fi - if [ "$count" -lt "$vdns0Min" ]; then - vdns0Min=$count - fi - vdns0Sum=$(($vdns0Sum + $count)) - vdns0Total=$(($vdns0Total + 1)) - done - average=$(($vdns0Sum / $vdns0Total)) - echo "vDNS Failure use case => Max: $vdns0Max, Min: $vdns0Min, Average: $average ms [samples taken for average: $vdns0Total]" -} - -# Called when script is executed with invalid arguments -invalid_arguments() { -echo "Missing or invalid option(s):" -echo "$@" -echo "Try -help for more information" - exit 1 -} - -# Process the arguments passed to the script -process_arguments() { -short_args="hl:w:" -long_args="help,log-dir:wait:" - -args=$(getopt -o $short_args -l $long_args -n "$0" -- "$@" 2>&1 ) -[[ $? -ne 0 ]] && invalid_arguments $( echo " $args"| head -1 ) -[[ $# -eq 0 ]] && invalid_arguments "No options provided" -eval set -- "$args" -cmd_arg="$0" - -while true; do - case "$1" in - -l|--log-dir) - LOG_DIR=$2 - shift 2 ;; - -w|--wait) - WAIT=$2 - shift 2 ;; - -h|--help) - usage - exit 0 - ;; - --) - shift - break ;; - *) - echo BAD ARGUMENTS # perhaps error - break ;; - esac -done - -if ! [[ -d $LOG_DIR ]]; then - echo "$LOG_DIR does not exists" >&2; exit 1 -fi - -re='^[0-9]+$' -if ! [[ $WAIT =~ $re ]] ; then - echo "error: WAIT must be number " >&2; exit 1 -fi - -} - - -# main body -process_arguments $@ -process_vCPE_OK -process_vCPE_FAIL -process_vDNS_OK -process_vDNS_FAIL -process_vFW - diff --git a/testsuites/stability/src/main/resources/guilin/s3p.jmx b/testsuites/stability/src/main/resources/guilin/s3p.jmx deleted file mode 100644 index 3ce7e8627..000000000 --- a/testsuites/stability/src/main/resources/guilin/s3p.jmx +++ /dev/null @@ -1,3189 +0,0 @@ - - - - - - - false - true - false - - - - API_HOST - 10.12.5.232 - = - - - API_PORT - 30044 - = - - - PAP_HOST - 10.12.5.232 - = - - - PAP_PORT - 30656 - = - - - DMAAP_HOST - 10.12.5.232 - = - - - DMAAP_PORT - 30226 - = - - - DROOLS_HOST - 10.12.5.232 - = - - - DROOLS_PORT - 32161 - = - - - 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": "usecases" - } - } - } - ] - } -} - = - - - - ${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": "usecases" - } - } - } - ] - } -} - = - - - - ${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": "usecases" - } - } - } - ] - } -} - = - - - - ${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": "usecases" - } - } - } - ] - } -} - = - - - - ${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": "usecases" - } - } - } - ] - } -} - = - - - - ${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/usecases/drools/facts - GET - false - false - false - false - - - - - - - - 200 - - - Assertion.response_code - false - 8 - - - - $.usecases - 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("vCPE Success APPCL 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("vCPE Success POLICYCL 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("vCPE Failure APPCL 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("vCPE Failure POLICYCL 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("vDNS Success POLICYCL 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("vDNS Failure POLICYCL 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("vFW Success APPCCL 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("vFW Success POLICYCL 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 - - - - - - - - diff --git a/testsuites/stability/src/main/resources/s3p.jmx b/testsuites/stability/src/main/resources/s3p.jmx new file mode 100644 index 000000000..3ce7e8627 --- /dev/null +++ b/testsuites/stability/src/main/resources/s3p.jmx @@ -0,0 +1,3189 @@ + + + + + + + false + true + false + + + + API_HOST + 10.12.5.232 + = + + + API_PORT + 30044 + = + + + PAP_HOST + 10.12.5.232 + = + + + PAP_PORT + 30656 + = + + + DMAAP_HOST + 10.12.5.232 + = + + + DMAAP_PORT + 30226 + = + + + DROOLS_HOST + 10.12.5.232 + = + + + DROOLS_PORT + 32161 + = + + + 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": "usecases" + } + } + } + ] + } +} + = + + + + ${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": "usecases" + } + } + } + ] + } +} + = + + + + ${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": "usecases" + } + } + } + ] + } +} + = + + + + ${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": "usecases" + } + } + } + ] + } +} + = + + + + ${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": "usecases" + } + } + } + ] + } +} + = + + + + ${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/usecases/drools/facts + GET + false + false + false + false + + + + + + + + 200 + + + Assertion.response_code + false + 8 + + + + $.usecases + 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("vCPE Success APPCL 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("vCPE Success POLICYCL 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("vCPE Failure APPCL 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("vCPE Failure POLICYCL 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("vDNS Success POLICYCL 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("vDNS Failure POLICYCL 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("vFW Success APPCCL 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("vFW Success POLICYCL 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