diff options
author | Ram Krishna Verma <ram_krishna.verma@bell.ca> | 2021-10-19 16:40:11 -0400 |
---|---|---|
committer | Ram Krishna Verma <ram_krishna.verma@bell.ca> | 2021-10-19 16:40:16 -0400 |
commit | e7a6d0293586b4c5345b1408458b045154cd1305 (patch) | |
tree | 1ab69453223debe73064df18a88b3a1a2b5ec9df /testsuites/performance | |
parent | 2bc8d6b5da92f02384485c81cd01d5715285f68f (diff) |
Update api performance test jmx file
Issue-ID: POLICY-3652
Change-Id: If16c23460cc94738597d54de94e699fcffbc65e2
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
Diffstat (limited to 'testsuites/performance')
-rw-r--r-- | testsuites/performance/src/main/resources/testplans/policy_api_performance.jmx | 6826 |
1 files changed, 1378 insertions, 5448 deletions
diff --git a/testsuites/performance/src/main/resources/testplans/policy_api_performance.jmx b/testsuites/performance/src/main/resources/testplans/policy_api_performance.jmx index 7044bb78..049c048e 100644 --- a/testsuites/performance/src/main/resources/testplans/policy_api_performance.jmx +++ b/testsuites/performance/src/main/resources/testplans/policy_api_performance.jmx @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> -<jmeterTestPlan version="1.2" properties="5.0" jmeter="5.1.1 r1855137"> +<jmeterTestPlan version="1.2" properties="5.0" jmeter="5.4.1"> <hashTree> - <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Policy API Stability" enabled="true"> + <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Policy API Performance" enabled="true"> <stringProp name="TestPlan.comments"></stringProp> <boolProp name="TestPlan.functional_mode">false</boolProp> <boolProp name="TestPlan.tearDown_on_shutdown">true</boolProp> @@ -10,12 +10,12 @@ <collectionProp name="Arguments.arguments"> <elementProp name="API_HOST" elementType="Argument"> <stringProp name="Argument.name">API_HOST</stringProp> - <stringProp name="Argument.value">10.12.6.112</stringProp> + <stringProp name="Argument.value">10.12.6.14</stringProp> <stringProp name="Argument.metadata">=</stringProp> </elementProp> <elementProp name="API_PORT" elementType="Argument"> <stringProp name="Argument.name">API_PORT</stringProp> - <stringProp name="Argument.value">32251</stringProp> + <stringProp name="Argument.value">32191</stringProp> <stringProp name="Argument.metadata">=</stringProp> </elementProp> </collectionProp> @@ -26,7 +26,7 @@ <AuthManager guiclass="AuthPanel" testclass="AuthManager" testname="HTTP Authorization Manager" enabled="true"> <collectionProp name="AuthManager.auth_list"> <elementProp name="" elementType="Authorization"> - <stringProp name="Authorization.url">https://${API_HOST}:${API_PORT}/policy/api/v1</stringProp> + <stringProp name="Authorization.url">https://${API_HOST}:${API_PORT}/</stringProp> <stringProp name="Authorization.username">healthcheck</stringProp> <stringProp name="Authorization.password">zb!XztG34</stringProp> <stringProp name="Authorization.domain"></stringProp> @@ -34,6 +34,7 @@ </elementProp> </collectionProp> <boolProp name="AuthManager.clearEachIteration">true</boolProp> + <boolProp name="AuthManager.controlledByThreadGroup">false</boolProp> </AuthManager> <hashTree/> <HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true"> @@ -50,7 +51,7 @@ </HeaderManager> <hashTree/> <SetupThreadGroup guiclass="SetupThreadGroupGui" testclass="SetupThreadGroup" testname="setUp Thread Group" enabled="true"> - <stringProp name="ThreadGroup.on_sample_error">stoptest</stringProp> + <stringProp name="ThreadGroup.on_sample_error">continue</stringProp> <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true"> <boolProp name="LoopController.continue_forever">false</boolProp> <stringProp name="LoopController.loops">1</stringProp> @@ -60,6 +61,7 @@ <boolProp name="ThreadGroup.scheduler">false</boolProp> <stringProp name="ThreadGroup.duration"></stringProp> <stringProp name="ThreadGroup.delay"></stringProp> + <boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp> </SetupThreadGroup> <hashTree> <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get Healthcheck" enabled="true"> @@ -201,8 +203,8 @@ if (prev.getResponseCode() == '200') { res = jsonSlurper.parseText(prev.getResponseDataAsString()); assert res instanceof Map; - assert res.policy_types instanceof List; - assert res.policy_types.size == 18; + assert res.policy_types instanceof Map; + assert res.policy_types.size() == 35; }</stringProp> </JSR223Assertion> <hashTree/> @@ -212,255 +214,26 @@ if (prev.getResponseCode() == '200') { <stringProp name="ThreadGroup.on_sample_error">continue</stringProp> <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true"> <boolProp name="LoopController.continue_forever">false</boolProp> - <stringProp name="LoopController.loops">10000000</stringProp> + <intProp name="LoopController.loops">-1</intProp> </elementProp> <stringProp name="ThreadGroup.num_threads">20</stringProp> - <stringProp name="ThreadGroup.ramp_time">2</stringProp> + <stringProp name="ThreadGroup.ramp_time">5</stringProp> <boolProp name="ThreadGroup.scheduler">true</boolProp> - <stringProp name="ThreadGroup.duration">3600</stringProp> - <stringProp name="ThreadGroup.delay">2</stringProp> + <stringProp name="ThreadGroup.duration">9000</stringProp> + <stringProp name="ThreadGroup.delay">5</stringProp> + <boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp> </ThreadGroup> <hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Create TCA Policy Type V1" enabled="true"> - <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> - <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> - <collectionProp name="Arguments.arguments"> - <elementProp name="" elementType="HTTPArgument"> - <boolProp name="HTTPArgument.always_encode">false</boolProp> - <stringProp name="Argument.value">{
 - "tosca_definitions_version": "tosca_simple_yaml_1_0_0",
 - "policy_types": [
 - {
 - "onap.policies.Monitoring": {
 - "derived_from": "tosca.policies.Root",
 - "version": "1.0.0",
 - "description": "a base policy type for all policies that governs monitoring provisioning"
 - }
 - },
 - {
 - "onap.policies.monitoring.cdap.tca.hi.lo.app": {
 - "derived_from": "onap.policies.Monitoring",
 - "version": "1.0.0",
 - "properties": {
 - "tca_policy": {
 - "type": "map",
 - "description": "TCA Policy JSON",
 - "entry_schema": {
 - "type": "onap.datatypes.monitoring.tca_policy"
 - }
 - }
 - }
 - }
 - }
 - ],
 - "data_types": [
 - {
 - "onap.datatypes.monitoring.metricsPerEventName": {
 - "derived_from": "tosca.datatypes.Root",
 - "properties": {
 - "controlLoopSchemaType": {
 - "type": "string",
 - "required": true,
 - "description": "Specifies Control Loop Schema Type for the event Name e.g. VNF, VM",
 - "constraints": [
 - {
 - "valid_values": [
 - "VM",
 - "VNF"
 - ]
 - }
 - ]
 - },
 - "eventName": {
 - "type": "string",
 - "required": true,
 - "description": "Event name to which thresholds need to be applied"
 - },
 - "policyName": {
 - "type": "string",
 - "required": true,
 - "description": "TCA Policy Scope Name"
 - },
 - "policyScope": {
 - "type": "string",
 - "required": true,
 - "description": "TCA Policy Scope"
 - },
 - "policyVersion": {
 - "type": "string",
 - "required": true,
 - "description": "TCA Policy Scope Version"
 - },
 - "thresholds": {
 - "type": "list",
 - "required": true,
 - "description": "Thresholds associated with eventName",
 - "entry_schema": {
 - "type": "onap.datatypes.monitoring.thresholds"
 - }
 - }
 - }
 - }
 - },
 - {
 - "onap.datatypes.monitoring.tca_policy": {
 - "derived_from": "tosca.datatypes.Root",
 - "properties": {
 - "domain": {
 - "type": "string",
 - "required": true,
 - "description": "Domain name to which TCA needs to be applied",
 - "default": "measurementsForVfScaling",
 - "constraints": [
 - {
 - "equal": "measurementsForVfScaling"
 - }
 - ]
 - },
 - "metricsPerEventName": {
 - "type": "list",
 - "required": true,
 - "description": "Contains eventName and threshold details that need to be applied to given eventName",
 - "entry_schema": {
 - "type": "onap.datatypes.monitoring.metricsPerEventName"
 - }
 - }
 - }
 - }
 - },
 - {
 - "onap.datatypes.monitoring.thresholds": {
 - "derived_from": "tosca.datatypes.Root",
 - "properties": {
 - "closedLoopControlName": {
 - "type": "string",
 - "required": true,
 - "description": "Closed Loop Control Name associated with the threshold"
 - },
 - "closedLoopEventStatus": {
 - "type": "string",
 - "required": true,
 - "description": "Closed Loop Event Status of the threshold",
 - "constraints": [
 - {
 - "valid_values": [
 - "ONSET",
 - "ABATED"
 - ]
 - }
 - ]
 - },
 - "direction": {
 - "type": "string",
 - "required": true,
 - "description": "Direction of the threshold",
 - "constraints": [
 - {
 - "valid_values": [
 - "LESS",
 - "LESS_OR_EQUAL",
 - "GREATER",
 - "GREATER_OR_EQUAL",
 - "EQUAL"
 - ]
 - }
 - ]
 - },
 - "fieldPath": {
 - "type": "string",
 - "required": true,
 - "description": "Json field Path as per CEF message which needs to be analyzed for TCA",
 - "constraints": [
 - {
 - "valid_values": [
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuIdle",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageInterrupt",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageNice",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSoftIrq",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSteal",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSystem",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuWait",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].percentUsage",
 - "$.event.measurementsForVfScalingFields.meanRequestLatency",
 - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryBuffered",
 - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryCached",
 - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryConfigured",
 - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryFree",
 - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryUsed",
 - "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value"
 - ]
 - }
 - ]
 - },
 - "severity": {
 - "type": "string",
 - "required": true,
 - "description": "Threshold Event Severity",
 - "constraints": [
 - {
 - "valid_values": [
 - "CRITICAL",
 - "MAJOR",
 - "MINOR",
 - "WARNING",
 - "NORMAL"
 - ]
 - }
 - ]
 - },
 - "thresholdValue": {
 - "type": "integer",
 - "required": true,
 - "description": "Threshold value for the field Path inside CEF message"
 - },
 - "version": {
 - "type": "string",
 - "required": true,
 - "description": "Version number associated with the threshold"
 - }
 - }
 - }
 - }
 - ]
 -}</stringProp> - <stringProp name="Argument.metadata">=</stringProp> - </elementProp> - </collectionProp> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get Policy Metrics" enabled="true"> + <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> + <collectionProp name="Arguments.arguments"/> </elementProp> <stringProp name="HTTPSampler.domain">${API_HOST}</stringProp> <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> <stringProp name="HTTPSampler.protocol">https</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes</stringProp> - <stringProp name="HTTPSampler.method">POST</stringProp> + <stringProp name="HTTPSampler.path">/metrics</stringProp> + <stringProp name="HTTPSampler.method">GET</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> <boolProp name="HTTPSampler.use_keepalive">true</boolProp> @@ -485,531 +258,240 @@ if (prev.getResponseCode() == '200') { <stringProp name="parameters"></stringProp> <stringProp name="filename"></stringProp> <stringProp name="cacheKey">true</stringProp> - <stringProp name="script">import groovy.json.JsonSlurper; - -def res = []; + <stringProp name="script">def res = []; if (prev.getResponseCode() == '200') { - def jsonSlurper = new JsonSlurper(); - res = jsonSlurper.parseText(prev.getResponseDataAsString()); - - assert res instanceof Map; - assert res.policy_types instanceof List; - assert res.policy_types.size == 2; - assert res.policy_types[0] instanceof Map; - assert res.policy_types[1] instanceof Map; + res = prev.getResponseDataAsString(); + + assert res.contains("jvm_buffer_pool_used_bytes") + assert res.contains("jvm_buffer_pool_capacity_bytes") + assert res.contains("jvm_buffer_pool_used_buffers") + assert res.contains("jvm_memory_bytes_used") + assert res.contains("jvm_memory_bytes_committed") + assert res.contains("jvm_memory_pool_bytes_used") + assert res.contains("jvm_memory_pool_bytes_committed") + assert res.contains("jvm_memory_pool_allocated_bytes_created") + assert res.contains("jvm_memory_pool_allocated_bytes_total") }</stringProp> </JSR223Assertion> <hashTree/> </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Create TCA Policy Type V2" enabled="true"> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Create Policy Type Monitoring" enabled="true"> <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> <collectionProp name="Arguments.arguments"> <elementProp name="" elementType="HTTPArgument"> <boolProp name="HTTPArgument.always_encode">false</boolProp> <stringProp name="Argument.value">{
 - "tosca_definitions_version": "tosca_simple_yaml_1_0_0",
 - "policy_types": [
 - {
 - "onap.policies.Monitoring": {
 - "derived_from": "tosca.policies.Root",
 - "version": "1.0.0",
 - "description": "a base policy type for all policies that governs monitoring provisioning"
 - }
 + "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
 + "policy_types": {
 + "onap.policies.Monitoring": {
 + "derived_from": "tosca.policies.Root",
 + "version": "6.0.0",
 + "description": "a base policy type for all policies that govern monitoring provisioning"
 },
 - {
 - "onap.policies.monitoring.cdap.tca.hi.lo.app": {
 - "derived_from": "onap.policies.Monitoring",
 - "version": "2.0.0",
 - "properties": {
 - "tca_policy": {
 - "type": "map",
 - "description": "TCA Policy JSON",
 - "entry_schema": {
 - "type": "onap.datatypes.monitoring.tca_policy"
 - }
 - }
 + "onap.policies.monitoring.cdap.tca.hi.lo.app": {
 + "derived_from": "onap.policies.Monitoring",
 + "version": "6.0.${__threadNum}",
 + "properties": {
 + "tca_policy": {
 + "type": "onap.datatypes.monitoring.tca_policy",
 + "description": "TCA Policy JSON",
 + "required": true
 }
 }
 }
 - ],
 - "data_types": [
 - {
 - "onap.datatypes.monitoring.metricsPerEventName": {
 - "derived_from": "tosca.datatypes.Root",
 - "properties": {
 - "controlLoopSchemaType": {
 - "type": "string",
 - "required": true,
 - "description": "Specifies Control Loop Schema Type for the event Name e.g. VNF, VM",
 - "constraints": [
 - {
 - "valid_values": [
 - "VM",
 - "VNF"
 - ]
 - }
 - ]
 - },
 - "eventName": {
 - "type": "string",
 - "required": true,
 - "description": "Event name to which thresholds need to be applied"
 - },
 - "policyName": {
 - "type": "string",
 - "required": true,
 - "description": "TCA Policy Scope Name"
 - },
 - "policyScope": {
 - "type": "string",
 - "required": true,
 - "description": "TCA Policy Scope"
 - },
 - "policyVersion": {
 - "type": "string",
 - "required": true,
 - "description": "TCA Policy Scope Version"
 - },
 - "thresholds": {
 - "type": "list",
 - "required": true,
 - "description": "Thresholds associated with eventName",
 - "entry_schema": {
 - "type": "onap.datatypes.monitoring.thresholds"
 + },
 + "data_types": {
 + "onap.datatypes.monitoring.metricsPerEventName": {
 + "derived_from": "tosca.datatypes.Root",
 + "properties": {
 + "controlLoopSchemaType": {
 + "type": "string",
 + "required": true,
 + "description": "Specifies Control Loop Schema Type for the event Name e.g. VNF, VM",
 + "constraints": [
 + {
 + "valid_values": [
 + "VM",
 + "VNF"
 + ]
 }
 + ]
 + },
 + "eventName": {
 + "type": "string",
 + "required": true,
 + "description": "Event name to which thresholds need to be applied"
 + },
 + "policyName": {
 + "type": "string",
 + "required": true,
 + "description": "TCA Policy Scope Name"
 + },
 + "policyScope": {
 + "type": "string",
 + "required": true,
 + "description": "TCA Policy Scope"
 + },
 + "policyVersion": {
 + "type": "string",
 + "required": true,
 + "description": "TCA Policy Scope Version"
 + },
 + "thresholds": {
 + "type": "list",
 + "required": true,
 + "description": "Thresholds associated with eventName",
 + "entry_schema": {
 + "type": "onap.datatypes.monitoring.thresholds"
 }
 }
 }
 },
 - {
 - "onap.datatypes.monitoring.tca_policy": {
 - "derived_from": "tosca.datatypes.Root",
 - "properties": {
 - "domain": {
 - "type": "string",
 - "required": true,
 - "description": "Domain name to which TCA needs to be applied",
 - "default": "measurementsForVfScaling",
 - "constraints": [
 - {
 - "equal": "measurementsForVfScaling"
 - }
 - ]
 - },
 - "metricsPerEventName": {
 - "type": "list",
 - "required": true,
 - "description": "Contains eventName and threshold details that need to be applied to given eventName",
 - "entry_schema": {
 - "type": "onap.datatypes.monitoring.metricsPerEventName"
 + "onap.datatypes.monitoring.tca_policy": {
 + "derived_from": "tosca.datatypes.Root",
 + "properties": {
 + "domain": {
 + "type": "string",
 + "required": true,
 + "description": "Domain name to which TCA needs to be applied",
 + "default": "measurementsForVfScaling",
 + "constraints": [
 + {
 + "equal": "measurementsForVfScaling"
 }
 + ]
 + },
 + "metricsPerEventName": {
 + "type": "list",
 + "required": true,
 + "description": "Contains eventName and threshold details that need to be applied to given eventName",
 + "entry_schema": {
 + "type": "onap.datatypes.monitoring.metricsPerEventName"
 }
 }
 }
 },
 - {
 - "onap.datatypes.monitoring.thresholds": {
 - "derived_from": "tosca.datatypes.Root",
 - "properties": {
 - "closedLoopControlName": {
 - "type": "string",
 - "required": true,
 - "description": "Closed Loop Control Name associated with the threshold"
 - },
 - "closedLoopEventStatus": {
 - "type": "string",
 - "required": true,
 - "description": "Closed Loop Event Status of the threshold",
 - "constraints": [
 - {
 - "valid_values": [
 - "ONSET",
 - "ABATED"
 - ]
 - }
 - ]
 - },
 - "direction": {
 - "type": "string",
 - "required": true,
 - "description": "Direction of the threshold",
 - "constraints": [
 - {
 - "valid_values": [
 - "LESS",
 - "LESS_OR_EQUAL",
 - "GREATER",
 - "GREATER_OR_EQUAL",
 - "EQUAL"
 - ]
 - }
 - ]
 - },
 - "fieldPath": {
 - "type": "string",
 - "required": true,
 - "description": "Json field Path as per CEF message which needs to be analyzed for TCA",
 - "constraints": [
 - {
 - "valid_values": [
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuIdle",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageInterrupt",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageNice",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSoftIrq",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSteal",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSystem",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuWait",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].percentUsage",
 - "$.event.measurementsForVfScalingFields.meanRequestLatency",
 - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryBuffered",
 - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryCached",
 - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryConfigured",
 - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryFree",
 - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryUsed",
 - "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value"
 - ]
 - }
 - ]
 - },
 - "severity": {
 - "type": "string",
 - "required": true,
 - "description": "Threshold Event Severity",
 - "constraints": [
 - {
 - "valid_values": [
 - "CRITICAL",
 - "MAJOR",
 - "MINOR",
 - "WARNING",
 - "NORMAL"
 - ]
 - }
 - ]
 - },
 - "thresholdValue": {
 - "type": "integer",
 - "required": true,
 - "description": "Threshold value for the field Path inside CEF message"
 - },
 - "version": {
 - "type": "string",
 - "required": true,
 - "description": "Version number associated with the threshold"
 - }
 - }
 - }
 - }
 - ]
 -}</stringProp> - <stringProp name="Argument.metadata">=</stringProp> - </elementProp> - </collectionProp> - </elementProp> - <stringProp name="HTTPSampler.domain">${API_HOST}</stringProp> - <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> - <stringProp name="HTTPSampler.protocol">https</stringProp> - <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes</stringProp> - <stringProp name="HTTPSampler.method">POST</stringProp> - <boolProp name="HTTPSampler.follow_redirects">true</boolProp> - <boolProp name="HTTPSampler.auto_redirects">false</boolProp> - <boolProp name="HTTPSampler.use_keepalive">true</boolProp> - <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> - <stringProp name="HTTPSampler.embedded_url_re"></stringProp> - <stringProp name="HTTPSampler.connect_timeout"></stringProp> - <stringProp name="HTTPSampler.response_timeout"></stringProp> - </HTTPSamplerProxy> - <hashTree> - <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true"> - <collectionProp name="Asserion.test_strings"> - <stringProp name="49586">200</stringProp> - </collectionProp> - <stringProp name="Assertion.custom_message"></stringProp> - <stringProp name="Assertion.test_field">Assertion.response_code</stringProp> - <boolProp name="Assertion.assume_success">false</boolProp> - <intProp name="Assertion.test_type">1</intProp> - </ResponseAssertion> - <hashTree/> - <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JSR223 Assertion" enabled="true"> - <stringProp name="scriptLanguage">groovy</stringProp> - <stringProp name="parameters"></stringProp> - <stringProp name="filename"></stringProp> - <stringProp name="cacheKey">true</stringProp> - <stringProp name="script">import groovy.json.JsonSlurper; - -def res = []; -if (prev.getResponseCode() == '200') { - def jsonSlurper = new JsonSlurper(); - res = jsonSlurper.parseText(prev.getResponseDataAsString()); - - assert res instanceof Map; - assert res.policy_types instanceof List; - assert res.policy_types.size == 2; - assert res.policy_types[0] instanceof Map; - assert res.policy_types[1] instanceof Map; -}</stringProp> - </JSR223Assertion> - <hashTree/> - </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Create TCA Policy Type V3" enabled="true"> - <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> - <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> - <collectionProp name="Arguments.arguments"> - <elementProp name="" elementType="HTTPArgument"> - <boolProp name="HTTPArgument.always_encode">false</boolProp> - <stringProp name="Argument.value">{
 - "tosca_definitions_version": "tosca_simple_yaml_1_0_0",
 - "policy_types": [
 - {
 - "onap.policies.Monitoring": {
 - "derived_from": "tosca.policies.Root",
 - "version": "1.0.0",
 - "description": "a base policy type for all policies that governs monitoring provisioning"
 - }
 - },
 - {
 - "onap.policies.monitoring.cdap.tca.hi.lo.app": {
 - "derived_from": "onap.policies.Monitoring",
 - "version": "3.0.0",
 - "properties": {
 - "tca_policy": {
 - "type": "map",
 - "description": "TCA Policy JSON",
 - "entry_schema": {
 - "type": "onap.datatypes.monitoring.tca_policy"
 + "onap.datatypes.monitoring.thresholds": {
 + "derived_from": "tosca.datatypes.Root",
 + "properties": {
 + "closedLoopControlName": {
 + "type": "string",
 + "required": true,
 + "description": "Closed Loop Control Name associated with the threshold"
 + },
 + "closedLoopEventStatus": {
 + "type": "string",
 + "required": true,
 + "description": "Closed Loop Event Status of the threshold",
 + "constraints": [
 + {
 + "valid_values": [
 + "ONSET",
 + "ABATED"
 + ]
 }
 - }
 - }
 - }
 - }
 - ],
 - "data_types": [
 - {
 - "onap.datatypes.monitoring.metricsPerEventName": {
 - "derived_from": "tosca.datatypes.Root",
 - "properties": {
 - "controlLoopSchemaType": {
 - "type": "string",
 - "required": true,
 - "description": "Specifies Control Loop Schema Type for the event Name e.g. VNF, VM",
 - "constraints": [
 - {
 - "valid_values": [
 - "VM",
 - "VNF"
 - ]
 - }
 - ]
 - },
 - "eventName": {
 - "type": "string",
 - "required": true,
 - "description": "Event name to which thresholds need to be applied"
 - },
 - "policyName": {
 - "type": "string",
 - "required": true,
 - "description": "TCA Policy Scope Name"
 - },
 - "policyScope": {
 - "type": "string",
 - "required": true,
 - "description": "TCA Policy Scope"
 - },
 - "policyVersion": {
 - "type": "string",
 - "required": true,
 - "description": "TCA Policy Scope Version"
 - },
 - "thresholds": {
 - "type": "list",
 - "required": true,
 - "description": "Thresholds associated with eventName",
 - "entry_schema": {
 - "type": "onap.datatypes.monitoring.thresholds"
 + ]
 + },
 + "direction": {
 + "type": "string",
 + "required": true,
 + "description": "Direction of the threshold",
 + "constraints": [
 + {
 + "valid_values": [
 + "LESS",
 + "LESS_OR_EQUAL",
 + "GREATER",
 + "GREATER_OR_EQUAL",
 + "EQUAL"
 + ]
 }
 - }
 - }
 - }
 - },
 - {
 - "onap.datatypes.monitoring.tca_policy": {
 - "derived_from": "tosca.datatypes.Root",
 - "properties": {
 - "domain": {
 - "type": "string",
 - "required": true,
 - "description": "Domain name to which TCA needs to be applied",
 - "default": "measurementsForVfScaling",
 - "constraints": [
 - {
 - "equal": "measurementsForVfScaling"
 - }
 - ]
 - },
 - "metricsPerEventName": {
 - "type": "list",
 - "required": true,
 - "description": "Contains eventName and threshold details that need to be applied to given eventName",
 - "entry_schema": {
 - "type": "onap.datatypes.monitoring.metricsPerEventName"
 + ]
 + },
 + "fieldPath": {
 + "type": "string",
 + "required": true,
 + "description": "Json field Path as per CEF message which needs to be analyzed for TCA",
 + "constraints": [
 + {
 + "valid_values": [
 + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta",
 + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsDelta",
 + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsDelta",
 + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsDelta",
 + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsDelta",
 + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsDelta",
 + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsDelta",
 + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsAccumulated",
 + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsAccumulated",
 + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsAccumulated",
 + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsAccumulated",
 + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated",
 + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsAccumulated",
 + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsAccumulated",
 + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsDelta",
 + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsDelta",
 + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsDelta",
 + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsDelta",
 + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsDelta",
 + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsDelta",
 + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsDelta",
 + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsAccumulated",
 + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsAccumulated",
 + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsAccumulated",
 + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsAccumulated",
 + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsAccumulated",
 + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsAccumulated",
 + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsAccumulated",
 + "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuIdle",
 + "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageInterrupt",
 + "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageNice",
 + "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSoftIrq",
 + "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSteal",
 + "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSystem",
 + "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuWait",
 + "$.event.measurementsForVfScalingFields.cpuUsageArray[*].percentUsage",
 + "$.event.measurementsForVfScalingFields.meanRequestLatency",
 + "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryBuffered",
 + "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryCached",
 + "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryConfigured",
 + "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryFree",
 + "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryUsed",
 + "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value"
 + ]
 }
 - }
 - }
 - }
 - },
 - {
 - "onap.datatypes.monitoring.thresholds": {
 - "derived_from": "tosca.datatypes.Root",
 - "properties": {
 - "closedLoopControlName": {
 - "type": "string",
 - "required": true,
 - "description": "Closed Loop Control Name associated with the threshold"
 - },
 - "closedLoopEventStatus": {
 - "type": "string",
 - "required": true,
 - "description": "Closed Loop Event Status of the threshold",
 - "constraints": [
 - {
 - "valid_values": [
 - "ONSET",
 - "ABATED"
 - ]
 - }
 - ]
 - },
 - "direction": {
 - "type": "string",
 - "required": true,
 - "description": "Direction of the threshold",
 - "constraints": [
 - {
 - "valid_values": [
 - "LESS",
 - "LESS_OR_EQUAL",
 - "GREATER",
 - "GREATER_OR_EQUAL",
 - "EQUAL"
 - ]
 - }
 - ]
 - },
 - "fieldPath": {
 - "type": "string",
 - "required": true,
 - "description": "Json field Path as per CEF message which needs to be analyzed for TCA",
 - "constraints": [
 - {
 - "valid_values": [
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuIdle",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageInterrupt",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageNice",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSoftIrq",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSteal",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSystem",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuWait",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].percentUsage",
 - "$.event.measurementsForVfScalingFields.meanRequestLatency",
 - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryBuffered",
 - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryCached",
 - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryConfigured",
 - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryFree",
 - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryUsed",
 - "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value"
 - ]
 - }
 - ]
 - },
 - "severity": {
 - "type": "string",
 - "required": true,
 - "description": "Threshold Event Severity",
 - "constraints": [
 - {
 - "valid_values": [
 - "CRITICAL",
 - "MAJOR",
 - "MINOR",
 - "WARNING",
 - "NORMAL"
 - ]
 - }
 - ]
 - },
 - "thresholdValue": {
 - "type": "integer",
 - "required": true,
 - "description": "Threshold value for the field Path inside CEF message"
 - },
 - "version": {
 - "type": "string",
 - "required": true,
 - "description": "Version number associated with the threshold"
 - }
 + ]
 + },
 + "severity": {
 + "type": "string",
 + "required": true,
 + "description": "Threshold Event Severity",
 + "constraints": [
 + {
 + "valid_values": [
 + "CRITICAL",
 + "MAJOR",
 + "MINOR",
 + "WARNING",
 + "NORMAL"
 + ]
 + }
 + ]
 + },
 + "thresholdValue": {
 + "type": "integer",
 + "required": true,
 + "description": "Threshold value for the field Path inside CEF message"
 + },
 + "version": {
 + "type": "string",
 + "required": true,
 + "description": "Version number associated with the threshold"
 }
 }
 }
 - ]
 + }
 }</stringProp> <stringProp name="Argument.metadata">=</stringProp> </elementProp> @@ -1053,523 +535,231 @@ if (prev.getResponseCode() == '200') { res = jsonSlurper.parseText(prev.getResponseDataAsString()); assert res instanceof Map; - assert res.policy_types instanceof List; - assert res.policy_types.size == 2; - assert res.policy_types[0] instanceof Map; - assert res.policy_types[1] instanceof Map; + assert res.policy_types instanceof Map; + assert res.policy_types.size() == 2; + assert res.policy_types.values()[0] instanceof Map; + assert res.policy_types.values()[1] instanceof Map; }</stringProp> </JSR223Assertion> <hashTree/> </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Create TCA Policy Type V4" enabled="true"> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Create Policy Type Monitoring V7" enabled="true"> <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> <collectionProp name="Arguments.arguments"> <elementProp name="" elementType="HTTPArgument"> <boolProp name="HTTPArgument.always_encode">false</boolProp> <stringProp name="Argument.value">{
 - "tosca_definitions_version": "tosca_simple_yaml_1_0_0",
 - "policy_types": [
 - {
 - "onap.policies.Monitoring": {
 - "derived_from": "tosca.policies.Root",
 - "version": "1.0.0",
 - "description": "a base policy type for all policies that governs monitoring provisioning"
 - }
 + "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
 + "policy_types": {
 + "onap.policies.Monitoring": {
 + "derived_from": "tosca.policies.Root",
 + "version": "1.0.0",
 + "description": "a base policy type for all policies that govern monitoring provisioning"
 },
 - {
 - "onap.policies.monitoring.cdap.tca.hi.lo.app": {
 - "derived_from": "onap.policies.Monitoring",
 - "version": "4.0.0",
 - "properties": {
 - "tca_policy": {
 - "type": "map",
 - "description": "TCA Policy JSON",
 - "entry_schema": {
 - "type": "onap.datatypes.monitoring.tca_policy"
 - }
 - }
 + "onap.policies.monitoring.cdap.tca.hi.lo.app": {
 + "derived_from": "onap.policies.Monitoring",
 + "version": "7.0.${__threadNum}",
 + "properties": {
 + "tca_policy": {
 + "type": "onap.datatypes.monitoring.tca_policy",
 + "description": "TCA Policy JSON",
 + "required": true
 }
 }
 }
 - ],
 - "data_types": [
 - {
 - "onap.datatypes.monitoring.metricsPerEventName": {
 - "derived_from": "tosca.datatypes.Root",
 - "properties": {
 - "controlLoopSchemaType": {
 - "type": "string",
 - "required": true,
 - "description": "Specifies Control Loop Schema Type for the event Name e.g. VNF, VM",
 - "constraints": [
 - {
 - "valid_values": [
 - "VM",
 - "VNF"
 - ]
 - }
 - ]
 - },
 - "eventName": {
 - "type": "string",
 - "required": true,
 - "description": "Event name to which thresholds need to be applied"
 - },
 - "policyName": {
 - "type": "string",
 - "required": true,
 - "description": "TCA Policy Scope Name"
 - },
 - "policyScope": {
 - "type": "string",
 - "required": true,
 - "description": "TCA Policy Scope"
 - },
 - "policyVersion": {
 - "type": "string",
 - "required": true,
 - "description": "TCA Policy Scope Version"
 - },
 - "thresholds": {
 - "type": "list",
 - "required": true,
 - "description": "Thresholds associated with eventName",
 - "entry_schema": {
 - "type": "onap.datatypes.monitoring.thresholds"
 + },
 + "data_types": {
 + "onap.datatypes.monitoring.metricsPerEventName": {
 + "derived_from": "tosca.datatypes.Root",
 + "properties": {
 + "controlLoopSchemaType": {
 + "type": "string",
 + "required": true,
 + "description": "Specifies Control Loop Schema Type for the event Name e.g. VNF, VM",
 + "constraints": [
 + {
 + "valid_values": [
 + "VM",
 + "VNF"
 + ]
 }
 + ]
 + },
 + "eventName": {
 + "type": "string",
 + "required": true,
 + "description": "Event name to which thresholds need to be applied"
 + },
 + "policyName": {
 + "type": "string",
 + "required": true,
 + "description": "TCA Policy Scope Name"
 + },
 + "policyScope": {
 + "type": "string",
 + "required": true,
 + "description": "TCA Policy Scope"
 + },
 + "policyVersion": {
 + "type": "string",
 + "required": true,
 + "description": "TCA Policy Scope Version"
 + },
 + "thresholds": {
 + "type": "list",
 + "required": true,
 + "description": "Thresholds associated with eventName",
 + "entry_schema": {
 + "type": "onap.datatypes.monitoring.thresholds"
 }
 }
 }
 },
 - {
 - "onap.datatypes.monitoring.tca_policy": {
 - "derived_from": "tosca.datatypes.Root",
 - "properties": {
 - "domain": {
 - "type": "string",
 - "required": true,
 - "description": "Domain name to which TCA needs to be applied",
 - "default": "measurementsForVfScaling",
 - "constraints": [
 - {
 - "equal": "measurementsForVfScaling"
 - }
 - ]
 - },
 - "metricsPerEventName": {
 - "type": "list",
 - "required": true,
 - "description": "Contains eventName and threshold details that need to be applied to given eventName",
 - "entry_schema": {
 - "type": "onap.datatypes.monitoring.metricsPerEventName"
 + "onap.datatypes.monitoring.tca_policy": {
 + "derived_from": "tosca.datatypes.Root",
 + "properties": {
 + "domain": {
 + "type": "string",
 + "required": true,
 + "description": "Domain name to which TCA needs to be applied",
 + "default": "measurementsForVfScaling",
 + "constraints": [
 + {
 + "equal": "measurementsForVfScaling"
 }
 + ]
 + },
 + "metricsPerEventName": {
 + "type": "list",
 + "required": true,
 + "description": "Contains eventName and threshold details that need to be applied to given eventName",
 + "entry_schema": {
 + "type": "onap.datatypes.monitoring.metricsPerEventName"
 }
 }
 }
 },
 - {
 - "onap.datatypes.monitoring.thresholds": {
 - "derived_from": "tosca.datatypes.Root",
 - "properties": {
 - "closedLoopControlName": {
 - "type": "string",
 - "required": true,
 - "description": "Closed Loop Control Name associated with the threshold"
 - },
 - "closedLoopEventStatus": {
 - "type": "string",
 - "required": true,
 - "description": "Closed Loop Event Status of the threshold",
 - "constraints": [
 - {
 - "valid_values": [
 - "ONSET",
 - "ABATED"
 - ]
 - }
 - ]
 - },
 - "direction": {
 - "type": "string",
 - "required": true,
 - "description": "Direction of the threshold",
 - "constraints": [
 - {
 - "valid_values": [
 - "LESS",
 - "LESS_OR_EQUAL",
 - "GREATER",
 - "GREATER_OR_EQUAL",
 - "EQUAL"
 - ]
 - }
 - ]
 - },
 - "fieldPath": {
 - "type": "string",
 - "required": true,
 - "description": "Json field Path as per CEF message which needs to be analyzed for TCA",
 - "constraints": [
 - {
 - "valid_values": [
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuIdle",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageInterrupt",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageNice",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSoftIrq",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSteal",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSystem",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuWait",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].percentUsage",
 - "$.event.measurementsForVfScalingFields.meanRequestLatency",
 - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryBuffered",
 - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryCached",
 - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryConfigured",
 - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryFree",
 - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryUsed",
 - "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value"
 - ]
 - }
 - ]
 - },
 - "severity": {
 - "type": "string",
 - "required": true,
 - "description": "Threshold Event Severity",
 - "constraints": [
 - {
 - "valid_values": [
 - "CRITICAL",
 - "MAJOR",
 - "MINOR",
 - "WARNING",
 - "NORMAL"
 - ]
 - }
 - ]
 - },
 - "thresholdValue": {
 - "type": "integer",
 - "required": true,
 - "description": "Threshold value for the field Path inside CEF message"
 - },
 - "version": {
 - "type": "string",
 - "required": true,
 - "description": "Version number associated with the threshold"
 - }
 - }
 - }
 - }
 - ]
 -}</stringProp> - <stringProp name="Argument.metadata">=</stringProp> - </elementProp> - </collectionProp> - </elementProp> - <stringProp name="HTTPSampler.domain">${API_HOST}</stringProp> - <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> - <stringProp name="HTTPSampler.protocol">https</stringProp> - <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes</stringProp> - <stringProp name="HTTPSampler.method">POST</stringProp> - <boolProp name="HTTPSampler.follow_redirects">true</boolProp> - <boolProp name="HTTPSampler.auto_redirects">false</boolProp> - <boolProp name="HTTPSampler.use_keepalive">true</boolProp> - <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> - <stringProp name="HTTPSampler.embedded_url_re"></stringProp> - <stringProp name="HTTPSampler.connect_timeout"></stringProp> - <stringProp name="HTTPSampler.response_timeout"></stringProp> - </HTTPSamplerProxy> - <hashTree> - <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true"> - <collectionProp name="Asserion.test_strings"> - <stringProp name="49586">200</stringProp> - </collectionProp> - <stringProp name="Assertion.custom_message"></stringProp> - <stringProp name="Assertion.test_field">Assertion.response_code</stringProp> - <boolProp name="Assertion.assume_success">false</boolProp> - <intProp name="Assertion.test_type">1</intProp> - </ResponseAssertion> - <hashTree/> - <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JSR223 Assertion" enabled="true"> - <stringProp name="scriptLanguage">groovy</stringProp> - <stringProp name="parameters"></stringProp> - <stringProp name="filename"></stringProp> - <stringProp name="cacheKey">true</stringProp> - <stringProp name="script">import groovy.json.JsonSlurper; - -def res = []; -if (prev.getResponseCode() == '200') { - def jsonSlurper = new JsonSlurper(); - res = jsonSlurper.parseText(prev.getResponseDataAsString()); - - assert res instanceof Map; - assert res.policy_types instanceof List; - assert res.policy_types.size == 2; - assert res.policy_types[0] instanceof Map; - assert res.policy_types[1] instanceof Map; -}</stringProp> - </JSR223Assertion> - <hashTree/> - </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Create TCA Policy Type V5" enabled="true"> - <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> - <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> - <collectionProp name="Arguments.arguments"> - <elementProp name="" elementType="HTTPArgument"> - <boolProp name="HTTPArgument.always_encode">false</boolProp> - <stringProp name="Argument.value">{
 - "tosca_definitions_version": "tosca_simple_yaml_1_0_0",
 - "policy_types": [
 - {
 - "onap.policies.Monitoring": {
 - "derived_from": "tosca.policies.Root",
 - "version": "1.0.0",
 - "description": "a base policy type for all policies that governs monitoring provisioning"
 - }
 - },
 - {
 - "onap.policies.monitoring.cdap.tca.hi.lo.app": {
 - "derived_from": "onap.policies.Monitoring",
 - "version": "5.0.0",
 - "properties": {
 - "tca_policy": {
 - "type": "map",
 - "description": "TCA Policy JSON",
 - "entry_schema": {
 - "type": "onap.datatypes.monitoring.tca_policy"
 + "onap.datatypes.monitoring.thresholds": {
 + "derived_from": "tosca.datatypes.Root",
 + "properties": {
 + "closedLoopControlName": {
 + "type": "string",
 + "required": true,
 + "description": "Closed Loop Control Name associated with the threshold"
 + },
 + "closedLoopEventStatus": {
 + "type": "string",
 + "required": true,
 + "description": "Closed Loop Event Status of the threshold",
 + "constraints": [
 + {
 + "valid_values": [
 + "ONSET",
 + "ABATED"
 + ]
 }
 - }
 - }
 - }
 - }
 - ],
 - "data_types": [
 - {
 - "onap.datatypes.monitoring.metricsPerEventName": {
 - "derived_from": "tosca.datatypes.Root",
 - "properties": {
 - "controlLoopSchemaType": {
 - "type": "string",
 - "required": true,
 - "description": "Specifies Control Loop Schema Type for the event Name e.g. VNF, VM",
 - "constraints": [
 - {
 - "valid_values": [
 - "VM",
 - "VNF"
 - ]
 - }
 - ]
 - },
 - "eventName": {
 - "type": "string",
 - "required": true,
 - "description": "Event name to which thresholds need to be applied"
 - },
 - "policyName": {
 - "type": "string",
 - "required": true,
 - "description": "TCA Policy Scope Name"
 - },
 - "policyScope": {
 - "type": "string",
 - "required": true,
 - "description": "TCA Policy Scope"
 - },
 - "policyVersion": {
 - "type": "string",
 - "required": true,
 - "description": "TCA Policy Scope Version"
 - },
 - "thresholds": {
 - "type": "list",
 - "required": true,
 - "description": "Thresholds associated with eventName",
 - "entry_schema": {
 - "type": "onap.datatypes.monitoring.thresholds"
 + ]
 + },
 + "direction": {
 + "type": "string",
 + "required": true,
 + "description": "Direction of the threshold",
 + "constraints": [
 + {
 + "valid_values": [
 + "LESS",
 + "LESS_OR_EQUAL",
 + "GREATER",
 + "GREATER_OR_EQUAL",
 + "EQUAL"
 + ]
 }
 - }
 - }
 - }
 - },
 - {
 - "onap.datatypes.monitoring.tca_policy": {
 - "derived_from": "tosca.datatypes.Root",
 - "properties": {
 - "domain": {
 - "type": "string",
 - "required": true,
 - "description": "Domain name to which TCA needs to be applied",
 - "default": "measurementsForVfScaling",
 - "constraints": [
 - {
 - "equal": "measurementsForVfScaling"
 - }
 - ]
 - },
 - "metricsPerEventName": {
 - "type": "list",
 - "required": true,
 - "description": "Contains eventName and threshold details that need to be applied to given eventName",
 - "entry_schema": {
 - "type": "onap.datatypes.monitoring.metricsPerEventName"
 + ]
 + },
 + "fieldPath": {
 + "type": "string",
 + "required": true,
 + "description": "Json field Path as per CEF message which needs to be analyzed for TCA",
 + "constraints": [
 + {
 + "valid_values": [
 + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta",
 + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsDelta",
 + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsDelta",
 + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsDelta",
 + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsDelta",
 + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsDelta",
 + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsDelta",
 + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsAccumulated",
 + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsAccumulated",
 + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsAccumulated",
 + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsAccumulated",
 + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated",
 + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsAccumulated",
 + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsAccumulated",
 + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsDelta",
 + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsDelta",
 + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsDelta",
 + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsDelta",
 + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsDelta",
 + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsDelta",
 + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsDelta",
 + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsAccumulated",
 + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsAccumulated",
 + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsAccumulated",
 + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsAccumulated",
 + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsAccumulated",
 + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsAccumulated",
 + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsAccumulated",
 + "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuIdle",
 + "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageInterrupt",
 + "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageNice",
 + "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSoftIrq",
 + "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSteal",
 + "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSystem",
 + "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuWait",
 + "$.event.measurementsForVfScalingFields.cpuUsageArray[*].percentUsage",
 + "$.event.measurementsForVfScalingFields.meanRequestLatency",
 + "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryBuffered",
 + "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryCached",
 + "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryConfigured",
 + "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryFree",
 + "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryUsed",
 + "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value"
 + ]
 }
 - }
 - }
 - }
 - },
 - {
 - "onap.datatypes.monitoring.thresholds": {
 - "derived_from": "tosca.datatypes.Root",
 - "properties": {
 - "closedLoopControlName": {
 - "type": "string",
 - "required": true,
 - "description": "Closed Loop Control Name associated with the threshold"
 - },
 - "closedLoopEventStatus": {
 - "type": "string",
 - "required": true,
 - "description": "Closed Loop Event Status of the threshold",
 - "constraints": [
 - {
 - "valid_values": [
 - "ONSET",
 - "ABATED"
 - ]
 - }
 - ]
 - },
 - "direction": {
 - "type": "string",
 - "required": true,
 - "description": "Direction of the threshold",
 - "constraints": [
 - {
 - "valid_values": [
 - "LESS",
 - "LESS_OR_EQUAL",
 - "GREATER",
 - "GREATER_OR_EQUAL",
 - "EQUAL"
 - ]
 - }
 - ]
 - },
 - "fieldPath": {
 - "type": "string",
 - "required": true,
 - "description": "Json field Path as per CEF message which needs to be analyzed for TCA",
 - "constraints": [
 - {
 - "valid_values": [
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuIdle",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageInterrupt",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageNice",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSoftIrq",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSteal",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSystem",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuWait",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].percentUsage",
 - "$.event.measurementsForVfScalingFields.meanRequestLatency",
 - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryBuffered",
 - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryCached",
 - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryConfigured",
 - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryFree",
 - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryUsed",
 - "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value"
 - ]
 - }
 - ]
 - },
 - "severity": {
 - "type": "string",
 - "required": true,
 - "description": "Threshold Event Severity",
 - "constraints": [
 - {
 - "valid_values": [
 - "CRITICAL",
 - "MAJOR",
 - "MINOR",
 - "WARNING",
 - "NORMAL"
 - ]
 - }
 - ]
 - },
 - "thresholdValue": {
 - "type": "integer",
 - "required": true,
 - "description": "Threshold value for the field Path inside CEF message"
 - },
 - "version": {
 - "type": "string",
 - "required": true,
 - "description": "Version number associated with the threshold"
 - }
 + ]
 + },
 + "severity": {
 + "type": "string",
 + "required": true,
 + "description": "Threshold Event Severity",
 + "constraints": [
 + {
 + "valid_values": [
 + "CRITICAL",
 + "MAJOR",
 + "MINOR",
 + "WARNING",
 + "NORMAL"
 + ]
 + }
 + ]
 + },
 + "thresholdValue": {
 + "type": "integer",
 + "required": true,
 + "description": "Threshold value for the field Path inside CEF message"
 + },
 + "version": {
 + "type": "string",
 + "required": true,
 + "description": "Version number associated with the threshold"
 }
 }
 }
 - ]
 + }
 }</stringProp> <stringProp name="Argument.metadata">=</stringProp> </elementProp> @@ -1613,243 +803,71 @@ if (prev.getResponseCode() == '200') { res = jsonSlurper.parseText(prev.getResponseDataAsString()); assert res instanceof Map; - assert res.policy_types instanceof List; - assert res.policy_types.size == 2; - assert res.policy_types[0] instanceof Map; - assert res.policy_types[1] instanceof Map; + assert res.policy_types instanceof Map; + assert res.policy_types.size() == 2; + assert res.policy_types.values()[0] instanceof Map; + assert res.policy_types.values()[1] instanceof Map; }</stringProp> </JSR223Assertion> <hashTree/> </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Create TCA Policy Type V6" enabled="true"> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Create Policy Type Optimization" enabled="true"> <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> <collectionProp name="Arguments.arguments"> <elementProp name="" elementType="HTTPArgument"> <boolProp name="HTTPArgument.always_encode">false</boolProp> <stringProp name="Argument.value">{
 - "tosca_definitions_version": "tosca_simple_yaml_1_0_0",
 - "policy_types": [
 - {
 - "onap.policies.Monitoring": {
 - "derived_from": "tosca.policies.Root",
 - "version": "1.0.0",
 - "description": "a base policy type for all policies that governs monitoring provisioning"
 - }
 - },
 - {
 - "onap.policies.monitoring.cdap.tca.hi.lo.app": {
 - "derived_from": "onap.policies.Monitoring",
 - "version": "6.0.0",
 - "properties": {
 - "tca_policy": {
 - "type": "map",
 - "description": "TCA Policy JSON",
 - "entry_schema": {
 - "type": "onap.datatypes.monitoring.tca_policy"
 - }
 - }
 - }
 - }
 - }
 - ],
 - "data_types": [
 - {
 - "onap.datatypes.monitoring.metricsPerEventName": {
 - "derived_from": "tosca.datatypes.Root",
 - "properties": {
 - "controlLoopSchemaType": {
 - "type": "string",
 - "required": true,
 - "description": "Specifies Control Loop Schema Type for the event Name e.g. VNF, VM",
 - "constraints": [
 - {
 - "valid_values": [
 - "VM",
 - "VNF"
 - ]
 - }
 - ]
 - },
 - "eventName": {
 - "type": "string",
 - "required": true,
 - "description": "Event name to which thresholds need to be applied"
 - },
 - "policyName": {
 - "type": "string",
 - "required": true,
 - "description": "TCA Policy Scope Name"
 - },
 - "policyScope": {
 - "type": "string",
 - "required": true,
 - "description": "TCA Policy Scope"
 - },
 - "policyVersion": {
 - "type": "string",
 - "required": true,
 - "description": "TCA Policy Scope Version"
 - },
 - "thresholds": {
 - "type": "list",
 - "required": true,
 - "description": "Thresholds associated with eventName",
 - "entry_schema": {
 - "type": "onap.datatypes.monitoring.thresholds"
 - }
 - }
 - }
 - }
 - },
 - {
 - "onap.datatypes.monitoring.tca_policy": {
 - "derived_from": "tosca.datatypes.Root",
 - "properties": {
 - "domain": {
 - "type": "string",
 - "required": true,
 - "description": "Domain name to which TCA needs to be applied",
 - "default": "measurementsForVfScaling",
 - "constraints": [
 - {
 - "equal": "measurementsForVfScaling"
 - }
 + "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
 + "policy_types": {
 + "onap.policies.optimization.resource.AffinityPolicy": {
 + "derived_from": "onap.policies.optimization.Resource",
 + "version": "6.0.${__threadNum}",
 + "properties": {
 + "applicableResources": {
 + "type": "list",
 + "required": true,
 + "entry_schema": {
 + "type": "string",
 + "constraints": [
 + {
 + "valid_values": [
 + "any",
 + "all"
 ]
 - },
 - "metricsPerEventName": {
 - "type": "list",
 - "required": true,
 - "description": "Contains eventName and threshold details that need to be applied to given eventName",
 - "entry_schema": {
 - "type": "onap.datatypes.monitoring.metricsPerEventName"
 - }
 - }
 - }
 + }
 + ]
 + }
 + },
 + "affinityProperties": {
 + "type": "policy.data.affinityProperties_properties",
 + "required": true
 }
 - },
 - {
 - "onap.datatypes.monitoring.thresholds": {
 - "derived_from": "tosca.datatypes.Root",
 - "properties": {
 - "closedLoopControlName": {
 - "type": "string",
 - "required": true,
 - "description": "Closed Loop Control Name associated with the threshold"
 - },
 - "closedLoopEventStatus": {
 - "type": "string",
 - "required": true,
 - "description": "Closed Loop Event Status of the threshold",
 - "constraints": [
 - {
 - "valid_values": [
 - "ONSET",
 - "ABATED"
 - ]
 - }
 - ]
 - },
 - "direction": {
 - "type": "string",
 - "required": true,
 - "description": "Direction of the threshold",
 - "constraints": [
 - {
 - "valid_values": [
 - "LESS",
 - "LESS_OR_EQUAL",
 - "GREATER",
 - "GREATER_OR_EQUAL",
 - "EQUAL"
 - ]
 - }
 - ]
 - },
 - "fieldPath": {
 - "type": "string",
 - "required": true,
 - "description": "Json field Path as per CEF message which needs to be analyzed for TCA",
 - "constraints": [
 - {
 - "valid_values": [
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuIdle",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageInterrupt",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageNice",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSoftIrq",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSteal",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSystem",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuWait",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].percentUsage",
 - "$.event.measurementsForVfScalingFields.meanRequestLatency",
 - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryBuffered",
 - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryCached",
 - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryConfigured",
 - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryFree",
 - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryUsed",
 - "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value"
 - ]
 - }
 - ]
 - },
 - "severity": {
 - "type": "string",
 - "required": true,
 - "description": "Threshold Event Severity",
 - "constraints": [
 - {
 - "valid_values": [
 - "CRITICAL",
 - "MAJOR",
 - "MINOR",
 - "WARNING",
 - "NORMAL"
 - ]
 - }
 - ]
 - },
 - "thresholdValue": {
 - "type": "integer",
 - "required": true,
 - "description": "Threshold value for the field Path inside CEF message"
 - },
 - "version": {
 - "type": "string",
 - "required": true,
 - "description": "Version number associated with the threshold"
 - }
 - }
 + }
 + }
 + },
 + "data_types": {
 + "policy.data.affinityProperties_properties": {
 + "derived_from": "tosca.nodes.Root",
 + "properties": {
 + "qualifier": {
 + "type": "string",
 + "constraints": [
 + {
 + "valid_values": [
 + "same",
 + "different"
 + ]
 + }
 + ]
 + },
 + "category": {
 + "type": "string",
 + "required": true
 }
 - }
 - ]
 + }
 + }
 + }
 }</stringProp> <stringProp name="Argument.metadata">=</stringProp> </elementProp> @@ -1893,243 +911,40 @@ if (prev.getResponseCode() == '200') { res = jsonSlurper.parseText(prev.getResponseDataAsString()); assert res instanceof Map; - assert res.policy_types instanceof List; - assert res.policy_types.size == 2; - assert res.policy_types[0] instanceof Map; - assert res.policy_types[1] instanceof Map; + assert res.policy_types instanceof Map; + assert res.policy_types.size() == 1; + assert res.policy_types.values()[0] instanceof Map; + // assert res.policy_types.values()[1] instanceof Map; }</stringProp> </JSR223Assertion> <hashTree/> </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Create TCA Policy Type V7" enabled="true"> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Create Policy Type Guard" enabled="true"> <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> <collectionProp name="Arguments.arguments"> <elementProp name="" elementType="HTTPArgument"> <boolProp name="HTTPArgument.always_encode">false</boolProp> <stringProp name="Argument.value">{
 - "tosca_definitions_version": "tosca_simple_yaml_1_0_0",
 - "policy_types": [
 - {
 - "onap.policies.Monitoring": {
 - "derived_from": "tosca.policies.Root",
 - "version": "1.0.0",
 - "description": "a base policy type for all policies that governs monitoring provisioning"
 - }
 - },
 - {
 - "onap.policies.monitoring.cdap.tca.hi.lo.app": {
 - "derived_from": "onap.policies.Monitoring",
 - "version": "7.0.0",
 - "properties": {
 - "tca_policy": {
 - "type": "map",
 - "description": "TCA Policy JSON",
 - "entry_schema": {
 - "type": "onap.datatypes.monitoring.tca_policy"
 - }
 - }
 - }
 - }
 - }
 - ],
 - "data_types": [
 - {
 - "onap.datatypes.monitoring.metricsPerEventName": {
 - "derived_from": "tosca.datatypes.Root",
 - "properties": {
 - "controlLoopSchemaType": {
 - "type": "string",
 - "required": true,
 - "description": "Specifies Control Loop Schema Type for the event Name e.g. VNF, VM",
 - "constraints": [
 - {
 - "valid_values": [
 - "VM",
 - "VNF"
 - ]
 - }
 - ]
 - },
 - "eventName": {
 - "type": "string",
 - "required": true,
 - "description": "Event name to which thresholds need to be applied"
 - },
 - "policyName": {
 - "type": "string",
 - "required": true,
 - "description": "TCA Policy Scope Name"
 - },
 - "policyScope": {
 - "type": "string",
 - "required": true,
 - "description": "TCA Policy Scope"
 - },
 - "policyVersion": {
 - "type": "string",
 - "required": true,
 - "description": "TCA Policy Scope Version"
 - },
 - "thresholds": {
 - "type": "list",
 - "required": true,
 - "description": "Thresholds associated with eventName",
 - "entry_schema": {
 - "type": "onap.datatypes.monitoring.thresholds"
 - }
 - }
 - }
 + "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
 + "policy_types": {
 + "onap.policies.controlloop.guard.common.Blacklist": {
 + "derived_from": "onap.policies.controlloop.guard.Common",
 + "type_version": "1.0.0",
 + "version": "6.0.${__threadNum}",
 + "description": "Supports blacklist of entity id's from performing control loop actions on.",
 + "properties": {
 + "blacklist": {
 + "type": "list",
 + "description": "List of entity id's not allowed to have control loop operations on.",
 + "required": true,
 + "entry_schema": {
 + "type": "string"
 + }
 }
 - },
 - {
 - "onap.datatypes.monitoring.tca_policy": {
 - "derived_from": "tosca.datatypes.Root",
 - "properties": {
 - "domain": {
 - "type": "string",
 - "required": true,
 - "description": "Domain name to which TCA needs to be applied",
 - "default": "measurementsForVfScaling",
 - "constraints": [
 - {
 - "equal": "measurementsForVfScaling"
 - }
 - ]
 - },
 - "metricsPerEventName": {
 - "type": "list",
 - "required": true,
 - "description": "Contains eventName and threshold details that need to be applied to given eventName",
 - "entry_schema": {
 - "type": "onap.datatypes.monitoring.metricsPerEventName"
 - }
 - }
 - }
 - }
 - },
 - {
 - "onap.datatypes.monitoring.thresholds": {
 - "derived_from": "tosca.datatypes.Root",
 - "properties": {
 - "closedLoopControlName": {
 - "type": "string",
 - "required": true,
 - "description": "Closed Loop Control Name associated with the threshold"
 - },
 - "closedLoopEventStatus": {
 - "type": "string",
 - "required": true,
 - "description": "Closed Loop Event Status of the threshold",
 - "constraints": [
 - {
 - "valid_values": [
 - "ONSET",
 - "ABATED"
 - ]
 - }
 - ]
 - },
 - "direction": {
 - "type": "string",
 - "required": true,
 - "description": "Direction of the threshold",
 - "constraints": [
 - {
 - "valid_values": [
 - "LESS",
 - "LESS_OR_EQUAL",
 - "GREATER",
 - "GREATER_OR_EQUAL",
 - "EQUAL"
 - ]
 - }
 - ]
 - },
 - "fieldPath": {
 - "type": "string",
 - "required": true,
 - "description": "Json field Path as per CEF message which needs to be analyzed for TCA",
 - "constraints": [
 - {
 - "valid_values": [
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuIdle",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageInterrupt",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageNice",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSoftIrq",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSteal",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSystem",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuWait",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].percentUsage",
 - "$.event.measurementsForVfScalingFields.meanRequestLatency",
 - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryBuffered",
 - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryCached",
 - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryConfigured",
 - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryFree",
 - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryUsed",
 - "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value"
 - ]
 - }
 - ]
 - },
 - "severity": {
 - "type": "string",
 - "required": true,
 - "description": "Threshold Event Severity",
 - "constraints": [
 - {
 - "valid_values": [
 - "CRITICAL",
 - "MAJOR",
 - "MINOR",
 - "WARNING",
 - "NORMAL"
 - ]
 - }
 - ]
 - },
 - "thresholdValue": {
 - "type": "integer",
 - "required": true,
 - "description": "Threshold value for the field Path inside CEF message"
 - },
 - "version": {
 - "type": "string",
 - "required": true,
 - "description": "Version number associated with the threshold"
 - }
 - }
 - }
 - }
 - ]
 + }
 + }
 + }
 }</stringProp> <stringProp name="Argument.metadata">=</stringProp> </elementProp> @@ -2173,523 +988,283 @@ if (prev.getResponseCode() == '200') { res = jsonSlurper.parseText(prev.getResponseDataAsString()); assert res instanceof Map; - assert res.policy_types instanceof List; - assert res.policy_types.size == 2; - assert res.policy_types[0] instanceof Map; - assert res.policy_types[1] instanceof Map; + assert res.policy_types instanceof Map; + assert res.policy_types.size() == 1; + assert res.policy_types.values()[0] instanceof Map; }</stringProp> </JSR223Assertion> <hashTree/> </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Create TCA Policy Type V8" enabled="true"> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Create Policy Type Native APEX" enabled="true"> <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> <collectionProp name="Arguments.arguments"> <elementProp name="" elementType="HTTPArgument"> <boolProp name="HTTPArgument.always_encode">false</boolProp> <stringProp name="Argument.value">{
 - "tosca_definitions_version": "tosca_simple_yaml_1_0_0",
 - "policy_types": [
 - {
 - "onap.policies.Monitoring": {
 - "derived_from": "tosca.policies.Root",
 - "version": "1.0.0",
 - "description": "a base policy type for all policies that governs monitoring provisioning"
 - }
 - },
 - {
 - "onap.policies.monitoring.cdap.tca.hi.lo.app": {
 - "derived_from": "onap.policies.Monitoring",
 - "version": "8.0.0",
 - "properties": {
 - "tca_policy": {
 - "type": "map",
 - "description": "TCA Policy JSON",
 - "entry_schema": {
 - "type": "onap.datatypes.monitoring.tca_policy"
 - }
 - }
 - }
 + "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
 + "policy_types": {
 + "onap.policies.Native": {
 + "derived_from": "tosca.policies.Root",
 + "description": "a base policy type for all native PDP policies",
 + "version": "1.0.0"
 + },
 + "onap.policies.native.Apex": {
 + "derived_from": "onap.policies.Native",
 + "description": "a policy type for native apex policies",
 + "version": "6.0.${__threadNum}",
 + "properties": {
 + "engine_service": {
 + "type": "onap.datatypes.native.apex.EngineService",
 + "description": "APEX Engine Service Parameters"
 + },
 + "inputs": {
 + "type": "map",
 + "description": "Inputs for handling events coming into the APEX engine",
 + "entry_schema": {
 + "type": "onap.datatypes.native.apex.EventHandler"
 + }
 + },
 + "outputs": {
 + "type": "map",
 + "description": "Outputs for handling events going out of the APEX engine",
 + "entry_schema": {
 + "type": "onap.datatypes.native.apex.EventHandler"
 + }
 + },
 + "environment": {
 + "type": "list",
 + "description": "Envioronmental parameters for the APEX engine",
 + "entry_schema": {
 + "type": "onap.datatypes.native.apex.Environment"
 + }
 }
 - }
 - ],
 - "data_types": [
 - {
 - "onap.datatypes.monitoring.metricsPerEventName": {
 - "derived_from": "tosca.datatypes.Root",
 - "properties": {
 - "controlLoopSchemaType": {
 - "type": "string",
 - "required": true,
 - "description": "Specifies Control Loop Schema Type for the event Name e.g. VNF, VM",
 - "constraints": [
 - {
 - "valid_values": [
 - "VM",
 - "VNF"
 - ]
 - }
 - ]
 - },
 - "eventName": {
 - "type": "string",
 - "required": true,
 - "description": "Event name to which thresholds need to be applied"
 - },
 - "policyName": {
 - "type": "string",
 - "required": true,
 - "description": "TCA Policy Scope Name"
 - },
 - "policyScope": {
 - "type": "string",
 - "required": true,
 - "description": "TCA Policy Scope"
 - },
 - "policyVersion": {
 - "type": "string",
 - "required": true,
 - "description": "TCA Policy Scope Version"
 - },
 - "thresholds": {
 - "type": "list",
 - "required": true,
 - "description": "Thresholds associated with eventName",
 - "entry_schema": {
 - "type": "onap.datatypes.monitoring.thresholds"
 - }
 - }
 - }
 + }
 + }
 + },
 + "data_types": {
 + "onap.datatypes.native.apex.EngineService": {
 + "derived_from": "tosca.datatypes.Root",
 + "properties": {
 + "name": {
 + "type": "string",
 + "description": "Specifies the engine name",
 + "required": false,
 + "default": "ApexEngineService"
 + },
 + "version": {
 + "type": "string",
 + "description": "Specifies the engine version in double dotted format",
 + "required": false,
 + "default": "1.0.0"
 + },
 + "id": {
 + "type": "integer",
 + "description": "Specifies the engine id",
 + "required": true
 + },
 + "instance_count": {
 + "type": "integer",
 + "description": "Specifies the number of engine threads that should be run",
 + "required": true
 + },
 + "deployment_port": {
 + "type": "integer",
 + "description": "Specifies the port to connect to for engine administration",
 + "required": false,
 + "default": 1
 + },
 + "policy_model_file_name": {
 + "type": "string",
 + "description": "The name of the file from which to read the APEX policy model",
 + "required": false
 + },
 + "policy_type_impl": {
 + "type": "string",
 + "description": "The policy type implementation from which to read the APEX policy model",
 + "required": false
 + },
 + "periodic_event_period": {
 + "type": "string",
 + "description": "The time interval in milliseconds for the periodic scanning event, 0 means don't scan",
 + "required": false
 + },
 + "engine": {
 + "type": "onap.datatypes.native.apex.engineservice.Engine",
 + "description": "The parameters for all engines in the APEX engine service",
 + "required": true
 }
 - },
 - {
 - "onap.datatypes.monitoring.tca_policy": {
 - "derived_from": "tosca.datatypes.Root",
 - "properties": {
 - "domain": {
 - "type": "string",
 - "required": true,
 - "description": "Domain name to which TCA needs to be applied",
 - "default": "measurementsForVfScaling",
 - "constraints": [
 - {
 - "equal": "measurementsForVfScaling"
 - }
 - ]
 - },
 - "metricsPerEventName": {
 - "type": "list",
 - "required": true,
 - "description": "Contains eventName and threshold details that need to be applied to given eventName",
 - "entry_schema": {
 - "type": "onap.datatypes.monitoring.metricsPerEventName"
 - }
 - }
 - }
 + }
 + },
 + "onap.datatypes.native.apex.EventHandler": {
 + "derived_from": "tosca.datatypes.Root",
 + "properties": {
 + "name": {
 + "type": "string",
 + "description": "Specifies the event handler name, if not specified this is set to the key name",
 + "required": false
 + },
 + "carrier_technology": {
 + "type": "onap.datatypes.native.apex.CarrierTechnology",
 + "description": "Specifies the carrier technology of the event handler (such as REST/Web Socket/Kafka)",
 + "required": true
 + },
 + "event_protocol": {
 + "type": "onap.datatypes.native.apex.EventProtocol",
 + "description": "Specifies the event protocol of events for the event handler (such as Yaml/JSON/XML/POJO)",
 + "required": true
 + },
 + "event_name": {
 + "type": "string",
 + "description": "Specifies the event name for events on this event handler, if not specified, the event name is read from or written to the event being received or sent",
 + "required": false
 + },
 + "event_name_filter": {
 + "type": "string",
 + "description": "Specifies a filter as a regular expression, events that do not match the filter are dropped, the default is to let all events through",
 + "required": false
 + },
 + "synchronous_mode": {
 + "type": "boolean",
 + "description": "Specifies the event handler is syncronous (receive event and send response)",
 + "required": false,
 + "default": false
 + },
 + "synchronous_peer": {
 + "type": "string",
 + "description": "The peer event handler (output for input or input for output) of this event handler in synchronous mode, this parameter is mandatory if the event handler is in synchronous mode",
 + "required": false
 + },
 + "synchronous_timeout": {
 + "type": "integer",
 + "description": "The timeout in milliseconds for responses to be issued by APEX torequests, this parameter is mandatory if the event handler is in synchronous mode",
 + "required": false
 + },
 + "requestor_mode": {
 + "type": "boolean",
 + "description": "Specifies the event handler is in requestor mode (send event and wait for response mode)",
 + "required": false,
 + "default": false
 + },
 + "requestor_peer": {
 + "type": "string",
 + "description": "The peer event handler (output for input or input for output) of this event handler in requestor mode, this parameter is mandatory if the event handler is in requestor mode",
 + "required": false
 + },
 + "requestor_timeout": {
 + "type": "integer",
 + "description": "The timeout in milliseconds for wait for responses to requests, this parameter is mandatory if the event handler is in requestor mode",
 + "required": false
 }
 - },
 - {
 - "onap.datatypes.monitoring.thresholds": {
 - "derived_from": "tosca.datatypes.Root",
 - "properties": {
 - "closedLoopControlName": {
 - "type": "string",
 - "required": true,
 - "description": "Closed Loop Control Name associated with the threshold"
 - },
 - "closedLoopEventStatus": {
 - "type": "string",
 - "required": true,
 - "description": "Closed Loop Event Status of the threshold",
 - "constraints": [
 - {
 - "valid_values": [
 - "ONSET",
 - "ABATED"
 - ]
 - }
 - ]
 - },
 - "direction": {
 - "type": "string",
 - "required": true,
 - "description": "Direction of the threshold",
 - "constraints": [
 - {
 - "valid_values": [
 - "LESS",
 - "LESS_OR_EQUAL",
 - "GREATER",
 - "GREATER_OR_EQUAL",
 - "EQUAL"
 - ]
 - }
 - ]
 - },
 - "fieldPath": {
 - "type": "string",
 - "required": true,
 - "description": "Json field Path as per CEF message which needs to be analyzed for TCA",
 - "constraints": [
 - {
 - "valid_values": [
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuIdle",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageInterrupt",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageNice",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSoftIrq",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSteal",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSystem",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuWait",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].percentUsage",
 - "$.event.measurementsForVfScalingFields.meanRequestLatency",
 - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryBuffered",
 - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryCached",
 - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryConfigured",
 - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryFree",
 - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryUsed",
 - "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value"
 - ]
 - }
 - ]
 - },
 - "severity": {
 - "type": "string",
 - "required": true,
 - "description": "Threshold Event Severity",
 - "constraints": [
 - {
 - "valid_values": [
 - "CRITICAL",
 - "MAJOR",
 - "MINOR",
 - "WARNING",
 - "NORMAL"
 - ]
 - }
 - ]
 - },
 - "thresholdValue": {
 - "type": "integer",
 - "required": true,
 - "description": "Threshold value for the field Path inside CEF message"
 - },
 - "version": {
 - "type": "string",
 - "required": true,
 - "description": "Version number associated with the threshold"
 - }
 - }
 + }
 + },
 + "onap.datatypes.native.apex.CarrierTechnology": {
 + "derived_from": "tosca.datatypes.Root",
 + "properties": {
 + "label": {
 + "type": "string",
 + "description": "The label (name) of the carrier technology (such as REST, Kafka, WebSocket)",
 + "required": true
 + },
 + "plugin_parameter_class_name": {
 + "type": "string",
 + "description": "The class name of the class that overrides default handling of event input or output for this carrier technology, defaults to the supplied input or output class",
 + "required": false
 }
 - }
 - ]
 -}</stringProp> - <stringProp name="Argument.metadata">=</stringProp> - </elementProp> - </collectionProp> - </elementProp> - <stringProp name="HTTPSampler.domain">${API_HOST}</stringProp> - <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> - <stringProp name="HTTPSampler.protocol">https</stringProp> - <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes</stringProp> - <stringProp name="HTTPSampler.method">POST</stringProp> - <boolProp name="HTTPSampler.follow_redirects">true</boolProp> - <boolProp name="HTTPSampler.auto_redirects">false</boolProp> - <boolProp name="HTTPSampler.use_keepalive">true</boolProp> - <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> - <stringProp name="HTTPSampler.embedded_url_re"></stringProp> - <stringProp name="HTTPSampler.connect_timeout"></stringProp> - <stringProp name="HTTPSampler.response_timeout"></stringProp> - </HTTPSamplerProxy> - <hashTree> - <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true"> - <collectionProp name="Asserion.test_strings"> - <stringProp name="49586">200</stringProp> - </collectionProp> - <stringProp name="Assertion.custom_message"></stringProp> - <stringProp name="Assertion.test_field">Assertion.response_code</stringProp> - <boolProp name="Assertion.assume_success">false</boolProp> - <intProp name="Assertion.test_type">1</intProp> - </ResponseAssertion> - <hashTree/> - <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JSR223 Assertion" enabled="true"> - <stringProp name="scriptLanguage">groovy</stringProp> - <stringProp name="parameters"></stringProp> - <stringProp name="filename"></stringProp> - <stringProp name="cacheKey">true</stringProp> - <stringProp name="script">import groovy.json.JsonSlurper; - -def res = []; -if (prev.getResponseCode() == '200') { - def jsonSlurper = new JsonSlurper(); - res = jsonSlurper.parseText(prev.getResponseDataAsString()); - - assert res instanceof Map; - assert res.policy_types instanceof List; - assert res.policy_types.size == 2; - assert res.policy_types[0] instanceof Map; - assert res.policy_types[1] instanceof Map; -}</stringProp> - </JSR223Assertion> - <hashTree/> - </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Create TCA Policy Type V9" enabled="true"> - <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> - <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> - <collectionProp name="Arguments.arguments"> - <elementProp name="" elementType="HTTPArgument"> - <boolProp name="HTTPArgument.always_encode">false</boolProp> - <stringProp name="Argument.value">{
 - "tosca_definitions_version": "tosca_simple_yaml_1_0_0",
 - "policy_types": [
 - {
 - "onap.policies.Monitoring": {
 - "derived_from": "tosca.policies.Root",
 - "version": "1.0.0",
 - "description": "a base policy type for all policies that governs monitoring provisioning"
 + }
 + },
 + "onap.datatypes.native.apex.EventProtocol": {
 + "derived_from": "tosca.datatypes.Root",
 + "properties": {
 + "label": {
 + "type": "string",
 + "description": "The label (name) of the event protocol (such as Yaml, JSON, XML, or POJO)",
 + "required": true
 + },
 + "event_protocol_plugin_class": {
 + "type": "string",
 + "description": "The class name of the class that overrides default handling of the event protocol for this carrier technology, defaults to the supplied event protocol class",
 + "required": false
 }
 - },
 - {
 - "onap.policies.monitoring.cdap.tca.hi.lo.app": {
 - "derived_from": "onap.policies.Monitoring",
 - "version": "9.0.0",
 - "properties": {
 - "tca_policy": {
 - "type": "map",
 - "description": "TCA Policy JSON",
 - "entry_schema": {
 - "type": "onap.datatypes.monitoring.tca_policy"
 - }
 - }
 - }
 + }
 + },
 + "onap.datatypes.native.apex.Environment": {
 + "derived_from": "tosca.datatypes.Root",
 + "properties": {
 + "name": {
 + "type": "string",
 + "description": "The name of the environment variable",
 + "required": true
 + },
 + "value": {
 + "type": "string",
 + "description": "The value of the environment variable",
 + "required": true
 }
 - }
 - ],
 - "data_types": [
 - {
 - "onap.datatypes.monitoring.metricsPerEventName": {
 - "derived_from": "tosca.datatypes.Root",
 - "properties": {
 - "controlLoopSchemaType": {
 - "type": "string",
 - "required": true,
 - "description": "Specifies Control Loop Schema Type for the event Name e.g. VNF, VM",
 - "constraints": [
 - {
 - "valid_values": [
 - "VM",
 - "VNF"
 - ]
 - }
 - ]
 - },
 - "eventName": {
 - "type": "string",
 - "required": true,
 - "description": "Event name to which thresholds need to be applied"
 - },
 - "policyName": {
 - "type": "string",
 - "required": true,
 - "description": "TCA Policy Scope Name"
 - },
 - "policyScope": {
 - "type": "string",
 - "required": true,
 - "description": "TCA Policy Scope"
 - },
 - "policyVersion": {
 - "type": "string",
 - "required": true,
 - "description": "TCA Policy Scope Version"
 - },
 - "thresholds": {
 - "type": "list",
 - "required": true,
 - "description": "Thresholds associated with eventName",
 - "entry_schema": {
 - "type": "onap.datatypes.monitoring.thresholds"
 - }
 - }
 - }
 + }
 + },
 + "onap.datatypes.native.apex.engineservice.Engine": {
 + "derived_from": "tosca.datatypes.Root",
 + "properties": {
 + "context": {
 + "type": "onap.datatypes.native.apex.engineservice.engine.Context",
 + "description": "The properties for handling context in APEX engines, defaults to using Java maps for context",
 + "required": false
 + },
 + "executors": {
 + "type": "map",
 + "description": "The plugins for policy executors used in engines such as javascript, MVEL, Jython",
 + "required": true,
 + "entry_schema": {
 + "description": "The plugin class path for this policy executor",
 + "type": "string"
 + }
 }
 - },
 - {
 - "onap.datatypes.monitoring.tca_policy": {
 - "derived_from": "tosca.datatypes.Root",
 - "properties": {
 - "domain": {
 - "type": "string",
 - "required": true,
 - "description": "Domain name to which TCA needs to be applied",
 - "default": "measurementsForVfScaling",
 - "constraints": [
 - {
 - "equal": "measurementsForVfScaling"
 - }
 - ]
 - },
 - "metricsPerEventName": {
 - "type": "list",
 - "required": true,
 - "description": "Contains eventName and threshold details that need to be applied to given eventName",
 - "entry_schema": {
 - "type": "onap.datatypes.monitoring.metricsPerEventName"
 - }
 - }
 - }
 + }
 + },
 + "onap.datatypes.native.apex.engineservice.engine.Context": {
 + "derived_from": "tosca.datatypes.Root",
 + "properties": {
 + "distributor": {
 + "type": "onap.datatypes.native.apex.Plugin",
 + "description": "The plugin to be used for distributing context between APEX PDPs at runtime",
 + "required": false
 + },
 + "schemas": {
 + "type": "map",
 + "description": "The plugins for context schemas available in APEX PDPs such as Java and Avro",
 + "required": false,
 + "entry_schema": {
 + "type": "onap.datatypes.native.apex.Plugin"
 + }
 + },
 + "locking": {
 + "type": "onap.datatypes.native.apex.Plugin",
 + "description": "The plugin to be used for locking context in and between APEX PDPs at runtime",
 + "required": false
 + },
 + "persistence": {
 + "type": "onap.datatypes.native.apex.Plugin",
 + "description": "The plugin to be used for persisting context for APEX PDPs at runtime",
 + "required": false
 }
 - },
 - {
 - "onap.datatypes.monitoring.thresholds": {
 - "derived_from": "tosca.datatypes.Root",
 - "properties": {
 - "closedLoopControlName": {
 - "type": "string",
 - "required": true,
 - "description": "Closed Loop Control Name associated with the threshold"
 - },
 - "closedLoopEventStatus": {
 - "type": "string",
 - "required": true,
 - "description": "Closed Loop Event Status of the threshold",
 - "constraints": [
 - {
 - "valid_values": [
 - "ONSET",
 - "ABATED"
 - ]
 - }
 - ]
 - },
 - "direction": {
 - "type": "string",
 - "required": true,
 - "description": "Direction of the threshold",
 - "constraints": [
 - {
 - "valid_values": [
 - "LESS",
 - "LESS_OR_EQUAL",
 - "GREATER",
 - "GREATER_OR_EQUAL",
 - "EQUAL"
 - ]
 - }
 - ]
 - },
 - "fieldPath": {
 - "type": "string",
 - "required": true,
 - "description": "Json field Path as per CEF message which needs to be analyzed for TCA",
 - "constraints": [
 - {
 - "valid_values": [
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuIdle",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageInterrupt",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageNice",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSoftIrq",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSteal",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSystem",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuWait",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].percentUsage",
 - "$.event.measurementsForVfScalingFields.meanRequestLatency",
 - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryBuffered",
 - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryCached",
 - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryConfigured",
 - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryFree",
 - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryUsed",
 - "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value"
 - ]
 - }
 - ]
 - },
 - "severity": {
 - "type": "string",
 - "required": true,
 - "description": "Threshold Event Severity",
 - "constraints": [
 - {
 - "valid_values": [
 - "CRITICAL",
 - "MAJOR",
 - "MINOR",
 - "WARNING",
 - "NORMAL"
 - ]
 - }
 - ]
 - },
 - "thresholdValue": {
 - "type": "integer",
 - "required": true,
 - "description": "Threshold value for the field Path inside CEF message"
 - },
 - "version": {
 - "type": "string",
 - "required": true,
 - "description": "Version number associated with the threshold"
 - }
 - }
 + }
 + },
 + "onap.datatypes.native.apex.Plugin": {
 + "derived_from": "tosca.datatypes.Root",
 + "properties": {
 + "name": {
 + "type": "string",
 + "description": "The name of the executor such as Javascript, Jython or MVEL",
 + "required": true
 + },
 + "plugin_class_name": {
 + "type": "string",
 + "description": "The class path of the plugin class for this executor"
 }
 - }
 - ]
 + }
 + }
 + }
 }</stringProp> <stringProp name="Argument.metadata">=</stringProp> </elementProp> @@ -2733,243 +1308,172 @@ if (prev.getResponseCode() == '200') { res = jsonSlurper.parseText(prev.getResponseDataAsString()); assert res instanceof Map; - assert res.policy_types instanceof List; - assert res.policy_types.size == 2; - assert res.policy_types[0] instanceof Map; - assert res.policy_types[1] instanceof Map; + assert res.policy_types instanceof Map; + assert res.policy_types.size() == 2; + assert res.policy_types.values()[0] instanceof Map; + assert res.policy_types.values()[1] instanceof Map; }</stringProp> </JSR223Assertion> <hashTree/> </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Create TCA Policy Type V10" enabled="true"> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Create Policy Type Native Drools" enabled="true"> <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> <collectionProp name="Arguments.arguments"> <elementProp name="" elementType="HTTPArgument"> <boolProp name="HTTPArgument.always_encode">false</boolProp> <stringProp name="Argument.value">{
 - "tosca_definitions_version": "tosca_simple_yaml_1_0_0",
 - "policy_types": [
 - {
 - "onap.policies.Monitoring": {
 - "derived_from": "tosca.policies.Root",
 - "version": "1.0.0",
 - "description": "a base policy type for all policies that governs monitoring provisioning"
 + "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
 + "policy_types": {
 + "onap.policies.Native": {
 + "derived_from": "tosca.policies.Root",
 + "description": "a base policy type for all native PDP policies",
 + "version": "1.0.0"
 + },
 + "onap.policies.native.Drools": {
 + "derived_from": "onap.policies.Native",
 + "description": "a base policy type for all native PDP policies",
 + "version": "1.0.0"
 + },
 + "onap.policies.native.drools.Controller": {
 + "derived_from": "onap.policies.native.Drools",
 + "description": "a policy type for a drools controller configuration",
 + "version": "6.0.${__threadNum}",
 + "properties": {
 + "controllerName": {
 + "type": "string",
 + "required": true,
 + "description": "the drools controller name"
 + },
 + "sourceTopics": {
 + "type": "list",
 + "required": false,
 + "description": "source topics and applicable events",
 + "entry_schema": {
 + "type": "onap.datatypes.dmaap.topic"
 + }
 + },
 + "sinkTopics": {
 + "type": "list",
 + "required": false,
 + "description": "sink topics and applicable events",
 + "entry_schema": {
 + "type": "onap.datatypes.dmaap.topic"
 + }
 + },
 + "customConfig": {
 + "type": "map",
 + "required": false,
 + "description": "any use case specific configurations relevant to the drools controller",
 + "entry_schema": {
 + "type": "string"
 + }
 }
 - },
 - {
 - "onap.policies.monitoring.cdap.tca.hi.lo.app": {
 - "derived_from": "onap.policies.Monitoring",
 - "version": "10.0.0",
 - "properties": {
 - "tca_policy": {
 - "type": "map",
 - "description": "TCA Policy JSON",
 - "entry_schema": {
 - "type": "onap.datatypes.monitoring.tca_policy"
 - }
 - }
 - }
 + }
 + },
 + "onap.policies.native.drools.Artifact": {
 + "derived_from": "onap.policies.native.Drools",
 + "description": "a policy type for native drools artifact policies",
 + "version": "6.0.${__threadNum}",
 + "properties": {
 + "rulesArtifact": {
 + "type": "onap.datatypes.native.rules_artifact",
 + "required": true,
 + "description": "the GAV information of the maven artifact"
 + },
 + "controller": {
 + "type": "onap.datatypes.drools.controller.relation",
 + "required": true,
 + "description": "the drools controller to which the current native policy is assigned"
 }
 - }
 - ],
 - "data_types": [
 - {
 - "onap.datatypes.monitoring.metricsPerEventName": {
 - "derived_from": "tosca.datatypes.Root",
 - "properties": {
 - "controlLoopSchemaType": {
 - "type": "string",
 - "required": true,
 - "description": "Specifies Control Loop Schema Type for the event Name e.g. VNF, VM",
 - "constraints": [
 - {
 - "valid_values": [
 - "VM",
 - "VNF"
 - ]
 - }
 - ]
 - },
 - "eventName": {
 - "type": "string",
 - "required": true,
 - "description": "Event name to which thresholds need to be applied"
 - },
 - "policyName": {
 - "type": "string",
 - "required": true,
 - "description": "TCA Policy Scope Name"
 - },
 - "policyScope": {
 - "type": "string",
 - "required": true,
 - "description": "TCA Policy Scope"
 - },
 - "policyVersion": {
 - "type": "string",
 - "required": true,
 - "description": "TCA Policy Scope Version"
 - },
 - "thresholds": {
 - "type": "list",
 - "required": true,
 - "description": "Thresholds associated with eventName",
 - "entry_schema": {
 - "type": "onap.datatypes.monitoring.thresholds"
 - }
 - }
 - }
 + }
 + }
 + },
 + "data_types": {
 + "onap.datatypes.dmaap.topic": {
 + "derived_from": "tosca.datatypes.Root",
 + "properties": {
 + "topicName": {
 + "type": "string",
 + "required": true,
 + "description": "the dmaap topic name"
 + },
 + "events": {
 + "type": "list",
 + "required": true,
 + "description": "events used by this topic",
 + "entry_schema": {
 + "type": "onap.datatypes.dmaap.events"
 + }
 }
 - },
 - {
 - "onap.datatypes.monitoring.tca_policy": {
 - "derived_from": "tosca.datatypes.Root",
 - "properties": {
 - "domain": {
 - "type": "string",
 - "required": true,
 - "description": "Domain name to which TCA needs to be applied",
 - "default": "measurementsForVfScaling",
 - "constraints": [
 - {
 - "equal": "measurementsForVfScaling"
 - }
 - ]
 - },
 - "metricsPerEventName": {
 - "type": "list",
 - "required": true,
 - "description": "Contains eventName and threshold details that need to be applied to given eventName",
 - "entry_schema": {
 - "type": "onap.datatypes.monitoring.metricsPerEventName"
 - }
 - }
 - }
 + }
 + },
 + "onap.datatypes.dmaap.events": {
 + "derived_from": "tosca.datatypes.Root",
 + "properties": {
 + "eventClass": {
 + "type": "string",
 + "required": true,
 + "description": "the event canonical class for serialization"
 + },
 + "eventFilter": {
 + "type": "string",
 + "required": false,
 + "description": "the JSONPath based condition to filter out the events to serialize"
 + },
 + "customSerialization": {
 + "type": "onap.datatypes.dmaap.custom_serialization",
 + "required": false,
 + "description": "overrides the default serialization/deserialization mechanisms with custom ones"
 }
 - },
 - {
 - "onap.datatypes.monitoring.thresholds": {
 - "derived_from": "tosca.datatypes.Root",
 - "properties": {
 - "closedLoopControlName": {
 - "type": "string",
 - "required": true,
 - "description": "Closed Loop Control Name associated with the threshold"
 - },
 - "closedLoopEventStatus": {
 - "type": "string",
 - "required": true,
 - "description": "Closed Loop Event Status of the threshold",
 - "constraints": [
 - {
 - "valid_values": [
 - "ONSET",
 - "ABATED"
 - ]
 - }
 - ]
 - },
 - "direction": {
 - "type": "string",
 - "required": true,
 - "description": "Direction of the threshold",
 - "constraints": [
 - {
 - "valid_values": [
 - "LESS",
 - "LESS_OR_EQUAL",
 - "GREATER",
 - "GREATER_OR_EQUAL",
 - "EQUAL"
 - ]
 - }
 - ]
 - },
 - "fieldPath": {
 - "type": "string",
 - "required": true,
 - "description": "Json field Path as per CEF message which needs to be analyzed for TCA",
 - "constraints": [
 - {
 - "valid_values": [
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuIdle",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageInterrupt",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageNice",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSoftIrq",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSteal",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSystem",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuWait",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].percentUsage",
 - "$.event.measurementsForVfScalingFields.meanRequestLatency",
 - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryBuffered",
 - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryCached",
 - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryConfigured",
 - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryFree",
 - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryUsed",
 - "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value"
 - ]
 - }
 - ]
 - },
 - "severity": {
 - "type": "string",
 - "required": true,
 - "description": "Threshold Event Severity",
 - "constraints": [
 - {
 - "valid_values": [
 - "CRITICAL",
 - "MAJOR",
 - "MINOR",
 - "WARNING",
 - "NORMAL"
 - ]
 - }
 - ]
 - },
 - "thresholdValue": {
 - "type": "integer",
 - "required": true,
 - "description": "Threshold value for the field Path inside CEF message"
 - },
 - "version": {
 - "type": "string",
 - "required": true,
 - "description": "Version number associated with the threshold"
 - }
 - }
 + }
 + },
 + "onap.datatypes.dmaap.custom_serialization": {
 + "derived_from": "tosca.datatypes.Root",
 + "properties": {
 + "customSerializerClass": {
 + "type": "string",
 + "required": true,
 + "description": "the class that contains the JSON parser serializer/deserializer."
 + },
 + "jsonParser": {
 + "type": "string",
 + "required": true,
 + "description": "static field in customSerialized class with the json parser (currently only gson supported)"
 }
 - }
 - ]
 + }
 + },
 + "onap.datatypes.native.rules_artifact": {
 + "derived_from": "tosca.datatypes.Root",
 + "properties": {
 + "groupId": {
 + "type": "string",
 + "required": true,
 + "description": "the groupId of the maven artifact"
 + },
 + "artifactId": {
 + "type": "string",
 + "required": true,
 + "description": "the artifactId of the maven artifact"
 + },
 + "version": {
 + "type": "string",
 + "required": true,
 + "description": "the version of the maven artifact"
 + }
 + }
 + },
 + "onap.datatypes.drools.controller.relation": {
 + "derived_from": "tosca.datatypes.Root",
 + "properties": {
 + "name": {
 + "type": "string",
 + "required": true,
 + "description": "the name of drools controller policy"
 + }
 + }
 + }
 + }
 }</stringProp> <stringProp name="Argument.metadata">=</stringProp> </elementProp> @@ -3013,243 +1517,46 @@ if (prev.getResponseCode() == '200') { res = jsonSlurper.parseText(prev.getResponseDataAsString()); assert res instanceof Map; - assert res.policy_types instanceof List; - assert res.policy_types.size == 2; - assert res.policy_types[0] instanceof Map; - assert res.policy_types[1] instanceof Map; + assert res.policy_types instanceof Map; + assert res.policy_types.size() == 4; + assert res.policy_types.values()[0] instanceof Map; + assert res.policy_types.values()[1] instanceof Map; + assert res.policy_types.values()[2] instanceof Map; + assert res.policy_types.values()[3] instanceof Map; }</stringProp> </JSR223Assertion> <hashTree/> </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Create TCA Policy Type V11" enabled="true"> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Create Policy Type Native XACML" enabled="true"> <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> <collectionProp name="Arguments.arguments"> <elementProp name="" elementType="HTTPArgument"> <boolProp name="HTTPArgument.always_encode">false</boolProp> <stringProp name="Argument.value">{
 - "tosca_definitions_version": "tosca_simple_yaml_1_0_0",
 - "policy_types": [
 - {
 - "onap.policies.Monitoring": {
 - "derived_from": "tosca.policies.Root",
 - "version": "1.0.0",
 - "description": "a base policy type for all policies that governs monitoring provisioning"
 - }
 - },
 - {
 - "onap.policies.monitoring.cdap.tca.hi.lo.app": {
 - "derived_from": "onap.policies.Monitoring",
 - "version": "11.0.0",
 - "properties": {
 - "tca_policy": {
 - "type": "map",
 - "description": "TCA Policy JSON",
 - "entry_schema": {
 - "type": "onap.datatypes.monitoring.tca_policy"
 - }
 - }
 - }
 - }
 - }
 - ],
 - "data_types": [
 - {
 - "onap.datatypes.monitoring.metricsPerEventName": {
 - "derived_from": "tosca.datatypes.Root",
 - "properties": {
 - "controlLoopSchemaType": {
 - "type": "string",
 - "required": true,
 - "description": "Specifies Control Loop Schema Type for the event Name e.g. VNF, VM",
 - "constraints": [
 - {
 - "valid_values": [
 - "VM",
 - "VNF"
 - ]
 - }
 - ]
 - },
 - "eventName": {
 - "type": "string",
 - "required": true,
 - "description": "Event name to which thresholds need to be applied"
 - },
 - "policyName": {
 - "type": "string",
 - "required": true,
 - "description": "TCA Policy Scope Name"
 - },
 - "policyScope": {
 - "type": "string",
 - "required": true,
 - "description": "TCA Policy Scope"
 - },
 - "policyVersion": {
 - "type": "string",
 - "required": true,
 - "description": "TCA Policy Scope Version"
 - },
 - "thresholds": {
 - "type": "list",
 - "required": true,
 - "description": "Thresholds associated with eventName",
 - "entry_schema": {
 - "type": "onap.datatypes.monitoring.thresholds"
 - }
 - }
 - }
 + "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
 + "policy_types": {
 + "onap.policies.Native": {
 + "derived_from": "tosca.policies.Root",
 + "description": "a base policy type for all native PDP policies",
 + "version": "1.0.0"
 + },
 + "onap.policies.native.Xacml": {
 + "derived_from": "onap.policies.Native",
 + "description": "a policy type for native xacml policies",
 + "version": "6.0.${__threadNum}",
 + "properties": {
 + "policy": {
 + "type": "string",
 + "required": true,
 + "description": "The XML XACML 3.0 PolicySet or Policy",
 + "metadata": {
 + "encoding": "Base64"
 + }
 }
 - },
 - {
 - "onap.datatypes.monitoring.tca_policy": {
 - "derived_from": "tosca.datatypes.Root",
 - "properties": {
 - "domain": {
 - "type": "string",
 - "required": true,
 - "description": "Domain name to which TCA needs to be applied",
 - "default": "measurementsForVfScaling",
 - "constraints": [
 - {
 - "equal": "measurementsForVfScaling"
 - }
 - ]
 - },
 - "metricsPerEventName": {
 - "type": "list",
 - "required": true,
 - "description": "Contains eventName and threshold details that need to be applied to given eventName",
 - "entry_schema": {
 - "type": "onap.datatypes.monitoring.metricsPerEventName"
 - }
 - }
 - }
 - }
 - },
 - {
 - "onap.datatypes.monitoring.thresholds": {
 - "derived_from": "tosca.datatypes.Root",
 - "properties": {
 - "closedLoopControlName": {
 - "type": "string",
 - "required": true,
 - "description": "Closed Loop Control Name associated with the threshold"
 - },
 - "closedLoopEventStatus": {
 - "type": "string",
 - "required": true,
 - "description": "Closed Loop Event Status of the threshold",
 - "constraints": [
 - {
 - "valid_values": [
 - "ONSET",
 - "ABATED"
 - ]
 - }
 - ]
 - },
 - "direction": {
 - "type": "string",
 - "required": true,
 - "description": "Direction of the threshold",
 - "constraints": [
 - {
 - "valid_values": [
 - "LESS",
 - "LESS_OR_EQUAL",
 - "GREATER",
 - "GREATER_OR_EQUAL",
 - "EQUAL"
 - ]
 - }
 - ]
 - },
 - "fieldPath": {
 - "type": "string",
 - "required": true,
 - "description": "Json field Path as per CEF message which needs to be analyzed for TCA",
 - "constraints": [
 - {
 - "valid_values": [
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsDelta",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsAccumulated",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuIdle",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageInterrupt",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageNice",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSoftIrq",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSteal",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSystem",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuWait",
 - "$.event.measurementsForVfScalingFields.cpuUsageArray[*].percentUsage",
 - "$.event.measurementsForVfScalingFields.meanRequestLatency",
 - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryBuffered",
 - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryCached",
 - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryConfigured",
 - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryFree",
 - "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryUsed",
 - "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value"
 - ]
 - }
 - ]
 - },
 - "severity": {
 - "type": "string",
 - "required": true,
 - "description": "Threshold Event Severity",
 - "constraints": [
 - {
 - "valid_values": [
 - "CRITICAL",
 - "MAJOR",
 - "MINOR",
 - "WARNING",
 - "NORMAL"
 - ]
 - }
 - ]
 - },
 - "thresholdValue": {
 - "type": "integer",
 - "required": true,
 - "description": "Threshold value for the field Path inside CEF message"
 - },
 - "version": {
 - "type": "string",
 - "required": true,
 - "description": "Version number associated with the threshold"
 - }
 - }
 - }
 - }
 - ]
 + }
 + }
 + }
 }</stringProp> <stringProp name="Argument.metadata">=</stringProp> </elementProp> @@ -3293,18 +1600,14 @@ if (prev.getResponseCode() == '200') { res = jsonSlurper.parseText(prev.getResponseDataAsString()); assert res instanceof Map; - assert res.policy_types instanceof List; - assert res.policy_types.size == 2; - assert res.policy_types[0] instanceof Map; - assert res.policy_types[1] instanceof Map; + assert res.policy_types instanceof Map; + assert res.policy_types.size() == 2; + assert res.policy_types.values()[0] instanceof Map; + assert res.policy_types.values()[1] instanceof Map; }</stringProp> </JSR223Assertion> <hashTree/> </hashTree> - <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true"> - <stringProp name="ConstantTimer.delay">10000</stringProp> - </ConstantTimer> - <hashTree/> <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get All Policy Types" enabled="true"> <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> <collectionProp name="Arguments.arguments"/> @@ -3347,12 +1650,12 @@ if (prev.getResponseCode() == '200') { res = jsonSlurper.parseText(prev.getResponseDataAsString()); assert res instanceof Map; - assert res.policy_types instanceof List; - assert res.policy_types.size == 28; + assert res.policy_types instanceof Map; + assert res.policy_types.size() == 35; - def n = 28; + def n = 33; for (i=0; i<n; i++) { - assert res.policy_types[i] instanceof Map; + assert res.policy_types.values()[i] instanceof Map; } }</stringProp> </JSR223Assertion> @@ -3375,6 +1678,7 @@ if (prev.getResponseCode() == '200') { <stringProp name="HTTPSampler.embedded_url_re"></stringProp> <stringProp name="HTTPSampler.connect_timeout"></stringProp> <stringProp name="HTTPSampler.response_timeout"></stringProp> + <stringProp name="TestPlan.comments">This is not working in Frankfurt and hence disabled.</stringProp> </HTTPSamplerProxy> <hashTree> <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true"> @@ -3400,222 +1704,17 @@ if (prev.getResponseCode() == '200') { res = jsonSlurper.parseText(prev.getResponseDataAsString()); assert res instanceof Map; - assert res.policy_types instanceof List; - assert res.policy_types.size == 11; + assert res.policy_types instanceof Map; + assert res.policy_types.size() > 0 && res.policy_types.size() < 10; - def n = 11; - for (i=0; i<n; i++) { - assert res.policy_types[i] instanceof Map; + for (i=0; i<res.policy_types.size(); i++) { + assert res.policy_types.values()[i] instanceof Map; } }</stringProp> </JSR223Assertion> <hashTree/> </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get TCA Policy Type V1" enabled="true"> - <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> - <collectionProp name="Arguments.arguments"/> - </elementProp> - <stringProp name="HTTPSampler.domain">${API_HOST}</stringProp> - <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> - <stringProp name="HTTPSampler.protocol">https</stringProp> - <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/1.0.0</stringProp> - <stringProp name="HTTPSampler.method">GET</stringProp> - <boolProp name="HTTPSampler.follow_redirects">true</boolProp> - <boolProp name="HTTPSampler.auto_redirects">false</boolProp> - <boolProp name="HTTPSampler.use_keepalive">true</boolProp> - <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> - <stringProp name="HTTPSampler.embedded_url_re"></stringProp> - <stringProp name="HTTPSampler.connect_timeout"></stringProp> - <stringProp name="HTTPSampler.response_timeout"></stringProp> - </HTTPSamplerProxy> - <hashTree> - <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true"> - <collectionProp name="Asserion.test_strings"> - <stringProp name="49586">200</stringProp> - </collectionProp> - <stringProp name="Assertion.custom_message"></stringProp> - <stringProp name="Assertion.test_field">Assertion.response_code</stringProp> - <boolProp name="Assertion.assume_success">false</boolProp> - <intProp name="Assertion.test_type">1</intProp> - </ResponseAssertion> - <hashTree/> - <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JSR223 Assertion" enabled="true"> - <stringProp name="scriptLanguage">groovy</stringProp> - <stringProp name="parameters"></stringProp> - <stringProp name="filename"></stringProp> - <stringProp name="cacheKey">true</stringProp> - <stringProp name="script">import groovy.json.JsonSlurper; - -def res = []; -if (prev.getResponseCode() == '200') { - def jsonSlurper = new JsonSlurper(); - res = jsonSlurper.parseText(prev.getResponseDataAsString()); - - assert res instanceof Map; - assert res.policy_types instanceof List; - assert res.policy_types.size == 1; - - assert res.policy_types[0] instanceof Map; - assert res.policy_types[0].get('onap.policies.monitoring.cdap.tca.hi.lo.app').version == "1.0.0"; -}</stringProp> - </JSR223Assertion> - <hashTree/> - </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get TCA Policy Type V2" enabled="true"> - <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> - <collectionProp name="Arguments.arguments"/> - </elementProp> - <stringProp name="HTTPSampler.domain">${API_HOST}</stringProp> - <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> - <stringProp name="HTTPSampler.protocol">https</stringProp> - <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/2.0.0</stringProp> - <stringProp name="HTTPSampler.method">GET</stringProp> - <boolProp name="HTTPSampler.follow_redirects">true</boolProp> - <boolProp name="HTTPSampler.auto_redirects">false</boolProp> - <boolProp name="HTTPSampler.use_keepalive">true</boolProp> - <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> - <stringProp name="HTTPSampler.embedded_url_re"></stringProp> - <stringProp name="HTTPSampler.connect_timeout"></stringProp> - <stringProp name="HTTPSampler.response_timeout"></stringProp> - </HTTPSamplerProxy> - <hashTree> - <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true"> - <collectionProp name="Asserion.test_strings"> - <stringProp name="49586">200</stringProp> - </collectionProp> - <stringProp name="Assertion.custom_message"></stringProp> - <stringProp name="Assertion.test_field">Assertion.response_code</stringProp> - <boolProp name="Assertion.assume_success">false</boolProp> - <intProp name="Assertion.test_type">1</intProp> - </ResponseAssertion> - <hashTree/> - <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JSR223 Assertion" enabled="true"> - <stringProp name="scriptLanguage">groovy</stringProp> - <stringProp name="parameters"></stringProp> - <stringProp name="filename"></stringProp> - <stringProp name="cacheKey">true</stringProp> - <stringProp name="script">import groovy.json.JsonSlurper; - -def res = []; -if (prev.getResponseCode() == '200') { - def jsonSlurper = new JsonSlurper(); - res = jsonSlurper.parseText(prev.getResponseDataAsString()); - - assert res instanceof Map; - assert res.policy_types instanceof List; - assert res.policy_types.size == 1; - - assert res.policy_types[0] instanceof Map; - assert res.policy_types[0].get('onap.policies.monitoring.cdap.tca.hi.lo.app').version == "2.0.0"; -}</stringProp> - </JSR223Assertion> - <hashTree/> - </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get TCA Policy Type V3" enabled="true"> - <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> - <collectionProp name="Arguments.arguments"/> - </elementProp> - <stringProp name="HTTPSampler.domain">${API_HOST}</stringProp> - <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> - <stringProp name="HTTPSampler.protocol">https</stringProp> - <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/3.0.0</stringProp> - <stringProp name="HTTPSampler.method">GET</stringProp> - <boolProp name="HTTPSampler.follow_redirects">true</boolProp> - <boolProp name="HTTPSampler.auto_redirects">false</boolProp> - <boolProp name="HTTPSampler.use_keepalive">true</boolProp> - <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> - <stringProp name="HTTPSampler.embedded_url_re"></stringProp> - <stringProp name="HTTPSampler.connect_timeout"></stringProp> - <stringProp name="HTTPSampler.response_timeout"></stringProp> - </HTTPSamplerProxy> - <hashTree> - <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true"> - <collectionProp name="Asserion.test_strings"> - <stringProp name="49586">200</stringProp> - </collectionProp> - <stringProp name="Assertion.custom_message"></stringProp> - <stringProp name="Assertion.test_field">Assertion.response_code</stringProp> - <boolProp name="Assertion.assume_success">false</boolProp> - <intProp name="Assertion.test_type">1</intProp> - </ResponseAssertion> - <hashTree/> - <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JSR223 Assertion" enabled="true"> - <stringProp name="scriptLanguage">groovy</stringProp> - <stringProp name="parameters"></stringProp> - <stringProp name="filename"></stringProp> - <stringProp name="cacheKey">true</stringProp> - <stringProp name="script">import groovy.json.JsonSlurper; - -def res = []; -if (prev.getResponseCode() == '200') { - def jsonSlurper = new JsonSlurper(); - res = jsonSlurper.parseText(prev.getResponseDataAsString()); - - assert res instanceof Map; - assert res.policy_types instanceof List; - assert res.policy_types.size == 1; - - assert res.policy_types[0] instanceof Map; - assert res.policy_types[0].get('onap.policies.monitoring.cdap.tca.hi.lo.app').version == "3.0.0"; -}</stringProp> - </JSR223Assertion> - <hashTree/> - </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get TCA Policy Type V4" enabled="true"> - <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> - <collectionProp name="Arguments.arguments"/> - </elementProp> - <stringProp name="HTTPSampler.domain">${API_HOST}</stringProp> - <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> - <stringProp name="HTTPSampler.protocol">https</stringProp> - <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/4.0.0</stringProp> - <stringProp name="HTTPSampler.method">GET</stringProp> - <boolProp name="HTTPSampler.follow_redirects">true</boolProp> - <boolProp name="HTTPSampler.auto_redirects">false</boolProp> - <boolProp name="HTTPSampler.use_keepalive">true</boolProp> - <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> - <stringProp name="HTTPSampler.embedded_url_re"></stringProp> - <stringProp name="HTTPSampler.connect_timeout"></stringProp> - <stringProp name="HTTPSampler.response_timeout"></stringProp> - </HTTPSamplerProxy> - <hashTree> - <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true"> - <collectionProp name="Asserion.test_strings"> - <stringProp name="49586">200</stringProp> - </collectionProp> - <stringProp name="Assertion.custom_message"></stringProp> - <stringProp name="Assertion.test_field">Assertion.response_code</stringProp> - <boolProp name="Assertion.assume_success">false</boolProp> - <intProp name="Assertion.test_type">1</intProp> - </ResponseAssertion> - <hashTree/> - <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JSR223 Assertion" enabled="true"> - <stringProp name="scriptLanguage">groovy</stringProp> - <stringProp name="parameters"></stringProp> - <stringProp name="filename"></stringProp> - <stringProp name="cacheKey">true</stringProp> - <stringProp name="script">import groovy.json.JsonSlurper; - -def res = []; -if (prev.getResponseCode() == '200') { - def jsonSlurper = new JsonSlurper(); - res = jsonSlurper.parseText(prev.getResponseDataAsString()); - - assert res instanceof Map; - assert res.policy_types instanceof List; - assert res.policy_types.size == 1; - - assert res.policy_types[0] instanceof Map; - assert res.policy_types[0].get('onap.policies.monitoring.cdap.tca.hi.lo.app').version == "4.0.0"; -}</stringProp> - </JSR223Assertion> - <hashTree/> - </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get TCA Policy Type V5" enabled="true"> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get Policy Type Monitoring" enabled="true"> <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> <collectionProp name="Arguments.arguments"/> </elementProp> @@ -3623,7 +1722,7 @@ if (prev.getResponseCode() == '200') { <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> <stringProp name="HTTPSampler.protocol">https</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/5.0.0</stringProp> + <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/6.0.${__threadNum}</stringProp> <stringProp name="HTTPSampler.method">GET</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> @@ -3657,16 +1756,16 @@ if (prev.getResponseCode() == '200') { res = jsonSlurper.parseText(prev.getResponseDataAsString()); assert res instanceof Map; - assert res.policy_types instanceof List; - assert res.policy_types.size == 1; + assert res.policy_types instanceof Map; + assert res.policy_types.size() == 2; - assert res.policy_types[0] instanceof Map; - assert res.policy_types[0].get('onap.policies.monitoring.cdap.tca.hi.lo.app').version == "5.0.0"; + assert res.policy_types.get('onap.policies.monitoring.cdap.tca.hi.lo.app') instanceof Map; + assert res.policy_types.get('onap.policies.monitoring.cdap.tca.hi.lo.app').version == "6.0.${__threadNum}"; }</stringProp> </JSR223Assertion> <hashTree/> </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get TCA Policy Type V6" enabled="true"> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get Policy Type Optimization" enabled="true"> <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> <collectionProp name="Arguments.arguments"/> </elementProp> @@ -3674,7 +1773,7 @@ if (prev.getResponseCode() == '200') { <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> <stringProp name="HTTPSampler.protocol">https</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/6.0.0</stringProp> + <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.optimization.resource.AffinityPolicy/versions/6.0.${__threadNum}</stringProp> <stringProp name="HTTPSampler.method">GET</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> @@ -3708,16 +1807,16 @@ if (prev.getResponseCode() == '200') { res = jsonSlurper.parseText(prev.getResponseDataAsString()); assert res instanceof Map; - assert res.policy_types instanceof List; - assert res.policy_types.size == 1; + assert res.policy_types instanceof Map; + assert res.policy_types.size() == 3; - assert res.policy_types[0] instanceof Map; - assert res.policy_types[0].get('onap.policies.monitoring.cdap.tca.hi.lo.app').version == "6.0.0"; + assert res.policy_types.get('onap.policies.optimization.resource.AffinityPolicy') instanceof Map; + assert res.policy_types.get('onap.policies.optimization.resource.AffinityPolicy').version == "6.0.${__threadNum}"; }</stringProp> </JSR223Assertion> <hashTree/> </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get TCA Policy Type V7" enabled="true"> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get Policy Type Guard" enabled="true"> <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> <collectionProp name="Arguments.arguments"/> </elementProp> @@ -3725,7 +1824,7 @@ if (prev.getResponseCode() == '200') { <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> <stringProp name="HTTPSampler.protocol">https</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/7.0.0</stringProp> + <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.Blacklist/versions/6.0.${__threadNum}</stringProp> <stringProp name="HTTPSampler.method">GET</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> @@ -3759,16 +1858,16 @@ if (prev.getResponseCode() == '200') { res = jsonSlurper.parseText(prev.getResponseDataAsString()); assert res instanceof Map; - assert res.policy_types instanceof List; - assert res.policy_types.size == 1; + assert res.policy_types instanceof Map; + assert res.policy_types.size() == 2; - assert res.policy_types[0] instanceof Map; - assert res.policy_types[0].get('onap.policies.monitoring.cdap.tca.hi.lo.app').version == "7.0.0"; + assert res.policy_types.get('onap.policies.controlloop.guard.common.Blacklist') instanceof Map; + assert res.policy_types.get('onap.policies.controlloop.guard.common.Blacklist').version == "6.0.${__threadNum}"; }</stringProp> </JSR223Assertion> <hashTree/> </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get TCA Policy Type V8" enabled="true"> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get Policy Type Native APEX" enabled="true"> <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> <collectionProp name="Arguments.arguments"/> </elementProp> @@ -3776,7 +1875,7 @@ if (prev.getResponseCode() == '200') { <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> <stringProp name="HTTPSampler.protocol">https</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/8.0.0</stringProp> + <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.native.Apex/versions/6.0.${__threadNum}</stringProp> <stringProp name="HTTPSampler.method">GET</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> @@ -3810,16 +1909,16 @@ if (prev.getResponseCode() == '200') { res = jsonSlurper.parseText(prev.getResponseDataAsString()); assert res instanceof Map; - assert res.policy_types instanceof List; - assert res.policy_types.size == 1; + assert res.policy_types instanceof Map; + assert res.policy_types.size() == 2; - assert res.policy_types[0] instanceof Map; - assert res.policy_types[0].get('onap.policies.monitoring.cdap.tca.hi.lo.app').version == "8.0.0"; + assert res.policy_types.get('onap.policies.native.Apex') instanceof Map; + assert res.policy_types.get('onap.policies.native.Apex').version == "6.0.${__threadNum}"; }</stringProp> </JSR223Assertion> <hashTree/> </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get TCA Policy Type V9" enabled="true"> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get Policy Type Native Drools" enabled="true"> <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> <collectionProp name="Arguments.arguments"/> </elementProp> @@ -3827,7 +1926,7 @@ if (prev.getResponseCode() == '200') { <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> <stringProp name="HTTPSampler.protocol">https</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/9.0.0</stringProp> + <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.native.drools.Controller/versions/6.0.${__threadNum}</stringProp> <stringProp name="HTTPSampler.method">GET</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> @@ -3861,16 +1960,16 @@ if (prev.getResponseCode() == '200') { res = jsonSlurper.parseText(prev.getResponseDataAsString()); assert res instanceof Map; - assert res.policy_types instanceof List; - assert res.policy_types.size == 1; + assert res.policy_types instanceof Map; + assert res.policy_types.size() == 3; - assert res.policy_types[0] instanceof Map; - assert res.policy_types[0].get('onap.policies.monitoring.cdap.tca.hi.lo.app').version == "9.0.0"; + assert res.policy_types.get('onap.policies.native.drools.Controller') instanceof Map; + assert res.policy_types.get('onap.policies.native.drools.Controller').version == "6.0.${__threadNum}"; }</stringProp> </JSR223Assertion> <hashTree/> </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get TCA Policy Type V10" enabled="true"> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get Policy Type Native XACML" enabled="true"> <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> <collectionProp name="Arguments.arguments"/> </elementProp> @@ -3878,7 +1977,7 @@ if (prev.getResponseCode() == '200') { <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> <stringProp name="HTTPSampler.protocol">https</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/10.0.0</stringProp> + <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.native.Xacml/versions/6.0.${__threadNum}</stringProp> <stringProp name="HTTPSampler.method">GET</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> @@ -3912,67 +2011,16 @@ if (prev.getResponseCode() == '200') { res = jsonSlurper.parseText(prev.getResponseDataAsString()); assert res instanceof Map; - assert res.policy_types instanceof List; - assert res.policy_types.size == 1; + assert res.policy_types instanceof Map; + assert res.policy_types.size() == 2; - assert res.policy_types[0] instanceof Map; - assert res.policy_types[0].get('onap.policies.monitoring.cdap.tca.hi.lo.app').version == "10.0.0"; + assert res.policy_types.get('onap.policies.native.Xacml') instanceof Map; + assert res.policy_types.get('onap.policies.native.Xacml').version == "6.0.${__threadNum}"; }</stringProp> </JSR223Assertion> <hashTree/> </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get TCA Policy Type V11" enabled="true"> - <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> - <collectionProp name="Arguments.arguments"/> - </elementProp> - <stringProp name="HTTPSampler.domain">${API_HOST}</stringProp> - <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> - <stringProp name="HTTPSampler.protocol">https</stringProp> - <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/11.0.0</stringProp> - <stringProp name="HTTPSampler.method">GET</stringProp> - <boolProp name="HTTPSampler.follow_redirects">true</boolProp> - <boolProp name="HTTPSampler.auto_redirects">false</boolProp> - <boolProp name="HTTPSampler.use_keepalive">true</boolProp> - <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> - <stringProp name="HTTPSampler.embedded_url_re"></stringProp> - <stringProp name="HTTPSampler.connect_timeout"></stringProp> - <stringProp name="HTTPSampler.response_timeout"></stringProp> - </HTTPSamplerProxy> - <hashTree> - <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true"> - <collectionProp name="Asserion.test_strings"> - <stringProp name="49586">200</stringProp> - </collectionProp> - <stringProp name="Assertion.custom_message"></stringProp> - <stringProp name="Assertion.test_field">Assertion.response_code</stringProp> - <boolProp name="Assertion.assume_success">false</boolProp> - <intProp name="Assertion.test_type">1</intProp> - </ResponseAssertion> - <hashTree/> - <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JSR223 Assertion" enabled="true"> - <stringProp name="scriptLanguage">groovy</stringProp> - <stringProp name="parameters"></stringProp> - <stringProp name="filename"></stringProp> - <stringProp name="cacheKey">true</stringProp> - <stringProp name="script">import groovy.json.JsonSlurper; - -def res = []; -if (prev.getResponseCode() == '200') { - def jsonSlurper = new JsonSlurper(); - res = jsonSlurper.parseText(prev.getResponseDataAsString()); - - assert res instanceof Map; - assert res.policy_types instanceof List; - assert res.policy_types.size == 1; - - assert res.policy_types[0] instanceof Map; - assert res.policy_types[0].get('onap.policies.monitoring.cdap.tca.hi.lo.app').version == "11.0.0"; -}</stringProp> - </JSR223Assertion> - <hashTree/> - </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get Latest TCA Policy Type" enabled="true"> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get Latest Monitoring Policy Type" enabled="true"> <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> <collectionProp name="Arguments.arguments"/> </elementProp> @@ -4014,463 +2062,35 @@ if (prev.getResponseCode() == '200') { res = jsonSlurper.parseText(prev.getResponseDataAsString()); assert res instanceof Map; - assert res.policy_types instanceof List; - assert res.policy_types.size == 1; - - assert res.policy_types[0] instanceof Map; - assert res.policy_types[0].get('onap.policies.monitoring.cdap.tca.hi.lo.app').version == "11.0.0"; -}</stringProp> - </JSR223Assertion> - <hashTree/> - </hashTree> - <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true"> - <stringProp name="ConstantTimer.delay">5000</stringProp> - </ConstantTimer> - <hashTree/> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Create TCA Policy V1 " enabled="true"> - <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> - <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> - <collectionProp name="Arguments.arguments"> - <elementProp name="" elementType="HTTPArgument"> - <boolProp name="HTTPArgument.always_encode">false</boolProp> - <stringProp name="Argument.value">{
 - "tosca_definitions_version": "tosca_simple_yaml_1_0_0",
 - "topology_template": {
 - "policies": [
 - {
 - "onap.restart.tca": {
 - "type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
 - "version": "1.0.0",
 - "type_version": "2.0.0",
 - "metadata": {
 - "policy-id": "onap.restart.tca"
 - },
 - "properties": {
 - "tca_policy" : {
 - "domain": "measurementsForVfScaling",
 - "metricsPerEventName": [
 - {
 - "eventName": "Measurement_vGMUX",
 - "controlLoopSchemaType": "VNF",
 - "policyScope": "DCAE",
 - "policyName": "DCAE.Config_tca-hi-lo",
 - "policyVersion": "v0.0.1",
 - "thresholds": [
 - {
 - "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
 - "version": "1.0.2",
 - "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
 - "thresholdValue": 0,
 - "direction": "EQUAL",
 - "severity": "MAJOR",
 - "closedLoopEventStatus": "ABATED"
 - },
 - {
 - "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
 - "version": "1.0.2",
 - "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
 - "thresholdValue": 0,
 - "direction": "GREATER",
 - "severity": "CRITICAL",
 - "closedLoopEventStatus": "ONSET"
 - }
 - ]
 - }
 - ]
 - }
 - }
 - }
 - }
 - ]
 - }
 -}</stringProp> - <stringProp name="Argument.metadata">=</stringProp> - </elementProp> - </collectionProp> - </elementProp> - <stringProp name="HTTPSampler.domain">${API_HOST}</stringProp> - <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> - <stringProp name="HTTPSampler.protocol">https</stringProp> - <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/2.0.0/policies</stringProp> - <stringProp name="HTTPSampler.method">POST</stringProp> - <boolProp name="HTTPSampler.follow_redirects">true</boolProp> - <boolProp name="HTTPSampler.auto_redirects">false</boolProp> - <boolProp name="HTTPSampler.use_keepalive">true</boolProp> - <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> - <stringProp name="HTTPSampler.embedded_url_re"></stringProp> - <stringProp name="HTTPSampler.connect_timeout"></stringProp> - <stringProp name="HTTPSampler.response_timeout"></stringProp> - </HTTPSamplerProxy> - <hashTree> - <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true"> - <collectionProp name="Asserion.test_strings"> - <stringProp name="49586">200</stringProp> - </collectionProp> - <stringProp name="Assertion.custom_message"></stringProp> - <stringProp name="Assertion.test_field">Assertion.response_code</stringProp> - <boolProp name="Assertion.assume_success">false</boolProp> - <intProp name="Assertion.test_type">1</intProp> - </ResponseAssertion> - <hashTree/> - <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JSR223 Assertion" enabled="true"> - <stringProp name="scriptLanguage">groovy</stringProp> - <stringProp name="parameters"></stringProp> - <stringProp name="filename"></stringProp> - <stringProp name="cacheKey">true</stringProp> - <stringProp name="script">import groovy.json.JsonSlurper; - -def res = []; -if (prev.getResponseCode() == '200') { - def jsonSlurper = new JsonSlurper(); - res = jsonSlurper.parseText(prev.getResponseDataAsString()); - - assert res instanceof Map; - assert res.topology_template.policies instanceof List; - assert res.topology_template.policies.size == 1; - assert res.topology_template.policies[0] instanceof Map; -}</stringProp> - </JSR223Assertion> - <hashTree/> - </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Create TCA Policy V2" enabled="true"> - <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> - <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> - <collectionProp name="Arguments.arguments"> - <elementProp name="" elementType="HTTPArgument"> - <boolProp name="HTTPArgument.always_encode">false</boolProp> - <stringProp name="Argument.value">{
 - "tosca_definitions_version": "tosca_simple_yaml_1_0_0",
 - "topology_template": {
 - "policies": [
 - {
 - "onap.restart.tca": {
 - "type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
 - "version": "2.0.0",
 - "type_version": "2.0.0",
 - "metadata": {
 - "policy-id": "onap.restart.tca"
 - },
 - "properties": {
 - "tca_policy" : {
 - "domain": "measurementsForVfScaling",
 - "metricsPerEventName": [
 - {
 - "eventName": "Measurement_vGMUX",
 - "controlLoopSchemaType": "VNF",
 - "policyScope": "DCAE",
 - "policyName": "DCAE.Config_tca-hi-lo",
 - "policyVersion": "v0.0.1",
 - "thresholds": [
 - {
 - "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
 - "version": "1.0.2",
 - "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
 - "thresholdValue": 0,
 - "direction": "EQUAL",
 - "severity": "MAJOR",
 - "closedLoopEventStatus": "ABATED"
 - },
 - {
 - "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
 - "version": "1.0.2",
 - "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
 - "thresholdValue": 0,
 - "direction": "GREATER",
 - "severity": "CRITICAL",
 - "closedLoopEventStatus": "ONSET"
 - }
 - ]
 - }
 - ]
 - }
 - }
 - }
 - }
 - ]
 - }
 -}</stringProp> - <stringProp name="Argument.metadata">=</stringProp> - </elementProp> - </collectionProp> - </elementProp> - <stringProp name="HTTPSampler.domain">${API_HOST}</stringProp> - <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> - <stringProp name="HTTPSampler.protocol">https</stringProp> - <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/2.0.0/policies</stringProp> - <stringProp name="HTTPSampler.method">POST</stringProp> - <boolProp name="HTTPSampler.follow_redirects">true</boolProp> - <boolProp name="HTTPSampler.auto_redirects">false</boolProp> - <boolProp name="HTTPSampler.use_keepalive">true</boolProp> - <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> - <stringProp name="HTTPSampler.embedded_url_re"></stringProp> - <stringProp name="HTTPSampler.connect_timeout"></stringProp> - <stringProp name="HTTPSampler.response_timeout"></stringProp> - </HTTPSamplerProxy> - <hashTree> - <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true"> - <collectionProp name="Asserion.test_strings"> - <stringProp name="49586">200</stringProp> - </collectionProp> - <stringProp name="Assertion.custom_message"></stringProp> - <stringProp name="Assertion.test_field">Assertion.response_code</stringProp> - <boolProp name="Assertion.assume_success">false</boolProp> - <intProp name="Assertion.test_type">1</intProp> - </ResponseAssertion> - <hashTree/> - <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JSR223 Assertion" enabled="true"> - <stringProp name="scriptLanguage">groovy</stringProp> - <stringProp name="parameters"></stringProp> - <stringProp name="filename"></stringProp> - <stringProp name="cacheKey">true</stringProp> - <stringProp name="script">import groovy.json.JsonSlurper; - -def res = []; -if (prev.getResponseCode() == '200') { - def jsonSlurper = new JsonSlurper(); - res = jsonSlurper.parseText(prev.getResponseDataAsString()); - - assert res instanceof Map; - assert res.topology_template.policies instanceof List; - assert res.topology_template.policies.size == 1; - assert res.topology_template.policies[0] instanceof Map; -}</stringProp> - </JSR223Assertion> - <hashTree/> - </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Create TCA Policy V3" enabled="true"> - <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> - <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> - <collectionProp name="Arguments.arguments"> - <elementProp name="" elementType="HTTPArgument"> - <boolProp name="HTTPArgument.always_encode">false</boolProp> - <stringProp name="Argument.value">{
 - "tosca_definitions_version": "tosca_simple_yaml_1_0_0",
 - "topology_template": {
 - "policies": [
 - {
 - "onap.restart.tca": {
 - "type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
 - "version": "3.0.0",
 - "type_version": "2.0.0",
 - "metadata": {
 - "policy-id": "onap.restart.tca"
 - },
 - "properties": {
 - "tca_policy" : {
 - "domain": "measurementsForVfScaling",
 - "metricsPerEventName": [
 - {
 - "eventName": "Measurement_vGMUX",
 - "controlLoopSchemaType": "VNF",
 - "policyScope": "DCAE",
 - "policyName": "DCAE.Config_tca-hi-lo",
 - "policyVersion": "v0.0.1",
 - "thresholds": [
 - {
 - "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
 - "version": "1.0.2",
 - "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
 - "thresholdValue": 0,
 - "direction": "EQUAL",
 - "severity": "MAJOR",
 - "closedLoopEventStatus": "ABATED"
 - },
 - {
 - "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
 - "version": "1.0.2",
 - "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
 - "thresholdValue": 0,
 - "direction": "GREATER",
 - "severity": "CRITICAL",
 - "closedLoopEventStatus": "ONSET"
 - }
 - ]
 - }
 - ]
 - }
 - }
 - }
 - }
 - ]
 - }
 -}</stringProp> - <stringProp name="Argument.metadata">=</stringProp> - </elementProp> - </collectionProp> - </elementProp> - <stringProp name="HTTPSampler.domain">${API_HOST}</stringProp> - <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> - <stringProp name="HTTPSampler.protocol">https</stringProp> - <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/2.0.0/policies</stringProp> - <stringProp name="HTTPSampler.method">POST</stringProp> - <boolProp name="HTTPSampler.follow_redirects">true</boolProp> - <boolProp name="HTTPSampler.auto_redirects">false</boolProp> - <boolProp name="HTTPSampler.use_keepalive">true</boolProp> - <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> - <stringProp name="HTTPSampler.embedded_url_re"></stringProp> - <stringProp name="HTTPSampler.connect_timeout"></stringProp> - <stringProp name="HTTPSampler.response_timeout"></stringProp> - </HTTPSamplerProxy> - <hashTree> - <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true"> - <collectionProp name="Asserion.test_strings"> - <stringProp name="49586">200</stringProp> - </collectionProp> - <stringProp name="Assertion.custom_message"></stringProp> - <stringProp name="Assertion.test_field">Assertion.response_code</stringProp> - <boolProp name="Assertion.assume_success">false</boolProp> - <intProp name="Assertion.test_type">1</intProp> - </ResponseAssertion> - <hashTree/> - <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JSR223 Assertion" enabled="true"> - <stringProp name="scriptLanguage">groovy</stringProp> - <stringProp name="parameters"></stringProp> - <stringProp name="filename"></stringProp> - <stringProp name="cacheKey">true</stringProp> - <stringProp name="script">import groovy.json.JsonSlurper; - -def res = []; -if (prev.getResponseCode() == '200') { - def jsonSlurper = new JsonSlurper(); - res = jsonSlurper.parseText(prev.getResponseDataAsString()); - - assert res instanceof Map; - assert res.topology_template.policies instanceof List; - assert res.topology_template.policies.size == 1; - assert res.topology_template.policies[0] instanceof Map; -}</stringProp> - </JSR223Assertion> - <hashTree/> - </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Create TCA Policy V4" enabled="true"> - <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> - <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> - <collectionProp name="Arguments.arguments"> - <elementProp name="" elementType="HTTPArgument"> - <boolProp name="HTTPArgument.always_encode">false</boolProp> - <stringProp name="Argument.value">{
 - "tosca_definitions_version": "tosca_simple_yaml_1_0_0",
 - "topology_template": {
 - "policies": [
 - {
 - "onap.restart.tca": {
 - "type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
 - "version": "4.0.0",
 - "type_version": "2.0.0",
 - "metadata": {
 - "policy-id": "onap.restart.tca"
 - },
 - "properties": {
 - "tca_policy" : {
 - "domain": "measurementsForVfScaling",
 - "metricsPerEventName": [
 - {
 - "eventName": "Measurement_vGMUX",
 - "controlLoopSchemaType": "VNF",
 - "policyScope": "DCAE",
 - "policyName": "DCAE.Config_tca-hi-lo",
 - "policyVersion": "v0.0.1",
 - "thresholds": [
 - {
 - "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
 - "version": "1.0.2",
 - "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
 - "thresholdValue": 0,
 - "direction": "EQUAL",
 - "severity": "MAJOR",
 - "closedLoopEventStatus": "ABATED"
 - },
 - {
 - "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
 - "version": "1.0.2",
 - "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
 - "thresholdValue": 0,
 - "direction": "GREATER",
 - "severity": "CRITICAL",
 - "closedLoopEventStatus": "ONSET"
 - }
 - ]
 - }
 - ]
 - }
 - }
 - }
 - }
 - ]
 - }
 -}</stringProp> - <stringProp name="Argument.metadata">=</stringProp> - </elementProp> - </collectionProp> - </elementProp> - <stringProp name="HTTPSampler.domain">${API_HOST}</stringProp> - <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> - <stringProp name="HTTPSampler.protocol">https</stringProp> - <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/2.0.0/policies</stringProp> - <stringProp name="HTTPSampler.method">POST</stringProp> - <boolProp name="HTTPSampler.follow_redirects">true</boolProp> - <boolProp name="HTTPSampler.auto_redirects">false</boolProp> - <boolProp name="HTTPSampler.use_keepalive">true</boolProp> - <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> - <stringProp name="HTTPSampler.embedded_url_re"></stringProp> - <stringProp name="HTTPSampler.connect_timeout"></stringProp> - <stringProp name="HTTPSampler.response_timeout"></stringProp> - </HTTPSamplerProxy> - <hashTree> - <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true"> - <collectionProp name="Asserion.test_strings"> - <stringProp name="49586">200</stringProp> - </collectionProp> - <stringProp name="Assertion.custom_message"></stringProp> - <stringProp name="Assertion.test_field">Assertion.response_code</stringProp> - <boolProp name="Assertion.assume_success">false</boolProp> - <intProp name="Assertion.test_type">1</intProp> - </ResponseAssertion> - <hashTree/> - <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JSR223 Assertion" enabled="true"> - <stringProp name="scriptLanguage">groovy</stringProp> - <stringProp name="parameters"></stringProp> - <stringProp name="filename"></stringProp> - <stringProp name="cacheKey">true</stringProp> - <stringProp name="script">import groovy.json.JsonSlurper; - -def res = []; -if (prev.getResponseCode() == '200') { - def jsonSlurper = new JsonSlurper(); - res = jsonSlurper.parseText(prev.getResponseDataAsString()); + assert res.policy_types instanceof Map; + assert res.policy_types.size() > 0 && res.policy_types.size() < 10; - assert res instanceof Map; - assert res.topology_template.policies instanceof List; - assert res.topology_template.policies.size == 1; - assert res.topology_template.policies[0] instanceof Map; + assert res.policy_types.get('onap.policies.monitoring.cdap.tca.hi.lo.app') instanceof Map; + assert res.policy_types.get('onap.policies.monitoring.cdap.tca.hi.lo.app').version ==~ /7.0.\d+/; }</stringProp> </JSR223Assertion> <hashTree/> </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Create TCA Policy V5" enabled="true"> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Create Policy Monitoring" enabled="true"> <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> <collectionProp name="Arguments.arguments"> <elementProp name="" elementType="HTTPArgument"> <boolProp name="HTTPArgument.always_encode">false</boolProp> <stringProp name="Argument.value">{
 - "tosca_definitions_version": "tosca_simple_yaml_1_0_0",
 + "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
 "topology_template": {
 "policies": [
 {
 "onap.restart.tca": {
 "type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
 - "version": "5.0.0",
 - "type_version": "2.0.0",
 + "type_version": "6.0.${__threadNum}",
 + "version": "6.0.${__threadNum}",
 "metadata": {
 "policy-id": "onap.restart.tca"
 },
 "properties": {
 - "tca_policy" : {
 + "tca_policy": {
 "domain": "measurementsForVfScaling",
 "metricsPerEventName": [
 {
 @@ -4516,7 +2136,7 @@ if (prev.getResponseCode() == '200') { <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> <stringProp name="HTTPSampler.protocol">https</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/2.0.0/policies</stringProp> + <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/1.0.0/policies</stringProp> <stringProp name="HTTPSampler.method">POST</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> @@ -4557,26 +2177,26 @@ if (prev.getResponseCode() == '200') { </JSR223Assertion> <hashTree/> </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Create TCA Policy V6" enabled="true"> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Create Policy Monitoring V2" enabled="true"> <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> <collectionProp name="Arguments.arguments"> <elementProp name="" elementType="HTTPArgument"> <boolProp name="HTTPArgument.always_encode">false</boolProp> <stringProp name="Argument.value">{
 - "tosca_definitions_version": "tosca_simple_yaml_1_0_0",
 + "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
 "topology_template": {
 "policies": [
 {
 "onap.restart.tca": {
 "type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
 - "version": "6.0.0",
 - "type_version": "2.0.0",
 + "type_version": "7.0.${__threadNum}",
 + "version": "7.0.${__threadNum}",
 "metadata": {
 "policy-id": "onap.restart.tca"
 },
 "properties": {
 - "tca_policy" : {
 + "tca_policy": {
 "domain": "measurementsForVfScaling",
 "metricsPerEventName": [
 {
 @@ -4622,7 +2242,7 @@ if (prev.getResponseCode() == '200') { <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> <stringProp name="HTTPSampler.protocol">https</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/2.0.0/policies</stringProp> + <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/1.0.0/policies</stringProp> <stringProp name="HTTPSampler.method">POST</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> @@ -4663,56 +2283,35 @@ if (prev.getResponseCode() == '200') { </JSR223Assertion> <hashTree/> </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Create TCA Policy V7" enabled="true"> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Create Policy Optimization" enabled="true"> <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> <collectionProp name="Arguments.arguments"> <elementProp name="" elementType="HTTPArgument"> <boolProp name="HTTPArgument.always_encode">false</boolProp> <stringProp name="Argument.value">{
 - "tosca_definitions_version": "tosca_simple_yaml_1_0_0",
 + "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
 "topology_template": {
 "policies": [
 {
 - "onap.restart.tca": {
 - "type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
 - "version": "7.0.0",
 - "type_version": "2.0.0",
 + "OSDF_CASABLANCA.Affinity_Default": {
 + "type": "onap.policies.optimization.resource.AffinityPolicy",
 + "version": "6.0.${__threadNum}",
 + "type_version": "6.0.${__threadNum}",
 "metadata": {
 - "policy-id": "onap.restart.tca"
 + "policy-id": "OSDF_CASABLANCA.Affinity_Default",
 + "policy-version": 1
 },
 "properties": {
 - "tca_policy" : {
 - "domain": "measurementsForVfScaling",
 - "metricsPerEventName": [
 - {
 - "eventName": "Measurement_vGMUX",
 - "controlLoopSchemaType": "VNF",
 - "policyScope": "DCAE",
 - "policyName": "DCAE.Config_tca-hi-lo",
 - "policyVersion": "v0.0.1",
 - "thresholds": [
 - {
 - "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
 - "version": "1.0.2",
 - "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
 - "thresholdValue": 0,
 - "direction": "EQUAL",
 - "severity": "MAJOR",
 - "closedLoopEventStatus": "ABATED"
 - },
 - {
 - "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
 - "version": "1.0.2",
 - "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
 - "thresholdValue": 0,
 - "direction": "GREATER",
 - "severity": "CRITICAL",
 - "closedLoopEventStatus": "ONSET"
 - }
 - ]
 - }
 - ]
 + "scope": [],
 + "services": [],
 + "resources": [],
 + "geography": [],
 + "identity": "affinity_vCPE",
 + "applicableResources": "any",
 + "affinityProperties": {
 + "qualifier": "same",
 + "category": "complex"
 }
 }
 }
 @@ -4728,7 +2327,7 @@ if (prev.getResponseCode() == '200') { <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> <stringProp name="HTTPSampler.protocol">https</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/2.0.0/policies</stringProp> + <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.optimization.resource.AffinityPolicy/versions/2.0.0/policies</stringProp> <stringProp name="HTTPSampler.method">POST</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> @@ -4769,62 +2368,37 @@ if (prev.getResponseCode() == '200') { </JSR223Assertion> <hashTree/> </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Create TCA Policy V8" enabled="true"> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Create Policy Guard" enabled="true"> <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> <collectionProp name="Arguments.arguments"> <elementProp name="" elementType="HTTPArgument"> <boolProp name="HTTPArgument.always_encode">false</boolProp> <stringProp name="Argument.value">{
 - "tosca_definitions_version": "tosca_simple_yaml_1_0_0",
 - "topology_template": {
 - "policies": [
 - {
 - "onap.restart.tca": {
 - "type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
 - "version": "8.0.0",
 - "type_version": "2.0.0",
 - "metadata": {
 - "policy-id": "onap.restart.tca"
 - },
 - "properties": {
 - "tca_policy" : {
 - "domain": "measurementsForVfScaling",
 - "metricsPerEventName": [
 - {
 - "eventName": "Measurement_vGMUX",
 - "controlLoopSchemaType": "VNF",
 - "policyScope": "DCAE",
 - "policyName": "DCAE.Config_tca-hi-lo",
 - "policyVersion": "v0.0.1",
 - "thresholds": [
 - {
 - "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
 - "version": "1.0.2",
 - "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
 - "thresholdValue": 0,
 - "direction": "EQUAL",
 - "severity": "MAJOR",
 - "closedLoopEventStatus": "ABATED"
 - },
 - {
 - "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
 - "version": "1.0.2",
 - "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
 - "thresholdValue": 0,
 - "direction": "GREATER",
 - "severity": "CRITICAL",
 - "closedLoopEventStatus": "ONSET"
 - }
 - ]
 - }
 - ]
 - }
 - }
 - }
 + "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
 + "topology_template": {
 + "policies": [
 + {
 + "guard.blacklist.scaleout": {
 + "type": "onap.policies.controlloop.guard.common.Blacklist",
 + "type_version": "6.0.${__threadNum}",
 + "version": "6.0.${__threadNum}",
 + "metadata": {
 + "policy-id": "guard.blacklist.scaleout"
 + },
 + "properties": {
 + "actor": "SO",
 + "operation": "VF Module Create",
 + "id": "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3",
 + "blacklist": [
 + "the-vfmodule-where-root-is-true",
 + "another-vfmodule-where-root-is-true"
 + ]
 + }
 }
 - ]
 - }
 + }
 + ]
 + }
 }</stringProp> <stringProp name="Argument.metadata">=</stringProp> </elementProp> @@ -4834,7 +2408,7 @@ if (prev.getResponseCode() == '200') { <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> <stringProp name="HTTPSampler.protocol">https</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/2.0.0/policies</stringProp> + <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.Blacklist/versions/1.0.0/policies</stringProp> <stringProp name="HTTPSampler.method">POST</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> @@ -4875,62 +2449,194 @@ if (prev.getResponseCode() == '200') { </JSR223Assertion> <hashTree/> </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Create TCA Policy V9" enabled="true"> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Create Policy Native APEX" enabled="true"> <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> <collectionProp name="Arguments.arguments"> <elementProp name="" elementType="HTTPArgument"> <boolProp name="HTTPArgument.always_encode">false</boolProp> <stringProp name="Argument.value">{
 - "tosca_definitions_version": "tosca_simple_yaml_1_0_0",
 - "topology_template": {
 - "policies": [
 - {
 - "onap.restart.tca": {
 - "type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
 - "version": "9.0.0",
 - "type_version": "2.0.0",
 - "metadata": {
 - "policy-id": "onap.restart.tca"
 - },
 - "properties": {
 - "tca_policy" : {
 - "domain": "measurementsForVfScaling",
 - "metricsPerEventName": [
 - {
 - "eventName": "Measurement_vGMUX",
 - "controlLoopSchemaType": "VNF",
 - "policyScope": "DCAE",
 - "policyName": "DCAE.Config_tca-hi-lo",
 - "policyVersion": "v0.0.1",
 - "thresholds": [
 - {
 - "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
 - "version": "1.0.2",
 - "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
 - "thresholdValue": 0,
 - "direction": "EQUAL",
 - "severity": "MAJOR",
 - "closedLoopEventStatus": "ABATED"
 - },
 - {
 - "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
 - "version": "1.0.2",
 - "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
 - "thresholdValue": 0,
 - "direction": "GREATER",
 - "severity": "CRITICAL",
 - "closedLoopEventStatus": "ONSET"
 - }
 - ]
 - }
 - ]
 + "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
 + "topology_template": {
 + "policies": [
 + {
 + "operational.apex.vCPE": {
 + "type": "onap.policies.native.Apex",
 + "type_version": "6.0.${__threadNum}",
 + "derived_from": "tosca.policies.Root",
 + "name": "operational.apex.vCPE",
 + "version": "6.0.${__threadNum}",
 + "properties": {
 + "engineServiceParameters": {
 + "name": "MyApexEngine",
 + "version": "0.0.1",
 + "id": 45,
 + "instanceCount": 4,
 + "deploymentPort": 12561,
 + "policy_type_impl": {
 + },
 + "engineParameters": {
 + "executorParameters": {
 + "JAVASCRIPT": {
 + "parameterClassName": "org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters"
 + }
 + },
 + "contextParameters": {
 + "parameterClassName": "org.onap.policy.apex.context.parameters.ContextParameters",
 + "schemaParameters": {
 + "Avro": {
 + "parameterClassName": "org.onap.policy.apex.plugins.context.schema.avro.AvroSchemaHelperParameters"
 + },
 + "Java": {
 + "parameterClassName": "org.onap.policy.apex.context.impl.schema.java.JavaSchemaHelperParameters",
 + "jsonAdapters": {
 + "Instant": {
 + "adaptedClass": "java.time.Instant",
 + "adaptorClass": "org.onap.policy.controlloop.util.Serialization$GsonInstantAdapter"
 }
 + }
 }
 + }
 + },
 + "taskParameters": [
 + {
 + "key": "ParameterKey1",
 + "value": "ParameterValue1"
 + },
 + {
 + "taskId": "AAILookupTask:0.0.1",
 + "key": "SomeKeyForThisTask",
 + "value": "Value"
 + }
 + ]
 + }
 + },
 + "eventInputParameters": {
 + "GuardRequestorConsumer": {
 + "carrierTechnologyParameters": {
 + "carrierTechnology": "RESTREQUESTOR",
 + "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters",
 + "parameters": {
 + "url": "http://111.222.333.444:5555/pdp/api/getDecision",
 + "httpMethod": "POST",
 + "restRequestTimeout": 2000,
 + "httpHeader": "Authorization:aaaaaaaaa== ClientAuth:bbbbbbbbb="
 + }
 + },
 + "eventProtocolParameters": {
 + "eventProtocol": "JSON"
 + },
 + "eventName": "GuardResponseEvent",
 + "eventNameFilter": "GuardResponseEvent",
 + "requestorMode": true,
 + "requestorPeer": "GuardRequestorProducer",
 + "requestorTimeout": 500
 + },
 + "DCAEConsumer": {
 + "carrierTechnologyParameters": {
 + "carrierTechnology": "RESTCLIENT",
 + "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
 + "parameters": {
 + "url": "http://message-router:3904/events/unauthenticated.DCAE_CL_OUTPUT/APEX/1?timeout=60000"
 + }
 + },
 + "eventProtocolParameters": {
 + "eventProtocol": "JSON",
 + "parameters": {
 + "nameAlias": "closedLoopControlName",
 + "versionAlias": "version",
 + "sourceAlias": "from",
 + "pojoField": "VirtualControlLoopEvent"
 + }
 + },
 + "eventName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e"
 + },
 + "APPCConsumer": {
 + "carrierTechnologyParameters": {
 + "carrierTechnology": "RESTCLIENT",
 + "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
 + "parameters": {
 + "url": "http://message-router:3904/events/APPC-LCM-WRITE/APEX/1?timeout=60000"
 + }
 + },
 + "eventProtocolParameters": {
 + "eventProtocol": "JSON",
 + "parameters": {
 + "versionAlias": "version",
 + "pojoField": "APPCLCMResponseEvent"
 + }
 + },
 + "eventName": "APPCRestartVNFResponseEvent",
 + "eventNameFilter": "APPCRestartVNFResponseEvent"
 + }
 + },
 + "eventOutputParameters": {
 + "logProducer": {
 + "carrierTechnologyParameters": {
 + "carrierTechnology": "FILE",
 + "parameters": {
 + "fileName": "/tmp/VCPEEventsOut.json"
 + }
 + },
 + "eventProtocolParameters": {
 + "eventProtocol": "JSON"
 }
 + },
 + "GuardRequestorProducer": {
 + "carrierTechnologyParameters": {
 + "carrierTechnology": "RESTREQUESTOR",
 + "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters"
 + },
 + "eventProtocolParameters": {
 + "eventProtocol": "JSON"
 + },
 + "eventNameFilter": "GuardRequestEvent",
 + "requestorMode": true,
 + "requestorPeer": "GuardRequestorConsumer",
 + "requestorTimeout": 500
 + },
 + "APPCProducer": {
 + "carrierTechnologyParameters": {
 + "carrierTechnology": "RESTCLIENT",
 + "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
 + "parameters": {
 + "url": "http://message-router:3904/events/APPC-LCM-READ"
 + }
 + },
 + "eventProtocolParameters": {
 + "eventProtocol": "JSON",
 + "parameters": {
 + "versionAlias": "version",
 + "sourceAlias": "from",
 + "pojoField": "APPCLCMRequestEvent"
 + }
 + },
 + "eventNameFilter": "APPCRestartVNFRequestEvent"
 + },
 + "PolicyLogProducer": {
 + "carrierTechnologyParameters": {
 + "carrierTechnology": "RESTCLIENT",
 + "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
 + "parameters": {
 + "url": "http://message-router:3904/events/POLICY-CL-MGT"
 + }
 + },
 + "eventProtocolParameters": {
 + "eventProtocol": "JSON",
 + "parameters": {
 + "versionAlias": "version",
 + "sourceAlias": "from",
 + "pojoField": "VirtualControlLoopNotification"
 + }
 + },
 + "eventNameFilter": "ControlLoopLogEvent"
 + }
 }
 - ]
 - }
 + }
 + }
 + }
 + ]
 + }
 }</stringProp> <stringProp name="Argument.metadata">=</stringProp> </elementProp> @@ -4940,7 +2646,7 @@ if (prev.getResponseCode() == '200') { <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> <stringProp name="HTTPSampler.protocol">https</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/2.0.0/policies</stringProp> + <stringProp name="HTTPSampler.path">/policy/api/v1/policies</stringProp> <stringProp name="HTTPSampler.method">POST</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> @@ -4981,56 +2687,33 @@ if (prev.getResponseCode() == '200') { </JSR223Assertion> <hashTree/> </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Create TCA Policy V10" enabled="true"> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Create Policy Native Drools" enabled="true"> <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> <collectionProp name="Arguments.arguments"> <elementProp name="" elementType="HTTPArgument"> <boolProp name="HTTPArgument.always_encode">false</boolProp> <stringProp name="Argument.value">{
 - "tosca_definitions_version": "tosca_simple_yaml_1_0_0",
 + "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
 "topology_template": {
 "policies": [
 {
 - "onap.restart.tca": {
 - "type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
 - "version": "10.0.0",
 - "type_version": "2.0.0",
 + "usecases.artifacts": {
 + "type": "onap.policies.native.drools.Artifact",
 + "type_version": "6.0.${__threadNum}",
 + "name": "usecases.artifacts",
 + "version": "6.0.${__threadNum}",
 "metadata": {
 - "policy-id": "onap.restart.tca"
 + "policy-id": "usecases.artifacts"
 },
 "properties": {
 - "tca_policy" : {
 - "domain": "measurementsForVfScaling",
 - "metricsPerEventName": [
 - {
 - "eventName": "Measurement_vGMUX",
 - "controlLoopSchemaType": "VNF",
 - "policyScope": "DCAE",
 - "policyName": "DCAE.Config_tca-hi-lo",
 - "policyVersion": "v0.0.1",
 - "thresholds": [
 - {
 - "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
 - "version": "1.0.2",
 - "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
 - "thresholdValue": 0,
 - "direction": "EQUAL",
 - "severity": "MAJOR",
 - "closedLoopEventStatus": "ABATED"
 - },
 - {
 - "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
 - "version": "1.0.2",
 - "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
 - "thresholdValue": 0,
 - "direction": "GREATER",
 - "severity": "CRITICAL",
 - "closedLoopEventStatus": "ONSET"
 - }
 - ]
 - }
 - ]
 + "rulesArtifact": {
 + "groupId": "org.onap.policy.drools-applications.controlloop.common",
 + "artifactId": "controller-usecases",
 + "version": "1.6.1"
 + },
 + "controller": {
 + "name": "frankfurt"
 }
 }
 }
 @@ -5046,7 +2729,7 @@ if (prev.getResponseCode() == '200') { <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> <stringProp name="HTTPSampler.protocol">https</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/2.0.0/policies</stringProp> + <stringProp name="HTTPSampler.path">/policy/api/v1/policies</stringProp> <stringProp name="HTTPSampler.method">POST</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> @@ -5087,26 +2770,26 @@ if (prev.getResponseCode() == '200') { </JSR223Assertion> <hashTree/> </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Create TCA Policy V11" enabled="true"> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Create Policy Native XACML" enabled="true"> <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> <collectionProp name="Arguments.arguments"> <elementProp name="" elementType="HTTPArgument"> <boolProp name="HTTPArgument.always_encode">false</boolProp> <stringProp name="Argument.value">{
 - "tosca_definitions_version": "tosca_simple_yaml_1_0_0",
 + "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
 "topology_template": {
 "policies": [
 {
 - "onap.restart.tca": {
 - "type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
 - "version": "11.0.0",
 - "type_version": "2.0.0",
 + "onap.policies.native.xacml.NativeXacmlPolicy": {
 + "type": "onap.policies.native.Xacml",
 + "type_version": "6.0.${__threadNum}",
 + "version": "6.0.${__threadNum}",
 "metadata": {
 - "policy-id": "onap.restart.tca"
 + "policy-id": "onap.policies.native.xacml.NativeXacmlPolicy"
 },
 "properties": {
 - "tca_policy" : {
 + "tca_policy": {
 "domain": "measurementsForVfScaling",
 "metricsPerEventName": [
 {
 @@ -5193,556 +2876,6 @@ if (prev.getResponseCode() == '200') { </JSR223Assertion> <hashTree/> </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Simple Create TCA Policies" enabled="true"> - <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> - <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> - <collectionProp name="Arguments.arguments"> - <elementProp name="" elementType="HTTPArgument"> - <boolProp name="HTTPArgument.always_encode">false</boolProp> - <stringProp name="Argument.value">{
 - "tosca_definitions_version": "tosca_simple_yaml_1_0_0",
 - "topology_template": {
 - "policies": [
 - {
 - "onap.restart.tca": {
 - "type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
 - "version": "1.0.0",
 - "type_version": "2.0.0",
 - "metadata": {
 - "policy-id": "onap.restart.tca"
 - },
 - "properties": {
 - "tca_policy": {
 - "domain": "measurementsForVfScaling",
 - "metricsPerEventName": [
 - {
 - "eventName": "Measurement_vGMUX",
 - "controlLoopSchemaType": "VNF",
 - "policyScope": "DCAE",
 - "policyName": "DCAE.Config_tca-hi-lo",
 - "policyVersion": "v0.0.1",
 - "thresholds": [
 - {
 - "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
 - "version": "1.0.2",
 - "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
 - "thresholdValue": 0,
 - "direction": "EQUAL",
 - "severity": "MAJOR",
 - "closedLoopEventStatus": "ABATED"
 - },
 - {
 - "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
 - "version": "1.0.2",
 - "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
 - "thresholdValue": 0,
 - "direction": "GREATER",
 - "severity": "CRITICAL",
 - "closedLoopEventStatus": "ONSET"
 - }
 - ]
 - }
 - ]
 - }
 - }
 - }
 - },
 - {
 - "onap.restart.tca": {
 - "type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
 - "version": "2.0.0",
 - "type_version": "2.0.0",
 - "metadata": {
 - "policy-id": "onap.restart.tca"
 - },
 - "properties": {
 - "tca_policy": {
 - "domain": "measurementsForVfScaling",
 - "metricsPerEventName": [
 - {
 - "eventName": "Measurement_vGMUX",
 - "controlLoopSchemaType": "VNF",
 - "policyScope": "DCAE",
 - "policyName": "DCAE.Config_tca-hi-lo",
 - "policyVersion": "v0.0.1",
 - "thresholds": [
 - {
 - "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
 - "version": "1.0.2",
 - "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
 - "thresholdValue": 0,
 - "direction": "EQUAL",
 - "severity": "MAJOR",
 - "closedLoopEventStatus": "ABATED"
 - },
 - {
 - "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
 - "version": "1.0.2",
 - "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
 - "thresholdValue": 0,
 - "direction": "GREATER",
 - "severity": "CRITICAL",
 - "closedLoopEventStatus": "ONSET"
 - }
 - ]
 - }
 - ]
 - }
 - }
 - }
 - },
 - {
 - "onap.restart.tca": {
 - "type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
 - "version": "3.0.0",
 - "type_version": "2.0.0",
 - "metadata": {
 - "policy-id": "onap.restart.tca"
 - },
 - "properties": {
 - "tca_policy": {
 - "domain": "measurementsForVfScaling",
 - "metricsPerEventName": [
 - {
 - "eventName": "Measurement_vGMUX",
 - "controlLoopSchemaType": "VNF",
 - "policyScope": "DCAE",
 - "policyName": "DCAE.Config_tca-hi-lo",
 - "policyVersion": "v0.0.1",
 - "thresholds": [
 - {
 - "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
 - "version": "1.0.2",
 - "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
 - "thresholdValue": 0,
 - "direction": "EQUAL",
 - "severity": "MAJOR",
 - "closedLoopEventStatus": "ABATED"
 - },
 - {
 - "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
 - "version": "1.0.2",
 - "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
 - "thresholdValue": 0,
 - "direction": "GREATER",
 - "severity": "CRITICAL",
 - "closedLoopEventStatus": "ONSET"
 - }
 - ]
 - }
 - ]
 - }
 - }
 - }
 - },
 - {
 - "onap.restart.tca": {
 - "type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
 - "version": "4.0.0",
 - "type_version": "2.0.0",
 - "metadata": {
 - "policy-id": "onap.restart.tca"
 - },
 - "properties": {
 - "tca_policy": {
 - "domain": "measurementsForVfScaling",
 - "metricsPerEventName": [
 - {
 - "eventName": "Measurement_vGMUX",
 - "controlLoopSchemaType": "VNF",
 - "policyScope": "DCAE",
 - "policyName": "DCAE.Config_tca-hi-lo",
 - "policyVersion": "v0.0.1",
 - "thresholds": [
 - {
 - "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
 - "version": "1.0.2",
 - "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
 - "thresholdValue": 0,
 - "direction": "EQUAL",
 - "severity": "MAJOR",
 - "closedLoopEventStatus": "ABATED"
 - },
 - {
 - "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
 - "version": "1.0.2",
 - "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
 - "thresholdValue": 0,
 - "direction": "GREATER",
 - "severity": "CRITICAL",
 - "closedLoopEventStatus": "ONSET"
 - }
 - ]
 - }
 - ]
 - }
 - }
 - }
 - },
 - {
 - "onap.restart.tca": {
 - "type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
 - "version": "5.0.0",
 - "type_version": "2.0.0",
 - "metadata": {
 - "policy-id": "onap.restart.tca"
 - },
 - "properties": {
 - "tca_policy": {
 - "domain": "measurementsForVfScaling",
 - "metricsPerEventName": [
 - {
 - "eventName": "Measurement_vGMUX",
 - "controlLoopSchemaType": "VNF",
 - "policyScope": "DCAE",
 - "policyName": "DCAE.Config_tca-hi-lo",
 - "policyVersion": "v0.0.1",
 - "thresholds": [
 - {
 - "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
 - "version": "1.0.2",
 - "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
 - "thresholdValue": 0,
 - "direction": "EQUAL",
 - "severity": "MAJOR",
 - "closedLoopEventStatus": "ABATED"
 - },
 - {
 - "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
 - "version": "1.0.2",
 - "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
 - "thresholdValue": 0,
 - "direction": "GREATER",
 - "severity": "CRITICAL",
 - "closedLoopEventStatus": "ONSET"
 - }
 - ]
 - }
 - ]
 - }
 - }
 - }
 - },
 - {
 - "onap.restart.tca": {
 - "type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
 - "version": "6.0.0",
 - "type_version": "2.0.0",
 - "metadata": {
 - "policy-id": "onap.restart.tca"
 - },
 - "properties": {
 - "tca_policy": {
 - "domain": "measurementsForVfScaling",
 - "metricsPerEventName": [
 - {
 - "eventName": "Measurement_vGMUX",
 - "controlLoopSchemaType": "VNF",
 - "policyScope": "DCAE",
 - "policyName": "DCAE.Config_tca-hi-lo",
 - "policyVersion": "v0.0.1",
 - "thresholds": [
 - {
 - "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
 - "version": "1.0.2",
 - "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
 - "thresholdValue": 0,
 - "direction": "EQUAL",
 - "severity": "MAJOR",
 - "closedLoopEventStatus": "ABATED"
 - },
 - {
 - "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
 - "version": "1.0.2",
 - "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
 - "thresholdValue": 0,
 - "direction": "GREATER",
 - "severity": "CRITICAL",
 - "closedLoopEventStatus": "ONSET"
 - }
 - ]
 - }
 - ]
 - }
 - }
 - }
 - },
 - {
 - "onap.restart.tca": {
 - "type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
 - "version": "7.0.0",
 - "type_version": "2.0.0",
 - "metadata": {
 - "policy-id": "onap.restart.tca"
 - },
 - "properties": {
 - "tca_policy": {
 - "domain": "measurementsForVfScaling",
 - "metricsPerEventName": [
 - {
 - "eventName": "Measurement_vGMUX",
 - "controlLoopSchemaType": "VNF",
 - "policyScope": "DCAE",
 - "policyName": "DCAE.Config_tca-hi-lo",
 - "policyVersion": "v0.0.1",
 - "thresholds": [
 - {
 - "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
 - "version": "1.0.2",
 - "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
 - "thresholdValue": 0,
 - "direction": "EQUAL",
 - "severity": "MAJOR",
 - "closedLoopEventStatus": "ABATED"
 - },
 - {
 - "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
 - "version": "1.0.2",
 - "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
 - "thresholdValue": 0,
 - "direction": "GREATER",
 - "severity": "CRITICAL",
 - "closedLoopEventStatus": "ONSET"
 - }
 - ]
 - }
 - ]
 - }
 - }
 - }
 - },
 - {
 - "onap.restart.tca": {
 - "type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
 - "version": "8.0.0",
 - "type_version": "2.0.0",
 - "metadata": {
 - "policy-id": "onap.restart.tca"
 - },
 - "properties": {
 - "tca_policy": {
 - "domain": "measurementsForVfScaling",
 - "metricsPerEventName": [
 - {
 - "eventName": "Measurement_vGMUX",
 - "controlLoopSchemaType": "VNF",
 - "policyScope": "DCAE",
 - "policyName": "DCAE.Config_tca-hi-lo",
 - "policyVersion": "v0.0.1",
 - "thresholds": [
 - {
 - "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
 - "version": "1.0.2",
 - "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
 - "thresholdValue": 0,
 - "direction": "EQUAL",
 - "severity": "MAJOR",
 - "closedLoopEventStatus": "ABATED"
 - },
 - {
 - "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
 - "version": "1.0.2",
 - "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
 - "thresholdValue": 0,
 - "direction": "GREATER",
 - "severity": "CRITICAL",
 - "closedLoopEventStatus": "ONSET"
 - }
 - ]
 - }
 - ]
 - }
 - }
 - }
 - },
 - {
 - "onap.restart.tca": {
 - "type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
 - "version": "9.0.0",
 - "type_version": "2.0.0",
 - "metadata": {
 - "policy-id": "onap.restart.tca"
 - },
 - "properties": {
 - "tca_policy": {
 - "domain": "measurementsForVfScaling",
 - "metricsPerEventName": [
 - {
 - "eventName": "Measurement_vGMUX",
 - "controlLoopSchemaType": "VNF",
 - "policyScope": "DCAE",
 - "policyName": "DCAE.Config_tca-hi-lo",
 - "policyVersion": "v0.0.1",
 - "thresholds": [
 - {
 - "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
 - "version": "1.0.2",
 - "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
 - "thresholdValue": 0,
 - "direction": "EQUAL",
 - "severity": "MAJOR",
 - "closedLoopEventStatus": "ABATED"
 - },
 - {
 - "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
 - "version": "1.0.2",
 - "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
 - "thresholdValue": 0,
 - "direction": "GREATER",
 - "severity": "CRITICAL",
 - "closedLoopEventStatus": "ONSET"
 - }
 - ]
 - }
 - ]
 - }
 - }
 - }
 - },
 - {
 - "onap.restart.tca": {
 - "type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
 - "version": "10.0.0",
 - "type_version": "2.0.0",
 - "metadata": {
 - "policy-id": "onap.restart.tca"
 - },
 - "properties": {
 - "tca_policy": {
 - "domain": "measurementsForVfScaling",
 - "metricsPerEventName": [
 - {
 - "eventName": "Measurement_vGMUX",
 - "controlLoopSchemaType": "VNF",
 - "policyScope": "DCAE",
 - "policyName": "DCAE.Config_tca-hi-lo",
 - "policyVersion": "v0.0.1",
 - "thresholds": [
 - {
 - "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
 - "version": "1.0.2",
 - "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
 - "thresholdValue": 0,
 - "direction": "EQUAL",
 - "severity": "MAJOR",
 - "closedLoopEventStatus": "ABATED"
 - },
 - {
 - "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
 - "version": "1.0.2",
 - "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
 - "thresholdValue": 0,
 - "direction": "GREATER",
 - "severity": "CRITICAL",
 - "closedLoopEventStatus": "ONSET"
 - }
 - ]
 - }
 - ]
 - }
 - }
 - }
 - },
 - {
 - "onap.restart.tca": {
 - "type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
 - "version": "11.0.0",
 - "type_version": "2.0.0",
 - "metadata": {
 - "policy-id": "onap.restart.tca"
 - },
 - "properties": {
 - "tca_policy": {
 - "domain": "measurementsForVfScaling",
 - "metricsPerEventName": [
 - {
 - "eventName": "Measurement_vGMUX",
 - "controlLoopSchemaType": "VNF",
 - "policyScope": "DCAE",
 - "policyName": "DCAE.Config_tca-hi-lo",
 - "policyVersion": "v0.0.1",
 - "thresholds": [
 - {
 - "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
 - "version": "1.0.2",
 - "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
 - "thresholdValue": 0,
 - "direction": "EQUAL",
 - "severity": "MAJOR",
 - "closedLoopEventStatus": "ABATED"
 - },
 - {
 - "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
 - "version": "1.0.2",
 - "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
 - "thresholdValue": 0,
 - "direction": "GREATER",
 - "severity": "CRITICAL",
 - "closedLoopEventStatus": "ONSET"
 - }
 - ]
 - }
 - ]
 - }
 - }
 - }
 - }
 - ]
 - }
 -}</stringProp> - <stringProp name="Argument.metadata">=</stringProp> - </elementProp> - </collectionProp> - </elementProp> - <stringProp name="HTTPSampler.domain">${API_HOST}</stringProp> - <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> - <stringProp name="HTTPSampler.protocol">https</stringProp> - <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policies</stringProp> - <stringProp name="HTTPSampler.method">POST</stringProp> - <boolProp name="HTTPSampler.follow_redirects">true</boolProp> - <boolProp name="HTTPSampler.auto_redirects">false</boolProp> - <boolProp name="HTTPSampler.use_keepalive">true</boolProp> - <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> - <stringProp name="HTTPSampler.embedded_url_re"></stringProp> - <stringProp name="HTTPSampler.connect_timeout"></stringProp> - <stringProp name="HTTPSampler.response_timeout"></stringProp> - </HTTPSamplerProxy> - <hashTree> - <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true"> - <collectionProp name="Asserion.test_strings"> - <stringProp name="49586">200</stringProp> - </collectionProp> - <stringProp name="Assertion.custom_message"></stringProp> - <stringProp name="Assertion.test_field">Assertion.response_code</stringProp> - <boolProp name="Assertion.assume_success">false</boolProp> - <intProp name="Assertion.test_type">1</intProp> - </ResponseAssertion> - <hashTree/> - <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JSR223 Assertion" enabled="true"> - <stringProp name="scriptLanguage">groovy</stringProp> - <stringProp name="parameters"></stringProp> - <stringProp name="filename"></stringProp> - <stringProp name="cacheKey">true</stringProp> - <stringProp name="script">import groovy.json.JsonSlurper; - -def res = []; -if (prev.getResponseCode() == '200') { - def jsonSlurper = new JsonSlurper(); - res = jsonSlurper.parseText(prev.getResponseDataAsString()); - - assert res instanceof Map; - assert res.topology_template.policies instanceof List; - assert res.topology_template.policies.size == 11; - assert res.topology_template.policies[0] instanceof Map; -}</stringProp> - </JSR223Assertion> - <hashTree/> - </hashTree> - <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true"> - <stringProp name="ConstantTimer.delay">10000</stringProp> - </ConstantTimer> - <hashTree/> <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get All TCA Policies" enabled="true"> <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> <collectionProp name="Arguments.arguments"/> @@ -5751,7 +2884,7 @@ if (prev.getResponseCode() == '200') { <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> <stringProp name="HTTPSampler.protocol">https</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/2.0.0/policies</stringProp> + <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/6.0.${__threadNum}/policies</stringProp> <stringProp name="HTTPSampler.method">GET</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> @@ -5786,17 +2919,17 @@ if (prev.getResponseCode() == '200') { assert res instanceof Map; assert res.topology_template.policies instanceof List; - assert res.topology_template.policies.size == 11; + assert res.topology_template.policies.size > 0 && res.topology_template.policies.size < 10; - def n = 11; - for (i=0; i<n; i++) { + + for (i=0; i<res.topology_template.policies.size; i++) { assert res.topology_template.policies[i] instanceof Map; } }</stringProp> </JSR223Assertion> <hashTree/> </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get All Versions of TCA Policy" enabled="true"> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get All Versions of Monitoring Policy" enabled="true"> <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> <collectionProp name="Arguments.arguments"/> </elementProp> @@ -5804,7 +2937,7 @@ if (prev.getResponseCode() == '200') { <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> <stringProp name="HTTPSampler.protocol">https</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/2.0.0/policies</stringProp> + <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/6.0.${__threadNum}/policies</stringProp> <stringProp name="HTTPSampler.method">GET</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> @@ -5839,17 +2972,17 @@ if (prev.getResponseCode() == '200') { assert res instanceof Map; assert res.topology_template.policies instanceof List; - assert res.topology_template.policies.size == 11; + assert res.topology_template.policies.size > 0 && res.topology_template.policies.size < 6; - def n = 11; - for (i=0; i<n; i++) { + for (i=0; i<res.topology_template.policies.size; i++) { assert res.topology_template.policies[i] instanceof Map; + assert res.topology_template.policies[i].get('onap.restart.tca').version == "6.0.${__threadNum}"; } }</stringProp> </JSR223Assertion> <hashTree/> </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get TCA Policy V1" enabled="true"> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get Policy Monitoring" enabled="true"> <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> <collectionProp name="Arguments.arguments"/> </elementProp> @@ -5857,7 +2990,7 @@ if (prev.getResponseCode() == '200') { <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> <stringProp name="HTTPSampler.protocol">https</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/2.0.0/policies/onap.restart.tca/versions/1.0.0</stringProp> + <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/6.0.${__threadNum}/policies/onap.restart.tca/versions/6.0.${__threadNum}</stringProp> <stringProp name="HTTPSampler.method">GET</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> @@ -5895,12 +3028,12 @@ if (prev.getResponseCode() == '200') { assert res.topology_template.policies.size == 1; assert res.topology_template.policies[0] instanceof Map; - assert res.topology_template.policies [0].get('onap.restart.tca').version == "1.0.0"; + assert res.topology_template.policies [0].get('onap.restart.tca').version == "6.0.${__threadNum}"; }</stringProp> </JSR223Assertion> <hashTree/> </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get TCA Policy V2" enabled="true"> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get Policy Optimization" enabled="true"> <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> <collectionProp name="Arguments.arguments"/> </elementProp> @@ -5908,7 +3041,7 @@ if (prev.getResponseCode() == '200') { <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> <stringProp name="HTTPSampler.protocol">https</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/2.0.0/policies/onap.restart.tca/versions/2.0.0</stringProp> + <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.optimization.resource.AffinityPolicy/versions/6.0.${__threadNum}/policies/OSDF_CASABLANCA.Affinity_Default/versions/6.0.${__threadNum}</stringProp> <stringProp name="HTTPSampler.method">GET</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> @@ -5946,12 +3079,12 @@ if (prev.getResponseCode() == '200') { assert res.topology_template.policies.size == 1; assert res.topology_template.policies[0] instanceof Map; - assert res.topology_template.policies [0].get('onap.restart.tca').version == "2.0.0"; + assert res.topology_template.policies [0].get('OSDF_CASABLANCA.Affinity_Default').version == "6.0.${__threadNum}"; }</stringProp> </JSR223Assertion> <hashTree/> </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get TCA Policy V3" enabled="true"> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get Policy Guard" enabled="true"> <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> <collectionProp name="Arguments.arguments"/> </elementProp> @@ -5959,7 +3092,7 @@ if (prev.getResponseCode() == '200') { <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> <stringProp name="HTTPSampler.protocol">https</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/2.0.0/policies/onap.restart.tca/versions/3.0.0</stringProp> + <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.Blacklist/versions/6.0.${__threadNum}/policies/guard.blacklist.scaleout/versions/6.0.${__threadNum}</stringProp> <stringProp name="HTTPSampler.method">GET</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> @@ -5997,12 +3130,12 @@ if (prev.getResponseCode() == '200') { assert res.topology_template.policies.size == 1; assert res.topology_template.policies[0] instanceof Map; - assert res.topology_template.policies [0].get('onap.restart.tca').version == "3.0.0"; + assert res.topology_template.policies [0].get('guard.blacklist.scaleout').version == "6.0.${__threadNum}"; }</stringProp> </JSR223Assertion> <hashTree/> </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get TCA Policy V4" enabled="true"> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get Policy Native APEX" enabled="true"> <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> <collectionProp name="Arguments.arguments"/> </elementProp> @@ -6010,7 +3143,7 @@ if (prev.getResponseCode() == '200') { <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> <stringProp name="HTTPSampler.protocol">https</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/2.0.0/policies/onap.restart.tca/versions/4.0.0</stringProp> + <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.native.Apex/versions/6.0.${__threadNum}/policies/operational.apex.vCPE/versions/6.0.${__threadNum}</stringProp> <stringProp name="HTTPSampler.method">GET</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> @@ -6048,12 +3181,12 @@ if (prev.getResponseCode() == '200') { assert res.topology_template.policies.size == 1; assert res.topology_template.policies[0] instanceof Map; - assert res.topology_template.policies [0].get('onap.restart.tca').version == "4.0.0"; + assert res.topology_template.policies [0].get('operational.apex.vCPE').version == "6.0.${__threadNum}"; }</stringProp> </JSR223Assertion> <hashTree/> </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get TCA Policy V5" enabled="true"> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get Policy Native Drools" enabled="true"> <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> <collectionProp name="Arguments.arguments"/> </elementProp> @@ -6061,7 +3194,7 @@ if (prev.getResponseCode() == '200') { <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> <stringProp name="HTTPSampler.protocol">https</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/2.0.0/policies/onap.restart.tca/versions/5.0.0</stringProp> + <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.native.drools.Artifact/versions/6.0.${__threadNum}/policies/usecases.artifacts/versions/6.0.${__threadNum}</stringProp> <stringProp name="HTTPSampler.method">GET</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> @@ -6099,12 +3232,12 @@ if (prev.getResponseCode() == '200') { assert res.topology_template.policies.size == 1; assert res.topology_template.policies[0] instanceof Map; - assert res.topology_template.policies [0].get('onap.restart.tca').version == "5.0.0"; + assert res.topology_template.policies [0].get('usecases.artifacts').version == "6.0.${__threadNum}"; }</stringProp> </JSR223Assertion> <hashTree/> </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get TCA Policy V6" enabled="true"> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get Policy Native XACML" enabled="true"> <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> <collectionProp name="Arguments.arguments"/> </elementProp> @@ -6112,7 +3245,7 @@ if (prev.getResponseCode() == '200') { <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> <stringProp name="HTTPSampler.protocol">https</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/2.0.0/policies/onap.restart.tca/versions/6.0.0</stringProp> + <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.native.Xacml/versions/6.0.${__threadNum}/policies/onap.policies.native.xacml.NativeXacmlPolicy/versions/6.0.${__threadNum}</stringProp> <stringProp name="HTTPSampler.method">GET</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> @@ -6150,12 +3283,12 @@ if (prev.getResponseCode() == '200') { assert res.topology_template.policies.size == 1; assert res.topology_template.policies[0] instanceof Map; - assert res.topology_template.policies [0].get('onap.restart.tca').version == "6.0.0"; + assert res.topology_template.policies [0].get('onap.policies.native.xacml.NativeXacmlPolicy').version == "6.0.${__threadNum}"; }</stringProp> </JSR223Assertion> <hashTree/> </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get TCA Policy V7" enabled="true"> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get latest Monitoring Policy" enabled="true"> <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> <collectionProp name="Arguments.arguments"/> </elementProp> @@ -6163,7 +3296,7 @@ if (prev.getResponseCode() == '200') { <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> <stringProp name="HTTPSampler.protocol">https</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/2.0.0/policies/onap.restart.tca/versions/7.0.0</stringProp> + <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/6.0.${__threadNum}/policies/onap.restart.tca/versions/latest</stringProp> <stringProp name="HTTPSampler.method">GET</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> @@ -6201,12 +3334,12 @@ if (prev.getResponseCode() == '200') { assert res.topology_template.policies.size == 1; assert res.topology_template.policies[0] instanceof Map; - assert res.topology_template.policies [0].get('onap.restart.tca').version == "7.0.0"; + assert res.topology_template.policies [0].get('onap.restart.tca').version ==~ /6.0.\d+/; }</stringProp> </JSR223Assertion> <hashTree/> </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get TCA Policy V8" enabled="true"> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Delete Policy Monitoring" enabled="true"> <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> <collectionProp name="Arguments.arguments"/> </elementProp> @@ -6214,8 +3347,8 @@ if (prev.getResponseCode() == '200') { <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> <stringProp name="HTTPSampler.protocol">https</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/2.0.0/policies/onap.restart.tca/versions/8.0.0</stringProp> - <stringProp name="HTTPSampler.method">GET</stringProp> + <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/6.0.${__threadNum}/policies/onap.restart.tca/versions/6.0.${__threadNum}</stringProp> + <stringProp name="HTTPSampler.method">DELETE</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> <boolProp name="HTTPSampler.use_keepalive">true</boolProp> @@ -6250,14 +3383,13 @@ if (prev.getResponseCode() == '200') { assert res instanceof Map; assert res.topology_template.policies instanceof List; assert res.topology_template.policies.size == 1; - assert res.topology_template.policies[0] instanceof Map; - assert res.topology_template.policies [0].get('onap.restart.tca').version == "8.0.0"; + assert res.topology_template.policies[0].get('onap.restart.tca').version == "6.0.${__threadNum}"; }</stringProp> </JSR223Assertion> <hashTree/> </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get TCA Policy V9" enabled="true"> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Delete Policy Monitoring V2" enabled="true"> <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> <collectionProp name="Arguments.arguments"/> </elementProp> @@ -6265,8 +3397,8 @@ if (prev.getResponseCode() == '200') { <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> <stringProp name="HTTPSampler.protocol">https</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/2.0.0/policies/onap.restart.tca/versions/9.0.0</stringProp> - <stringProp name="HTTPSampler.method">GET</stringProp> + <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/6.0.${__threadNum}/policies/onap.restart.tca/versions/7.0.${__threadNum}</stringProp> + <stringProp name="HTTPSampler.method">DELETE</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> <boolProp name="HTTPSampler.use_keepalive">true</boolProp> @@ -6301,14 +3433,13 @@ if (prev.getResponseCode() == '200') { assert res instanceof Map; assert res.topology_template.policies instanceof List; assert res.topology_template.policies.size == 1; - assert res.topology_template.policies[0] instanceof Map; - assert res.topology_template.policies [0].get('onap.restart.tca').version == "9.0.0"; + assert res.topology_template.policies[0].get('onap.restart.tca').version == "7.0.${__threadNum}"; }</stringProp> </JSR223Assertion> <hashTree/> </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get TCA Policy V10" enabled="true"> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Delete Policy Optimization" enabled="true"> <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> <collectionProp name="Arguments.arguments"/> </elementProp> @@ -6316,8 +3447,8 @@ if (prev.getResponseCode() == '200') { <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> <stringProp name="HTTPSampler.protocol">https</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/2.0.0/policies/onap.restart.tca/versions/10.0.0</stringProp> - <stringProp name="HTTPSampler.method">GET</stringProp> + <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.optimization.resource.AffinityPolicy/versions/6.0.${__threadNum}/policies/OSDF_CASABLANCA.Affinity_Default/versions/6.0.${__threadNum}</stringProp> + <stringProp name="HTTPSampler.method">DELETE</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> <boolProp name="HTTPSampler.use_keepalive">true</boolProp> @@ -6352,14 +3483,13 @@ if (prev.getResponseCode() == '200') { assert res instanceof Map; assert res.topology_template.policies instanceof List; assert res.topology_template.policies.size == 1; - assert res.topology_template.policies[0] instanceof Map; - assert res.topology_template.policies [0].get('onap.restart.tca').version == "10.0.0"; + assert res.topology_template.policies[0].get('OSDF_CASABLANCA.Affinity_Default').version == "6.0.${__threadNum}"; }</stringProp> </JSR223Assertion> <hashTree/> </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get TCA Policy V11" enabled="true"> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Delete Policy Guard" enabled="true"> <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> <collectionProp name="Arguments.arguments"/> </elementProp> @@ -6367,8 +3497,8 @@ if (prev.getResponseCode() == '200') { <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> <stringProp name="HTTPSampler.protocol">https</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/2.0.0/policies/onap.restart.tca/versions/11.0.0</stringProp> - <stringProp name="HTTPSampler.method">GET</stringProp> + <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.Blacklist/versions/6.0.${__threadNum}/policies/guard.blacklist.scaleout/versions/6.0.${__threadNum}</stringProp> + <stringProp name="HTTPSampler.method">DELETE</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> <boolProp name="HTTPSampler.use_keepalive">true</boolProp> @@ -6403,14 +3533,13 @@ if (prev.getResponseCode() == '200') { assert res instanceof Map; assert res.topology_template.policies instanceof List; assert res.topology_template.policies.size == 1; - assert res.topology_template.policies[0] instanceof Map; - assert res.topology_template.policies [0].get('onap.restart.tca').version == "11.0.0"; + assert res.topology_template.policies[0].get('guard.blacklist.scaleout').version == "6.0.${__threadNum}"; }</stringProp> </JSR223Assertion> <hashTree/> </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get latest TCA Policy" enabled="true"> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Delete Policy Native APEX" enabled="true"> <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> <collectionProp name="Arguments.arguments"/> </elementProp> @@ -6418,8 +3547,8 @@ if (prev.getResponseCode() == '200') { <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> <stringProp name="HTTPSampler.protocol">https</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/2.0.0/policies/onap.restart.tca/versions/latest</stringProp> - <stringProp name="HTTPSampler.method">GET</stringProp> + <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.native.Apex/versions/6.0.${__threadNum}/policies/operational.apex.vCPE/versions/6.0.${__threadNum}</stringProp> + <stringProp name="HTTPSampler.method">DELETE</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> <boolProp name="HTTPSampler.use_keepalive">true</boolProp> @@ -6454,547 +3583,13 @@ if (prev.getResponseCode() == '200') { assert res instanceof Map; assert res.topology_template.policies instanceof List; assert res.topology_template.policies.size == 1; - assert res.topology_template.policies[0] instanceof Map; - assert res.topology_template.policies [0].get('onap.restart.tca').version == "11.0.0"; -}</stringProp> - </JSR223Assertion> - <hashTree/> - </hashTree> - <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true"> - <stringProp name="ConstantTimer.delay">5000</stringProp> - </ConstantTimer> - <hashTree/> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Create Guard Policy V1" enabled="true"> - <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> - <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> - <collectionProp name="Arguments.arguments"> - <elementProp name="" elementType="HTTPArgument"> - <boolProp name="HTTPArgument.always_encode">false</boolProp> - <stringProp name="Argument.value">{
 - "policy-id" : "guard.frequency.scaleout",
 - "policy-version" : "1",
 - "content" : {
 - "actor": "SO",
 - "recipe": "scaleOut",
 - "targets": ".*",
 - "clname": "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3",
 - "limit": "1",
 - "timeWindow": "10",
 - "timeUnits": "minute",
 - "guardActiveStart": "00:00:01-05:00",
 - "guardActiveEnd": "23:59:59-05:00"
 - }
 -}</stringProp> - <stringProp name="Argument.metadata">=</stringProp> - </elementProp> - </collectionProp> - </elementProp> - <stringProp name="HTTPSampler.domain">${API_HOST}</stringProp> - <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> - <stringProp name="HTTPSampler.protocol">https</stringProp> - <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.controlloop.Guard/versions/1.0.0/policies</stringProp> - <stringProp name="HTTPSampler.method">POST</stringProp> - <boolProp name="HTTPSampler.follow_redirects">true</boolProp> - <boolProp name="HTTPSampler.auto_redirects">false</boolProp> - <boolProp name="HTTPSampler.use_keepalive">true</boolProp> - <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> - <stringProp name="HTTPSampler.embedded_url_re"></stringProp> - <stringProp name="HTTPSampler.connect_timeout"></stringProp> - <stringProp name="HTTPSampler.response_timeout"></stringProp> - </HTTPSamplerProxy> - <hashTree> - <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true"> - <collectionProp name="Asserion.test_strings"> - <stringProp name="49586">200</stringProp> - </collectionProp> - <stringProp name="Assertion.custom_message"></stringProp> - <stringProp name="Assertion.test_field">Assertion.response_code</stringProp> - <boolProp name="Assertion.assume_success">false</boolProp> - <intProp name="Assertion.test_type">1</intProp> - </ResponseAssertion> - <hashTree/> - <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JSR223 Assertion" enabled="true"> - <stringProp name="scriptLanguage">groovy</stringProp> - <stringProp name="parameters"></stringProp> - <stringProp name="filename"></stringProp> - <stringProp name="cacheKey">true</stringProp> - <stringProp name="script">import groovy.json.JsonSlurper; - -def res = []; -if (prev.getResponseCode() == '200') { - def jsonSlurper = new JsonSlurper(); - res = jsonSlurper.parseText(prev.getResponseDataAsString()); - - assert res instanceof Map; - assert res.get('guard.frequency.scaleout').version == "1.0.0"; -}</stringProp> - </JSR223Assertion> - <hashTree/> - </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Create Guard Policy V5" enabled="true"> - <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> - <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> - <collectionProp name="Arguments.arguments"> - <elementProp name="" elementType="HTTPArgument"> - <boolProp name="HTTPArgument.always_encode">false</boolProp> - <stringProp name="Argument.value">{
 - "policy-id" : "guard.frequency.scaleout",
 - "policy-version" : "5",
 - "content" : {
 - "actor": "SO",
 - "recipe": "scaleOut",
 - "targets": ".*",
 - "clname": "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3",
 - "limit": "1",
 - "timeWindow": "10",
 - "timeUnits": "minute",
 - "guardActiveStart": "00:00:01-05:00",
 - "guardActiveEnd": "23:59:59-05:00"
 - }
 -}</stringProp> - <stringProp name="Argument.metadata">=</stringProp> - </elementProp> - </collectionProp> - </elementProp> - <stringProp name="HTTPSampler.domain">${API_HOST}</stringProp> - <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> - <stringProp name="HTTPSampler.protocol">https</stringProp> - <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.controlloop.Guard/versions/1.0.0/policies</stringProp> - <stringProp name="HTTPSampler.method">POST</stringProp> - <boolProp name="HTTPSampler.follow_redirects">true</boolProp> - <boolProp name="HTTPSampler.auto_redirects">false</boolProp> - <boolProp name="HTTPSampler.use_keepalive">true</boolProp> - <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> - <stringProp name="HTTPSampler.embedded_url_re"></stringProp> - <stringProp name="HTTPSampler.connect_timeout"></stringProp> - <stringProp name="HTTPSampler.response_timeout"></stringProp> - </HTTPSamplerProxy> - <hashTree> - <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true"> - <collectionProp name="Asserion.test_strings"> - <stringProp name="49586">200</stringProp> - </collectionProp> - <stringProp name="Assertion.custom_message"></stringProp> - <stringProp name="Assertion.test_field">Assertion.response_code</stringProp> - <boolProp name="Assertion.assume_success">false</boolProp> - <intProp name="Assertion.test_type">1</intProp> - </ResponseAssertion> - <hashTree/> - <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JSR223 Assertion" enabled="true"> - <stringProp name="scriptLanguage">groovy</stringProp> - <stringProp name="parameters"></stringProp> - <stringProp name="filename"></stringProp> - <stringProp name="cacheKey">true</stringProp> - <stringProp name="script">import groovy.json.JsonSlurper; - -def res = []; -if (prev.getResponseCode() == '200') { - def jsonSlurper = new JsonSlurper(); - res = jsonSlurper.parseText(prev.getResponseDataAsString()); - - assert res instanceof Map; - assert res.get('guard.frequency.scaleout').version == "5.0.0"; -}</stringProp> - </JSR223Assertion> - <hashTree/> - </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Create Guard Policy V9" enabled="true"> - <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> - <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> - <collectionProp name="Arguments.arguments"> - <elementProp name="" elementType="HTTPArgument"> - <boolProp name="HTTPArgument.always_encode">false</boolProp> - <stringProp name="Argument.value">{
 - "policy-id" : "guard.frequency.scaleout",
 - "policy-version" : "9",
 - "content" : {
 - "actor": "SO",
 - "recipe": "scaleOut",
 - "targets": ".*",
 - "clname": "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3",
 - "limit": "1",
 - "timeWindow": "10",
 - "timeUnits": "minute",
 - "guardActiveStart": "00:00:01-05:00",
 - "guardActiveEnd": "23:59:59-05:00"
 - }
 -}</stringProp> - <stringProp name="Argument.metadata">=</stringProp> - </elementProp> - </collectionProp> - </elementProp> - <stringProp name="HTTPSampler.domain">${API_HOST}</stringProp> - <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> - <stringProp name="HTTPSampler.protocol">https</stringProp> - <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.controlloop.Guard/versions/1.0.0/policies</stringProp> - <stringProp name="HTTPSampler.method">POST</stringProp> - <boolProp name="HTTPSampler.follow_redirects">true</boolProp> - <boolProp name="HTTPSampler.auto_redirects">false</boolProp> - <boolProp name="HTTPSampler.use_keepalive">true</boolProp> - <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> - <stringProp name="HTTPSampler.embedded_url_re"></stringProp> - <stringProp name="HTTPSampler.connect_timeout"></stringProp> - <stringProp name="HTTPSampler.response_timeout"></stringProp> - </HTTPSamplerProxy> - <hashTree> - <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true"> - <collectionProp name="Asserion.test_strings"> - <stringProp name="49586">200</stringProp> - </collectionProp> - <stringProp name="Assertion.custom_message"></stringProp> - <stringProp name="Assertion.test_field">Assertion.response_code</stringProp> - <boolProp name="Assertion.assume_success">false</boolProp> - <intProp name="Assertion.test_type">1</intProp> - </ResponseAssertion> - <hashTree/> - <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JSR223 Assertion" enabled="true"> - <stringProp name="scriptLanguage">groovy</stringProp> - <stringProp name="parameters"></stringProp> - <stringProp name="filename"></stringProp> - <stringProp name="cacheKey">true</stringProp> - <stringProp name="script">import groovy.json.JsonSlurper; - -def res = []; -if (prev.getResponseCode() == '200') { - def jsonSlurper = new JsonSlurper(); - res = jsonSlurper.parseText(prev.getResponseDataAsString()); - - assert res instanceof Map; - assert res.get('guard.frequency.scaleout').version == "9.0.0"; -}</stringProp> - </JSR223Assertion> - <hashTree/> - </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Create Guard Policy V12" enabled="true"> - <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> - <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> - <collectionProp name="Arguments.arguments"> - <elementProp name="" elementType="HTTPArgument"> - <boolProp name="HTTPArgument.always_encode">false</boolProp> - <stringProp name="Argument.value">{
 - "policy-id" : "guard.frequency.scaleout",
 - "policy-version" : "12",
 - "content" : {
 - "actor": "SO",
 - "recipe": "scaleOut",
 - "targets": ".*",
 - "clname": "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3",
 - "limit": "1",
 - "timeWindow": "10",
 - "timeUnits": "minute",
 - "guardActiveStart": "00:00:01-05:00",
 - "guardActiveEnd": "23:59:59-05:00"
 - }
 -}</stringProp> - <stringProp name="Argument.metadata">=</stringProp> - </elementProp> - </collectionProp> - </elementProp> - <stringProp name="HTTPSampler.domain">${API_HOST}</stringProp> - <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> - <stringProp name="HTTPSampler.protocol">https</stringProp> - <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.controlloop.Guard/versions/1.0.0/policies</stringProp> - <stringProp name="HTTPSampler.method">POST</stringProp> - <boolProp name="HTTPSampler.follow_redirects">true</boolProp> - <boolProp name="HTTPSampler.auto_redirects">false</boolProp> - <boolProp name="HTTPSampler.use_keepalive">true</boolProp> - <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> - <stringProp name="HTTPSampler.embedded_url_re"></stringProp> - <stringProp name="HTTPSampler.connect_timeout"></stringProp> - <stringProp name="HTTPSampler.response_timeout"></stringProp> - </HTTPSamplerProxy> - <hashTree> - <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true"> - <collectionProp name="Asserion.test_strings"> - <stringProp name="49586">200</stringProp> - </collectionProp> - <stringProp name="Assertion.custom_message"></stringProp> - <stringProp name="Assertion.test_field">Assertion.response_code</stringProp> - <boolProp name="Assertion.assume_success">false</boolProp> - <intProp name="Assertion.test_type">1</intProp> - </ResponseAssertion> - <hashTree/> - <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JSR223 Assertion" enabled="true"> - <stringProp name="scriptLanguage">groovy</stringProp> - <stringProp name="parameters"></stringProp> - <stringProp name="filename"></stringProp> - <stringProp name="cacheKey">true</stringProp> - <stringProp name="script">import groovy.json.JsonSlurper; - -def res = []; -if (prev.getResponseCode() == '200') { - def jsonSlurper = new JsonSlurper(); - res = jsonSlurper.parseText(prev.getResponseDataAsString()); - - assert res instanceof Map; - assert res.get('guard.frequency.scaleout').version == "12.0.0"; -}</stringProp> - </JSR223Assertion> - <hashTree/> - </hashTree> - <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true"> - <stringProp name="ConstantTimer.delay">10000</stringProp> - </ConstantTimer> - <hashTree/> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get Guard Policy V1" enabled="true"> - <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> - <collectionProp name="Arguments.arguments"/> - </elementProp> - <stringProp name="HTTPSampler.domain">${API_HOST}</stringProp> - <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> - <stringProp name="HTTPSampler.protocol">https</stringProp> - <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.controlloop.Guard/versions/1.0.0/policies/guard.frequency.scaleout/versions/1</stringProp> - <stringProp name="HTTPSampler.method">GET</stringProp> - <boolProp name="HTTPSampler.follow_redirects">true</boolProp> - <boolProp name="HTTPSampler.auto_redirects">false</boolProp> - <boolProp name="HTTPSampler.use_keepalive">true</boolProp> - <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> - <stringProp name="HTTPSampler.embedded_url_re"></stringProp> - <stringProp name="HTTPSampler.connect_timeout"></stringProp> - <stringProp name="HTTPSampler.response_timeout"></stringProp> - </HTTPSamplerProxy> - <hashTree> - <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true"> - <collectionProp name="Asserion.test_strings"> - <stringProp name="49586">200</stringProp> - </collectionProp> - <stringProp name="Assertion.custom_message"></stringProp> - <stringProp name="Assertion.test_field">Assertion.response_code</stringProp> - <boolProp name="Assertion.assume_success">false</boolProp> - <intProp name="Assertion.test_type">1</intProp> - </ResponseAssertion> - <hashTree/> - <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JSR223 Assertion" enabled="true"> - <stringProp name="scriptLanguage">groovy</stringProp> - <stringProp name="parameters"></stringProp> - <stringProp name="filename"></stringProp> - <stringProp name="cacheKey">true</stringProp> - <stringProp name="script">import groovy.json.JsonSlurper; - -def res = []; -if (prev.getResponseCode() == '200') { - def jsonSlurper = new JsonSlurper(); - res = jsonSlurper.parseText(prev.getResponseDataAsString()); - - assert res instanceof Map; - assert res.get('guard.frequency.scaleout').version == "1.0.0"; -}</stringProp> - </JSR223Assertion> - <hashTree/> - </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get Guard Policy V5" enabled="true"> - <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> - <collectionProp name="Arguments.arguments"/> - </elementProp> - <stringProp name="HTTPSampler.domain">${API_HOST}</stringProp> - <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> - <stringProp name="HTTPSampler.protocol">https</stringProp> - <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.controlloop.Guard/versions/1.0.0/policies/guard.frequency.scaleout/versions/5</stringProp> - <stringProp name="HTTPSampler.method">GET</stringProp> - <boolProp name="HTTPSampler.follow_redirects">true</boolProp> - <boolProp name="HTTPSampler.auto_redirects">false</boolProp> - <boolProp name="HTTPSampler.use_keepalive">true</boolProp> - <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> - <stringProp name="HTTPSampler.embedded_url_re"></stringProp> - <stringProp name="HTTPSampler.connect_timeout"></stringProp> - <stringProp name="HTTPSampler.response_timeout"></stringProp> - </HTTPSamplerProxy> - <hashTree> - <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true"> - <collectionProp name="Asserion.test_strings"> - <stringProp name="49586">200</stringProp> - </collectionProp> - <stringProp name="Assertion.custom_message"></stringProp> - <stringProp name="Assertion.test_field">Assertion.response_code</stringProp> - <boolProp name="Assertion.assume_success">false</boolProp> - <intProp name="Assertion.test_type">1</intProp> - </ResponseAssertion> - <hashTree/> - <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JSR223 Assertion" enabled="true"> - <stringProp name="scriptLanguage">groovy</stringProp> - <stringProp name="parameters"></stringProp> - <stringProp name="filename"></stringProp> - <stringProp name="cacheKey">true</stringProp> - <stringProp name="script">import groovy.json.JsonSlurper; - -def res = []; -if (prev.getResponseCode() == '200') { - def jsonSlurper = new JsonSlurper(); - res = jsonSlurper.parseText(prev.getResponseDataAsString()); - - assert res instanceof Map; - assert res.get('guard.frequency.scaleout').version == "5.0.0"; -}</stringProp> - </JSR223Assertion> - <hashTree/> - </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get Guard Policy V9" enabled="true"> - <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> - <collectionProp name="Arguments.arguments"/> - </elementProp> - <stringProp name="HTTPSampler.domain">${API_HOST}</stringProp> - <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> - <stringProp name="HTTPSampler.protocol">https</stringProp> - <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.controlloop.Guard/versions/1.0.0/policies/guard.frequency.scaleout/versions/9</stringProp> - <stringProp name="HTTPSampler.method">GET</stringProp> - <boolProp name="HTTPSampler.follow_redirects">true</boolProp> - <boolProp name="HTTPSampler.auto_redirects">false</boolProp> - <boolProp name="HTTPSampler.use_keepalive">true</boolProp> - <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> - <stringProp name="HTTPSampler.embedded_url_re"></stringProp> - <stringProp name="HTTPSampler.connect_timeout"></stringProp> - <stringProp name="HTTPSampler.response_timeout"></stringProp> - </HTTPSamplerProxy> - <hashTree> - <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true"> - <collectionProp name="Asserion.test_strings"> - <stringProp name="49586">200</stringProp> - </collectionProp> - <stringProp name="Assertion.custom_message"></stringProp> - <stringProp name="Assertion.test_field">Assertion.response_code</stringProp> - <boolProp name="Assertion.assume_success">false</boolProp> - <intProp name="Assertion.test_type">1</intProp> - </ResponseAssertion> - <hashTree/> - <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JSR223 Assertion" enabled="true"> - <stringProp name="scriptLanguage">groovy</stringProp> - <stringProp name="parameters"></stringProp> - <stringProp name="filename"></stringProp> - <stringProp name="cacheKey">true</stringProp> - <stringProp name="script">import groovy.json.JsonSlurper; - -def res = []; -if (prev.getResponseCode() == '200') { - def jsonSlurper = new JsonSlurper(); - res = jsonSlurper.parseText(prev.getResponseDataAsString()); - - assert res instanceof Map; - assert res.get('guard.frequency.scaleout').version == "9.0.0"; -}</stringProp> - </JSR223Assertion> - <hashTree/> - </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get Guard Policy V12" enabled="true"> - <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> - <collectionProp name="Arguments.arguments"/> - </elementProp> - <stringProp name="HTTPSampler.domain">${API_HOST}</stringProp> - <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> - <stringProp name="HTTPSampler.protocol">https</stringProp> - <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.controlloop.Guard/versions/1.0.0/policies/guard.frequency.scaleout/versions/12</stringProp> - <stringProp name="HTTPSampler.method">GET</stringProp> - <boolProp name="HTTPSampler.follow_redirects">true</boolProp> - <boolProp name="HTTPSampler.auto_redirects">false</boolProp> - <boolProp name="HTTPSampler.use_keepalive">true</boolProp> - <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> - <stringProp name="HTTPSampler.embedded_url_re"></stringProp> - <stringProp name="HTTPSampler.connect_timeout"></stringProp> - <stringProp name="HTTPSampler.response_timeout"></stringProp> - </HTTPSamplerProxy> - <hashTree> - <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true"> - <collectionProp name="Asserion.test_strings"> - <stringProp name="49586">200</stringProp> - </collectionProp> - <stringProp name="Assertion.custom_message"></stringProp> - <stringProp name="Assertion.test_field">Assertion.response_code</stringProp> - <boolProp name="Assertion.assume_success">false</boolProp> - <intProp name="Assertion.test_type">1</intProp> - </ResponseAssertion> - <hashTree/> - <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JSR223 Assertion" enabled="true"> - <stringProp name="scriptLanguage">groovy</stringProp> - <stringProp name="parameters"></stringProp> - <stringProp name="filename"></stringProp> - <stringProp name="cacheKey">true</stringProp> - <stringProp name="script">import groovy.json.JsonSlurper; - -def res = []; -if (prev.getResponseCode() == '200') { - def jsonSlurper = new JsonSlurper(); - res = jsonSlurper.parseText(prev.getResponseDataAsString()); - - assert res instanceof Map; - assert res.get('guard.frequency.scaleout').version == "12.0.0"; -}</stringProp> - </JSR223Assertion> - <hashTree/> - </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get Latest Guard Policy" enabled="true"> - <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> - <collectionProp name="Arguments.arguments"/> - </elementProp> - <stringProp name="HTTPSampler.domain">${API_HOST}</stringProp> - <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> - <stringProp name="HTTPSampler.protocol">https</stringProp> - <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.controlloop.Guard/versions/1.0.0/policies/guard.frequency.scaleout/versions/latest</stringProp> - <stringProp name="HTTPSampler.method">GET</stringProp> - <boolProp name="HTTPSampler.follow_redirects">true</boolProp> - <boolProp name="HTTPSampler.auto_redirects">false</boolProp> - <boolProp name="HTTPSampler.use_keepalive">true</boolProp> - <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> - <stringProp name="HTTPSampler.embedded_url_re"></stringProp> - <stringProp name="HTTPSampler.connect_timeout"></stringProp> - <stringProp name="HTTPSampler.response_timeout"></stringProp> - </HTTPSamplerProxy> - <hashTree> - <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true"> - <collectionProp name="Asserion.test_strings"> - <stringProp name="49586">200</stringProp> - </collectionProp> - <stringProp name="Assertion.custom_message"></stringProp> - <stringProp name="Assertion.test_field">Assertion.response_code</stringProp> - <boolProp name="Assertion.assume_success">false</boolProp> - <intProp name="Assertion.test_type">1</intProp> - </ResponseAssertion> - <hashTree/> - <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JSR223 Assertion" enabled="true"> - <stringProp name="scriptLanguage">groovy</stringProp> - <stringProp name="parameters"></stringProp> - <stringProp name="filename"></stringProp> - <stringProp name="cacheKey">true</stringProp> - <stringProp name="script">import groovy.json.JsonSlurper; - -def res = []; -if (prev.getResponseCode() == '200') { - def jsonSlurper = new JsonSlurper(); - res = jsonSlurper.parseText(prev.getResponseDataAsString()); - - assert res instanceof Map; - assert res.get('guard.frequency.scaleout').version == "12.0.0"; + assert res.topology_template.policies[0].get('operational.apex.vCPE').version == "6.0.${__threadNum}"; }</stringProp> </JSR223Assertion> <hashTree/> </hashTree> - <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true"> - <stringProp name="ConstantTimer.delay">3000</stringProp> - </ConstantTimer> - <hashTree/> - </hashTree> - <PostThreadGroup guiclass="PostThreadGroupGui" testclass="PostThreadGroup" testname="tearDown Thread Group" enabled="true"> - <stringProp name="ThreadGroup.on_sample_error">continue</stringProp> - <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true"> - <boolProp name="LoopController.continue_forever">false</boolProp> - <stringProp name="LoopController.loops">1</stringProp> - </elementProp> - <stringProp name="ThreadGroup.num_threads">1</stringProp> - <stringProp name="ThreadGroup.ramp_time">1</stringProp> - <boolProp name="ThreadGroup.scheduler">false</boolProp> - <stringProp name="ThreadGroup.duration"></stringProp> - <stringProp name="ThreadGroup.delay"></stringProp> - </PostThreadGroup> - <hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Delete TCA Policy Type V2" enabled="true"> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Delete Policy Native Drools" enabled="true"> <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> <collectionProp name="Arguments.arguments"/> </elementProp> @@ -7002,37 +3597,7 @@ if (prev.getResponseCode() == '200') { <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> <stringProp name="HTTPSampler.protocol">https</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/2.0.0</stringProp> - <stringProp name="HTTPSampler.method">DELETE</stringProp> - <boolProp name="HTTPSampler.follow_redirects">true</boolProp> - <boolProp name="HTTPSampler.auto_redirects">false</boolProp> - <boolProp name="HTTPSampler.use_keepalive">true</boolProp> - <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> - <stringProp name="HTTPSampler.embedded_url_re"></stringProp> - <stringProp name="HTTPSampler.connect_timeout"></stringProp> - <stringProp name="HTTPSampler.response_timeout"></stringProp> - </HTTPSamplerProxy> - <hashTree> - <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true"> - <collectionProp name="Asserion.test_strings"> - <stringProp name="51517">409</stringProp> - </collectionProp> - <stringProp name="Assertion.custom_message"></stringProp> - <stringProp name="Assertion.test_field">Assertion.response_code</stringProp> - <boolProp name="Assertion.assume_success">false</boolProp> - <intProp name="Assertion.test_type">1</intProp> - </ResponseAssertion> - <hashTree/> - </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Delete TCA Policy Type V3" enabled="true"> - <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> - <collectionProp name="Arguments.arguments"/> - </elementProp> - <stringProp name="HTTPSampler.domain">${API_HOST}</stringProp> - <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> - <stringProp name="HTTPSampler.protocol">https</stringProp> - <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/3.0.0</stringProp> + <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.native.drools.Artifact/versions/6.0.${__threadNum}/policies/usecases.artifacts/versions/6.0.${__threadNum}</stringProp> <stringProp name="HTTPSampler.method">DELETE</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> @@ -7066,215 +3631,15 @@ if (prev.getResponseCode() == '200') { res = jsonSlurper.parseText(prev.getResponseDataAsString()); assert res instanceof Map; - assert res.policy_types instanceof List; - assert res.policy_types.size == 1; - assert res.policy_types[0] instanceof Map; - assert res.policy_types[0].get('onap.policies.monitoring.cdap.tca.hi.lo.app').version == "3.0.0"; -}</stringProp> - </JSR223Assertion> - <hashTree/> - </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Delete TCA Policy Type V4" enabled="true"> - <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> - <collectionProp name="Arguments.arguments"/> - </elementProp> - <stringProp name="HTTPSampler.domain">${API_HOST}</stringProp> - <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> - <stringProp name="HTTPSampler.protocol">https</stringProp> - <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/4.0.0</stringProp> - <stringProp name="HTTPSampler.method">DELETE</stringProp> - <boolProp name="HTTPSampler.follow_redirects">true</boolProp> - <boolProp name="HTTPSampler.auto_redirects">false</boolProp> - <boolProp name="HTTPSampler.use_keepalive">true</boolProp> - <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> - <stringProp name="HTTPSampler.embedded_url_re"></stringProp> - <stringProp name="HTTPSampler.connect_timeout"></stringProp> - <stringProp name="HTTPSampler.response_timeout"></stringProp> - </HTTPSamplerProxy> - <hashTree> - <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true"> - <collectionProp name="Asserion.test_strings"> - <stringProp name="49586">200</stringProp> - </collectionProp> - <stringProp name="Assertion.custom_message"></stringProp> - <stringProp name="Assertion.test_field">Assertion.response_code</stringProp> - <boolProp name="Assertion.assume_success">false</boolProp> - <intProp name="Assertion.test_type">1</intProp> - </ResponseAssertion> - <hashTree/> - <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JSR223 Assertion" enabled="true"> - <stringProp name="scriptLanguage">groovy</stringProp> - <stringProp name="parameters"></stringProp> - <stringProp name="filename"></stringProp> - <stringProp name="cacheKey">true</stringProp> - <stringProp name="script">import groovy.json.JsonSlurper; - -def res = []; -if (prev.getResponseCode() == '200') { - def jsonSlurper = new JsonSlurper(); - res = jsonSlurper.parseText(prev.getResponseDataAsString()); - - assert res instanceof Map; - assert res.policy_types instanceof List; - assert res.policy_types.size == 1; - assert res.policy_types[0] instanceof Map; - assert res.policy_types[0].get('onap.policies.monitoring.cdap.tca.hi.lo.app').version == "4.0.0"; -}</stringProp> - </JSR223Assertion> - <hashTree/> - </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Delete TCA Policy Type V5" enabled="true"> - <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> - <collectionProp name="Arguments.arguments"/> - </elementProp> - <stringProp name="HTTPSampler.domain">${API_HOST}</stringProp> - <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> - <stringProp name="HTTPSampler.protocol">https</stringProp> - <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/5.0.0</stringProp> - <stringProp name="HTTPSampler.method">DELETE</stringProp> - <boolProp name="HTTPSampler.follow_redirects">true</boolProp> - <boolProp name="HTTPSampler.auto_redirects">false</boolProp> - <boolProp name="HTTPSampler.use_keepalive">true</boolProp> - <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> - <stringProp name="HTTPSampler.embedded_url_re"></stringProp> - <stringProp name="HTTPSampler.connect_timeout"></stringProp> - <stringProp name="HTTPSampler.response_timeout"></stringProp> - </HTTPSamplerProxy> - <hashTree> - <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true"> - <collectionProp name="Asserion.test_strings"> - <stringProp name="49586">200</stringProp> - </collectionProp> - <stringProp name="Assertion.custom_message"></stringProp> - <stringProp name="Assertion.test_field">Assertion.response_code</stringProp> - <boolProp name="Assertion.assume_success">false</boolProp> - <intProp name="Assertion.test_type">1</intProp> - </ResponseAssertion> - <hashTree/> - <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JSR223 Assertion" enabled="true"> - <stringProp name="scriptLanguage">groovy</stringProp> - <stringProp name="parameters"></stringProp> - <stringProp name="filename"></stringProp> - <stringProp name="cacheKey">true</stringProp> - <stringProp name="script">import groovy.json.JsonSlurper; - -def res = []; -if (prev.getResponseCode() == '200') { - def jsonSlurper = new JsonSlurper(); - res = jsonSlurper.parseText(prev.getResponseDataAsString()); - - assert res instanceof Map; - assert res.policy_types instanceof List; - assert res.policy_types.size == 1; - assert res.policy_types[0] instanceof Map; - assert res.policy_types[0].get('onap.policies.monitoring.cdap.tca.hi.lo.app').version == "5.0.0"; -}</stringProp> - </JSR223Assertion> - <hashTree/> - </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Delete TCA Policy Type V6" enabled="true"> - <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> - <collectionProp name="Arguments.arguments"/> - </elementProp> - <stringProp name="HTTPSampler.domain">${API_HOST}</stringProp> - <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> - <stringProp name="HTTPSampler.protocol">https</stringProp> - <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/6.0.0</stringProp> - <stringProp name="HTTPSampler.method">DELETE</stringProp> - <boolProp name="HTTPSampler.follow_redirects">true</boolProp> - <boolProp name="HTTPSampler.auto_redirects">false</boolProp> - <boolProp name="HTTPSampler.use_keepalive">true</boolProp> - <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> - <stringProp name="HTTPSampler.embedded_url_re"></stringProp> - <stringProp name="HTTPSampler.connect_timeout"></stringProp> - <stringProp name="HTTPSampler.response_timeout"></stringProp> - </HTTPSamplerProxy> - <hashTree> - <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true"> - <collectionProp name="Asserion.test_strings"> - <stringProp name="49586">200</stringProp> - </collectionProp> - <stringProp name="Assertion.custom_message"></stringProp> - <stringProp name="Assertion.test_field">Assertion.response_code</stringProp> - <boolProp name="Assertion.assume_success">false</boolProp> - <intProp name="Assertion.test_type">1</intProp> - </ResponseAssertion> - <hashTree/> - <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JSR223 Assertion" enabled="true"> - <stringProp name="scriptLanguage">groovy</stringProp> - <stringProp name="parameters"></stringProp> - <stringProp name="filename"></stringProp> - <stringProp name="cacheKey">true</stringProp> - <stringProp name="script">import groovy.json.JsonSlurper; - -def res = []; -if (prev.getResponseCode() == '200') { - def jsonSlurper = new JsonSlurper(); - res = jsonSlurper.parseText(prev.getResponseDataAsString()); - - assert res instanceof Map; - assert res.policy_types instanceof List; - assert res.policy_types.size == 1; - assert res.policy_types[0] instanceof Map; - assert res.policy_types[0].get('onap.policies.monitoring.cdap.tca.hi.lo.app').version == "6.0.0"; -}</stringProp> - </JSR223Assertion> - <hashTree/> - </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Delete TCA Policy Type V7" enabled="true"> - <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> - <collectionProp name="Arguments.arguments"/> - </elementProp> - <stringProp name="HTTPSampler.domain">${API_HOST}</stringProp> - <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> - <stringProp name="HTTPSampler.protocol">https</stringProp> - <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/7.0.0</stringProp> - <stringProp name="HTTPSampler.method">DELETE</stringProp> - <boolProp name="HTTPSampler.follow_redirects">true</boolProp> - <boolProp name="HTTPSampler.auto_redirects">false</boolProp> - <boolProp name="HTTPSampler.use_keepalive">true</boolProp> - <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> - <stringProp name="HTTPSampler.embedded_url_re"></stringProp> - <stringProp name="HTTPSampler.connect_timeout"></stringProp> - <stringProp name="HTTPSampler.response_timeout"></stringProp> - </HTTPSamplerProxy> - <hashTree> - <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true"> - <collectionProp name="Asserion.test_strings"> - <stringProp name="49586">200</stringProp> - </collectionProp> - <stringProp name="Assertion.custom_message"></stringProp> - <stringProp name="Assertion.test_field">Assertion.response_code</stringProp> - <boolProp name="Assertion.assume_success">false</boolProp> - <intProp name="Assertion.test_type">1</intProp> - </ResponseAssertion> - <hashTree/> - <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JSR223 Assertion" enabled="true"> - <stringProp name="scriptLanguage">groovy</stringProp> - <stringProp name="parameters"></stringProp> - <stringProp name="filename"></stringProp> - <stringProp name="cacheKey">true</stringProp> - <stringProp name="script">import groovy.json.JsonSlurper; - -def res = []; -if (prev.getResponseCode() == '200') { - def jsonSlurper = new JsonSlurper(); - res = jsonSlurper.parseText(prev.getResponseDataAsString()); - - assert res instanceof Map; - assert res.policy_types instanceof List; - assert res.policy_types.size == 1; - assert res.policy_types[0] instanceof Map; - assert res.policy_types[0].get('onap.policies.monitoring.cdap.tca.hi.lo.app').version == "7.0.0"; + assert res.topology_template.policies instanceof List; + assert res.topology_template.policies.size == 1; + assert res.topology_template.policies[0] instanceof Map; + assert res.topology_template.policies[0].get('usecases.artifacts').version == "6.0.${__threadNum}"; }</stringProp> </JSR223Assertion> <hashTree/> </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Delete TCA Policy Type V8" enabled="true"> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Delete Policy Native XACML" enabled="true"> <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> <collectionProp name="Arguments.arguments"/> </elementProp> @@ -7282,7 +3647,7 @@ if (prev.getResponseCode() == '200') { <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> <stringProp name="HTTPSampler.protocol">https</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/8.0.0</stringProp> + <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.native.Xacml/versions/6.0.${__threadNum}/policies/onap.policies.native.xacml.NativeXacmlPolicy/versions/6.0.${__threadNum}</stringProp> <stringProp name="HTTPSampler.method">DELETE</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> @@ -7316,15 +3681,15 @@ if (prev.getResponseCode() == '200') { res = jsonSlurper.parseText(prev.getResponseDataAsString()); assert res instanceof Map; - assert res.policy_types instanceof List; - assert res.policy_types.size == 1; - assert res.policy_types[0] instanceof Map; - assert res.policy_types[0].get('onap.policies.monitoring.cdap.tca.hi.lo.app').version == "8.0.0"; + assert res.topology_template.policies instanceof List; + assert res.topology_template.policies.size == 1; + assert res.topology_template.policies[0] instanceof Map; + assert res.topology_template.policies[0].get('onap.policies.native.xacml.NativeXacmlPolicy').version == "6.0.${__threadNum}"; }</stringProp> </JSR223Assertion> <hashTree/> </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Delete TCA Policy Type V9" enabled="true"> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Delete Policy Type Monitoring" enabled="true"> <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> <collectionProp name="Arguments.arguments"/> </elementProp> @@ -7332,7 +3697,7 @@ if (prev.getResponseCode() == '200') { <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> <stringProp name="HTTPSampler.protocol">https</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/9.0.0</stringProp> + <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/6.0.${__threadNum}</stringProp> <stringProp name="HTTPSampler.method">DELETE</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> @@ -7343,7 +3708,7 @@ if (prev.getResponseCode() == '200') { <stringProp name="HTTPSampler.response_timeout"></stringProp> </HTTPSamplerProxy> <hashTree> - <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true"> + <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="false"> <collectionProp name="Asserion.test_strings"> <stringProp name="49586">200</stringProp> </collectionProp> @@ -7353,7 +3718,7 @@ if (prev.getResponseCode() == '200') { <intProp name="Assertion.test_type">1</intProp> </ResponseAssertion> <hashTree/> - <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JSR223 Assertion" enabled="true"> + <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JSR223 Assertion" enabled="false"> <stringProp name="scriptLanguage">groovy</stringProp> <stringProp name="parameters"></stringProp> <stringProp name="filename"></stringProp> @@ -7361,7 +3726,7 @@ if (prev.getResponseCode() == '200') { <stringProp name="script">import groovy.json.JsonSlurper; def res = []; -if (prev.getResponseCode() == '200') { +if (prev.getResponseCode() == '409') { def jsonSlurper = new JsonSlurper(); res = jsonSlurper.parseText(prev.getResponseDataAsString()); @@ -7369,12 +3734,12 @@ if (prev.getResponseCode() == '200') { assert res.policy_types instanceof List; assert res.policy_types.size == 1; assert res.policy_types[0] instanceof Map; - assert res.policy_types[0].get('onap.policies.monitoring.cdap.tca.hi.lo.app').version == "9.0.0"; -}</stringProp> + assert res.policy_types[0].get('onap.policies.monitoring.cdap.tca.hi.lo.app').version == "6.0.${__threadNum}"; + }</stringProp> </JSR223Assertion> <hashTree/> </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Delete TCA Policy Type V10" enabled="true"> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Delete Policy Type Monitoring V2" enabled="true"> <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> <collectionProp name="Arguments.arguments"/> </elementProp> @@ -7382,7 +3747,7 @@ if (prev.getResponseCode() == '200') { <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> <stringProp name="HTTPSampler.protocol">https</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/10.0.0</stringProp> + <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/7.0.${__threadNum}</stringProp> <stringProp name="HTTPSampler.method">DELETE</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> @@ -7393,7 +3758,7 @@ if (prev.getResponseCode() == '200') { <stringProp name="HTTPSampler.response_timeout"></stringProp> </HTTPSamplerProxy> <hashTree> - <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true"> + <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="false"> <collectionProp name="Asserion.test_strings"> <stringProp name="49586">200</stringProp> </collectionProp> @@ -7403,7 +3768,7 @@ if (prev.getResponseCode() == '200') { <intProp name="Assertion.test_type">1</intProp> </ResponseAssertion> <hashTree/> - <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JSR223 Assertion" enabled="true"> + <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JSR223 Assertion" enabled="false"> <stringProp name="scriptLanguage">groovy</stringProp> <stringProp name="parameters"></stringProp> <stringProp name="filename"></stringProp> @@ -7411,7 +3776,7 @@ if (prev.getResponseCode() == '200') { <stringProp name="script">import groovy.json.JsonSlurper; def res = []; -if (prev.getResponseCode() == '200') { +if (prev.getResponseCode() == '409') { def jsonSlurper = new JsonSlurper(); res = jsonSlurper.parseText(prev.getResponseDataAsString()); @@ -7419,12 +3784,12 @@ if (prev.getResponseCode() == '200') { assert res.policy_types instanceof List; assert res.policy_types.size == 1; assert res.policy_types[0] instanceof Map; - assert res.policy_types[0].get('onap.policies.monitoring.cdap.tca.hi.lo.app').version == "10.0.0"; -}</stringProp> + assert res.policy_types[0].get('onap.policies.monitoring.cdap.tca.hi.lo.app').version == "7.0.${__threadNum}"; + }</stringProp> </JSR223Assertion> <hashTree/> </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Delete TCA Policy Type V11" enabled="true"> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Delete Policy Type Optimization" enabled="true"> <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> <collectionProp name="Arguments.arguments"/> </elementProp> @@ -7432,7 +3797,7 @@ if (prev.getResponseCode() == '200') { <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> <stringProp name="HTTPSampler.protocol">https</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/11.0.0</stringProp> + <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.optimization.resource.AffinityPolicy/versions/6.0.${__threadNum}</stringProp> <stringProp name="HTTPSampler.method">DELETE</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> @@ -7461,7 +3826,7 @@ if (prev.getResponseCode() == '200') { <stringProp name="script">import groovy.json.JsonSlurper; def res = []; -if (prev.getResponseCode() == '200') { +if (prev.getResponseCode() == '409') { def jsonSlurper = new JsonSlurper(); res = jsonSlurper.parseText(prev.getResponseDataAsString()); @@ -7469,162 +3834,12 @@ if (prev.getResponseCode() == '200') { assert res.policy_types instanceof List; assert res.policy_types.size == 1; assert res.policy_types[0] instanceof Map; - assert res.policy_types[0].get('onap.policies.monitoring.cdap.tca.hi.lo.app').version == "11.0.0"; -}</stringProp> - </JSR223Assertion> - <hashTree/> - </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Delete TCA Policy V1" enabled="true"> - <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> - <collectionProp name="Arguments.arguments"/> - </elementProp> - <stringProp name="HTTPSampler.domain">${API_HOST}</stringProp> - <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> - <stringProp name="HTTPSampler.protocol">https</stringProp> - <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/2.0.0/policies/onap.restart.tca/versions/1.0.0</stringProp> - <stringProp name="HTTPSampler.method">DELETE</stringProp> - <boolProp name="HTTPSampler.follow_redirects">true</boolProp> - <boolProp name="HTTPSampler.auto_redirects">false</boolProp> - <boolProp name="HTTPSampler.use_keepalive">true</boolProp> - <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> - <stringProp name="HTTPSampler.embedded_url_re"></stringProp> - <stringProp name="HTTPSampler.connect_timeout"></stringProp> - <stringProp name="HTTPSampler.response_timeout"></stringProp> - </HTTPSamplerProxy> - <hashTree> - <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true"> - <collectionProp name="Asserion.test_strings"> - <stringProp name="49586">200</stringProp> - </collectionProp> - <stringProp name="Assertion.custom_message"></stringProp> - <stringProp name="Assertion.test_field">Assertion.response_code</stringProp> - <boolProp name="Assertion.assume_success">false</boolProp> - <intProp name="Assertion.test_type">1</intProp> - </ResponseAssertion> - <hashTree/> - <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JSR223 Assertion" enabled="true"> - <stringProp name="scriptLanguage">groovy</stringProp> - <stringProp name="parameters"></stringProp> - <stringProp name="filename"></stringProp> - <stringProp name="cacheKey">true</stringProp> - <stringProp name="script">import groovy.json.JsonSlurper; - -def res = []; -if (prev.getResponseCode() == '200') { - def jsonSlurper = new JsonSlurper(); - res = jsonSlurper.parseText(prev.getResponseDataAsString()); - - assert res instanceof Map; - assert res.topology_template.policies instanceof List; - assert res.topology_template.policies.size == 1; - assert res.topology_template.policies[0] instanceof Map; - assert res.topology_template.policies[0].get('onap.restart.tca').version == "1.0.0"; -}</stringProp> - </JSR223Assertion> - <hashTree/> - </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Delete TCA Policy V2" enabled="true"> - <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> - <collectionProp name="Arguments.arguments"/> - </elementProp> - <stringProp name="HTTPSampler.domain">${API_HOST}</stringProp> - <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> - <stringProp name="HTTPSampler.protocol">https</stringProp> - <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/2.0.0/policies/onap.restart.tca/versions/2.0.0</stringProp> - <stringProp name="HTTPSampler.method">DELETE</stringProp> - <boolProp name="HTTPSampler.follow_redirects">true</boolProp> - <boolProp name="HTTPSampler.auto_redirects">false</boolProp> - <boolProp name="HTTPSampler.use_keepalive">true</boolProp> - <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> - <stringProp name="HTTPSampler.embedded_url_re"></stringProp> - <stringProp name="HTTPSampler.connect_timeout"></stringProp> - <stringProp name="HTTPSampler.response_timeout"></stringProp> - </HTTPSamplerProxy> - <hashTree> - <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true"> - <collectionProp name="Asserion.test_strings"> - <stringProp name="49586">200</stringProp> - </collectionProp> - <stringProp name="Assertion.custom_message"></stringProp> - <stringProp name="Assertion.test_field">Assertion.response_code</stringProp> - <boolProp name="Assertion.assume_success">false</boolProp> - <intProp name="Assertion.test_type">1</intProp> - </ResponseAssertion> - <hashTree/> - <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JSR223 Assertion" enabled="true"> - <stringProp name="scriptLanguage">groovy</stringProp> - <stringProp name="parameters"></stringProp> - <stringProp name="filename"></stringProp> - <stringProp name="cacheKey">true</stringProp> - <stringProp name="script">import groovy.json.JsonSlurper; - -def res = []; -if (prev.getResponseCode() == '200') { - def jsonSlurper = new JsonSlurper(); - res = jsonSlurper.parseText(prev.getResponseDataAsString()); - - assert res instanceof Map; - assert res.topology_template.policies instanceof List; - assert res.topology_template.policies.size == 1; - assert res.topology_template.policies[0] instanceof Map; - assert res.topology_template.policies[0].get('onap.restart.tca').version == "2.0.0"; -}</stringProp> - </JSR223Assertion> - <hashTree/> - </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Delete TCA Policy V3" enabled="true"> - <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> - <collectionProp name="Arguments.arguments"/> - </elementProp> - <stringProp name="HTTPSampler.domain">${API_HOST}</stringProp> - <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> - <stringProp name="HTTPSampler.protocol">https</stringProp> - <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/2.0.0/policies/onap.restart.tca/versions/3.0.0</stringProp> - <stringProp name="HTTPSampler.method">DELETE</stringProp> - <boolProp name="HTTPSampler.follow_redirects">true</boolProp> - <boolProp name="HTTPSampler.auto_redirects">false</boolProp> - <boolProp name="HTTPSampler.use_keepalive">true</boolProp> - <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> - <stringProp name="HTTPSampler.embedded_url_re"></stringProp> - <stringProp name="HTTPSampler.connect_timeout"></stringProp> - <stringProp name="HTTPSampler.response_timeout"></stringProp> - </HTTPSamplerProxy> - <hashTree> - <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true"> - <collectionProp name="Asserion.test_strings"> - <stringProp name="49586">200</stringProp> - </collectionProp> - <stringProp name="Assertion.custom_message"></stringProp> - <stringProp name="Assertion.test_field">Assertion.response_code</stringProp> - <boolProp name="Assertion.assume_success">false</boolProp> - <intProp name="Assertion.test_type">1</intProp> - </ResponseAssertion> - <hashTree/> - <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JSR223 Assertion" enabled="true"> - <stringProp name="scriptLanguage">groovy</stringProp> - <stringProp name="parameters"></stringProp> - <stringProp name="filename"></stringProp> - <stringProp name="cacheKey">true</stringProp> - <stringProp name="script">import groovy.json.JsonSlurper; - -def res = []; -if (prev.getResponseCode() == '200') { - def jsonSlurper = new JsonSlurper(); - res = jsonSlurper.parseText(prev.getResponseDataAsString()); - - assert res instanceof Map; - assert res.topology_template.policies instanceof List; - assert res.topology_template.policies.size == 1; - assert res.topology_template.policies[0] instanceof Map; - assert res.topology_template.policies[0].get('onap.restart.tca').version == "3.0.0"; -}</stringProp> + assert res.policy_types[0].get('onap.policies.optimization.resource.AffinityPolicy').version == "6.0.${__threadNum}"; + }</stringProp> </JSR223Assertion> <hashTree/> </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Delete TCA Policy V4" enabled="true"> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Delete Policy Type Guard" enabled="true"> <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> <collectionProp name="Arguments.arguments"/> </elementProp> @@ -7632,7 +3847,7 @@ if (prev.getResponseCode() == '200') { <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> <stringProp name="HTTPSampler.protocol">https</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/2.0.0/policies/onap.restart.tca/versions/4.0.0</stringProp> + <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.controlloop.guard.common.Blacklist/versions/6.0.${__threadNum}</stringProp> <stringProp name="HTTPSampler.method">DELETE</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> @@ -7666,15 +3881,13 @@ if (prev.getResponseCode() == '200') { res = jsonSlurper.parseText(prev.getResponseDataAsString()); assert res instanceof Map; - assert res.topology_template.policies instanceof List; - assert res.topology_template.policies.size == 1; - assert res.topology_template.policies[0] instanceof Map; - assert res.topology_template.policies[0].get('onap.restart.tca').version == "4.0.0"; -}</stringProp> + assert res.policy_types instanceof Map; + assert res.policy_types.get('onap.policies.controlloop.guard.common.Blacklist').version == "6.0.${__threadNum}"; + }</stringProp> </JSR223Assertion> <hashTree/> </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Delete TCA Policy V5" enabled="true"> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Delete Policy Type Native APEX" enabled="true"> <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> <collectionProp name="Arguments.arguments"/> </elementProp> @@ -7682,7 +3895,7 @@ if (prev.getResponseCode() == '200') { <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> <stringProp name="HTTPSampler.protocol">https</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/2.0.0/policies/onap.restart.tca/versions/5.0.0</stringProp> + <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.native.Apex/versions/6.0.${__threadNum}</stringProp> <stringProp name="HTTPSampler.method">DELETE</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> @@ -7716,15 +3929,13 @@ if (prev.getResponseCode() == '200') { res = jsonSlurper.parseText(prev.getResponseDataAsString()); assert res instanceof Map; - assert res.topology_template.policies instanceof List; - assert res.topology_template.policies.size == 1; - assert res.topology_template.policies[0] instanceof Map; - assert res.topology_template.policies[0].get('onap.restart.tca').version == "5.0.0"; -}</stringProp> + assert res.policy_types instanceof Map; + assert res.policy_types.get('onap.policies.native.Apex').version == "6.0.${__threadNum}"; + }</stringProp> </JSR223Assertion> <hashTree/> </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Delete TCA Policy V6" enabled="true"> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Delete Policy Type Native Drools Controller" enabled="true"> <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> <collectionProp name="Arguments.arguments"/> </elementProp> @@ -7732,7 +3943,7 @@ if (prev.getResponseCode() == '200') { <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> <stringProp name="HTTPSampler.protocol">https</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/2.0.0/policies/onap.restart.tca/versions/6.0.0</stringProp> + <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.native.drools.Controller/versions/6.0.${__threadNum}</stringProp> <stringProp name="HTTPSampler.method">DELETE</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> @@ -7766,15 +3977,13 @@ if (prev.getResponseCode() == '200') { res = jsonSlurper.parseText(prev.getResponseDataAsString()); assert res instanceof Map; - assert res.topology_template.policies instanceof List; - assert res.topology_template.policies.size == 1; - assert res.topology_template.policies[0] instanceof Map; - assert res.topology_template.policies[0].get('onap.restart.tca').version == "6.0.0"; -}</stringProp> + assert res.policy_types instanceof Map; + assert res.policy_types.get('onap.policies.native.drools.Controller').version == "6.0.${__threadNum}"; + }</stringProp> </JSR223Assertion> <hashTree/> </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Delete TCA Policy V7" enabled="true"> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Delete Policy Type Native Drools Artifact" enabled="true"> <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> <collectionProp name="Arguments.arguments"/> </elementProp> @@ -7782,7 +3991,7 @@ if (prev.getResponseCode() == '200') { <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> <stringProp name="HTTPSampler.protocol">https</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/2.0.0/policies/onap.restart.tca/versions/7.0.0</stringProp> + <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.native.drools.Artifact/versions/6.0.${__threadNum}</stringProp> <stringProp name="HTTPSampler.method">DELETE</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> @@ -7816,15 +4025,13 @@ if (prev.getResponseCode() == '200') { res = jsonSlurper.parseText(prev.getResponseDataAsString()); assert res instanceof Map; - assert res.topology_template.policies instanceof List; - assert res.topology_template.policies.size == 1; - assert res.topology_template.policies[0] instanceof Map; - assert res.topology_template.policies[0].get('onap.restart.tca').version == "7.0.0"; -}</stringProp> + assert res.policy_types instanceof Map; + assert res.policy_types.get('onap.policies.native.drools.Artifact').version == "6.0.${__threadNum}"; + }</stringProp> </JSR223Assertion> <hashTree/> </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Delete TCA Policy V8" enabled="true"> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Delete Policy Type Native XACML" enabled="true"> <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> <collectionProp name="Arguments.arguments"/> </elementProp> @@ -7832,7 +4039,7 @@ if (prev.getResponseCode() == '200') { <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> <stringProp name="HTTPSampler.protocol">https</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/2.0.0/policies/onap.restart.tca/versions/8.0.0</stringProp> + <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.native.Xacml/versions/6.0.${__threadNum}</stringProp> <stringProp name="HTTPSampler.method">DELETE</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> @@ -7866,165 +4073,28 @@ if (prev.getResponseCode() == '200') { res = jsonSlurper.parseText(prev.getResponseDataAsString()); assert res instanceof Map; - assert res.topology_template.policies instanceof List; - assert res.topology_template.policies.size == 1; - assert res.topology_template.policies[0] instanceof Map; - assert res.topology_template.policies[0].get('onap.restart.tca').version == "8.0.0"; -}</stringProp> + assert res.policy_types instanceof Map; + assert res.policy_types.get('onap.policies.native.Xacml').version == "6.0.${__threadNum}"; + }</stringProp> </JSR223Assertion> <hashTree/> </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Delete TCA Policy V9" enabled="true"> - <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> - <collectionProp name="Arguments.arguments"/> - </elementProp> - <stringProp name="HTTPSampler.domain">${API_HOST}</stringProp> - <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> - <stringProp name="HTTPSampler.protocol">https</stringProp> - <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/2.0.0/policies/onap.restart.tca/versions/1.0.0</stringProp> - <stringProp name="HTTPSampler.method">DELETE</stringProp> - <boolProp name="HTTPSampler.follow_redirects">true</boolProp> - <boolProp name="HTTPSampler.auto_redirects">false</boolProp> - <boolProp name="HTTPSampler.use_keepalive">true</boolProp> - <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> - <stringProp name="HTTPSampler.embedded_url_re"></stringProp> - <stringProp name="HTTPSampler.connect_timeout"></stringProp> - <stringProp name="HTTPSampler.response_timeout"></stringProp> - </HTTPSamplerProxy> - <hashTree> - <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true"> - <collectionProp name="Asserion.test_strings"> - <stringProp name="49586">200</stringProp> - </collectionProp> - <stringProp name="Assertion.custom_message"></stringProp> - <stringProp name="Assertion.test_field">Assertion.response_code</stringProp> - <boolProp name="Assertion.assume_success">false</boolProp> - <intProp name="Assertion.test_type">1</intProp> - </ResponseAssertion> - <hashTree/> - <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JSR223 Assertion" enabled="true"> - <stringProp name="scriptLanguage">groovy</stringProp> - <stringProp name="parameters"></stringProp> - <stringProp name="filename"></stringProp> - <stringProp name="cacheKey">true</stringProp> - <stringProp name="script">import groovy.json.JsonSlurper; - -def res = []; -if (prev.getResponseCode() == '200') { - def jsonSlurper = new JsonSlurper(); - res = jsonSlurper.parseText(prev.getResponseDataAsString()); - - assert res instanceof Map; - assert res.topology_template.policies instanceof List; - assert res.topology_template.policies.size == 1; - assert res.topology_template.policies[0] instanceof Map; - assert res.topology_template.policies[0].get('onap.restart.tca').version == "9.0.0"; -}</stringProp> - </JSR223Assertion> - <hashTree/> - </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Delete TCA Policy V10" enabled="true"> - <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> - <collectionProp name="Arguments.arguments"/> - </elementProp> - <stringProp name="HTTPSampler.domain">${API_HOST}</stringProp> - <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> - <stringProp name="HTTPSampler.protocol">https</stringProp> - <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/2.0.0/policies/onap.restart.tca/versions/10.0.0</stringProp> - <stringProp name="HTTPSampler.method">DELETE</stringProp> - <boolProp name="HTTPSampler.follow_redirects">true</boolProp> - <boolProp name="HTTPSampler.auto_redirects">false</boolProp> - <boolProp name="HTTPSampler.use_keepalive">true</boolProp> - <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> - <stringProp name="HTTPSampler.embedded_url_re"></stringProp> - <stringProp name="HTTPSampler.connect_timeout"></stringProp> - <stringProp name="HTTPSampler.response_timeout"></stringProp> - </HTTPSamplerProxy> - <hashTree> - <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true"> - <collectionProp name="Asserion.test_strings"> - <stringProp name="49586">200</stringProp> - </collectionProp> - <stringProp name="Assertion.custom_message"></stringProp> - <stringProp name="Assertion.test_field">Assertion.response_code</stringProp> - <boolProp name="Assertion.assume_success">false</boolProp> - <intProp name="Assertion.test_type">1</intProp> - </ResponseAssertion> - <hashTree/> - <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JSR223 Assertion" enabled="true"> - <stringProp name="scriptLanguage">groovy</stringProp> - <stringProp name="parameters"></stringProp> - <stringProp name="filename"></stringProp> - <stringProp name="cacheKey">true</stringProp> - <stringProp name="script">import groovy.json.JsonSlurper; - -def res = []; -if (prev.getResponseCode() == '200') { - def jsonSlurper = new JsonSlurper(); - res = jsonSlurper.parseText(prev.getResponseDataAsString()); - - assert res instanceof Map; - assert res.topology_template.policies instanceof List; - assert res.topology_template.policies.size == 1; - assert res.topology_template.policies[0] instanceof Map; - assert res.topology_template.policies[0].get('onap.restart.tca').version == "10.0.0"; -}</stringProp> - </JSR223Assertion> - <hashTree/> - </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Delete TCA Policy V11" enabled="true"> - <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> - <collectionProp name="Arguments.arguments"/> - </elementProp> - <stringProp name="HTTPSampler.domain">${API_HOST}</stringProp> - <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> - <stringProp name="HTTPSampler.protocol">https</stringProp> - <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/2.0.0/policies/onap.restart.tca/versions/11.0.0</stringProp> - <stringProp name="HTTPSampler.method">DELETE</stringProp> - <boolProp name="HTTPSampler.follow_redirects">true</boolProp> - <boolProp name="HTTPSampler.auto_redirects">false</boolProp> - <boolProp name="HTTPSampler.use_keepalive">true</boolProp> - <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> - <stringProp name="HTTPSampler.embedded_url_re"></stringProp> - <stringProp name="HTTPSampler.connect_timeout"></stringProp> - <stringProp name="HTTPSampler.response_timeout"></stringProp> - </HTTPSamplerProxy> - <hashTree> - <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true"> - <collectionProp name="Asserion.test_strings"> - <stringProp name="49586">200</stringProp> - </collectionProp> - <stringProp name="Assertion.custom_message"></stringProp> - <stringProp name="Assertion.test_field">Assertion.response_code</stringProp> - <boolProp name="Assertion.assume_success">false</boolProp> - <intProp name="Assertion.test_type">1</intProp> - </ResponseAssertion> - <hashTree/> - <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JSR223 Assertion" enabled="true"> - <stringProp name="scriptLanguage">groovy</stringProp> - <stringProp name="parameters"></stringProp> - <stringProp name="filename"></stringProp> - <stringProp name="cacheKey">true</stringProp> - <stringProp name="script">import groovy.json.JsonSlurper; - -def res = []; -if (prev.getResponseCode() == '200') { - def jsonSlurper = new JsonSlurper(); - res = jsonSlurper.parseText(prev.getResponseDataAsString()); - - assert res instanceof Map; - assert res.topology_template.policies instanceof List; - assert res.topology_template.policies.size == 1; - assert res.topology_template.policies[0] instanceof Map; - assert res.topology_template.policies[0].get('onap.restart.tca').version == "11.0.0"; -}</stringProp> - </JSR223Assertion> - <hashTree/> - </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Delete TCA Policy Type V2" enabled="true"> + </hashTree> + <PostThreadGroup guiclass="PostThreadGroupGui" testclass="PostThreadGroup" testname="tearDown Thread Group" enabled="true"> + <stringProp name="ThreadGroup.on_sample_error">stoptest</stringProp> + <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true"> + <boolProp name="LoopController.continue_forever">false</boolProp> + <stringProp name="LoopController.loops">1</stringProp> + </elementProp> + <stringProp name="ThreadGroup.num_threads">1</stringProp> + <stringProp name="ThreadGroup.ramp_time">1</stringProp> + <boolProp name="ThreadGroup.scheduler">false</boolProp> + <stringProp name="ThreadGroup.duration"></stringProp> + <stringProp name="ThreadGroup.delay"></stringProp> + <boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp> + </PostThreadGroup> + <hashTree> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get Healthcheck" enabled="true"> <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> <collectionProp name="Arguments.arguments"/> </elementProp> @@ -8032,8 +4102,8 @@ if (prev.getResponseCode() == '200') { <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> <stringProp name="HTTPSampler.protocol">https</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/2.0.0</stringProp> - <stringProp name="HTTPSampler.method">DELETE</stringProp> + <stringProp name="HTTPSampler.path">/policy/api/v1/healthcheck</stringProp> + <stringProp name="HTTPSampler.method">GET</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> <boolProp name="HTTPSampler.use_keepalive">true</boolProp> @@ -8054,107 +4124,9 @@ if (prev.getResponseCode() == '200') { </ResponseAssertion> <hashTree/> <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JSR223 Assertion" enabled="true"> - <stringProp name="scriptLanguage">groovy</stringProp> - <stringProp name="parameters"></stringProp> - <stringProp name="filename"></stringProp> <stringProp name="cacheKey">true</stringProp> - <stringProp name="script">import groovy.json.JsonSlurper; - -def res = []; -if (prev.getResponseCode() == '200') { - def jsonSlurper = new JsonSlurper(); - res = jsonSlurper.parseText(prev.getResponseDataAsString()); - - assert res instanceof Map; - assert res.policy_types instanceof List; - assert res.policy_types.size == 1; - assert res.policy_types[0] instanceof Map; - assert res.policy_types[0].get('onap.policies.monitoring.cdap.tca.hi.lo.app').version == "2.0.0"; -}</stringProp> - </JSR223Assertion> - <hashTree/> - </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Delete Guard Policy V1" enabled="true"> - <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> - <collectionProp name="Arguments.arguments"/> - </elementProp> - <stringProp name="HTTPSampler.domain">${API_HOST}</stringProp> - <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> - <stringProp name="HTTPSampler.protocol">https</stringProp> - <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.controlloop.Guard/versions/1.0.0/policies/guard.frequency.scaleout/versions/1</stringProp> - <stringProp name="HTTPSampler.method">DELETE</stringProp> - <boolProp name="HTTPSampler.follow_redirects">true</boolProp> - <boolProp name="HTTPSampler.auto_redirects">false</boolProp> - <boolProp name="HTTPSampler.use_keepalive">true</boolProp> - <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> - <stringProp name="HTTPSampler.embedded_url_re"></stringProp> - <stringProp name="HTTPSampler.connect_timeout"></stringProp> - <stringProp name="HTTPSampler.response_timeout"></stringProp> - </HTTPSamplerProxy> - <hashTree> - <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true"> - <collectionProp name="Asserion.test_strings"> - <stringProp name="49586">200</stringProp> - </collectionProp> - <stringProp name="Assertion.custom_message"></stringProp> - <stringProp name="Assertion.test_field">Assertion.response_code</stringProp> - <boolProp name="Assertion.assume_success">false</boolProp> - <intProp name="Assertion.test_type">1</intProp> - </ResponseAssertion> - <hashTree/> - <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JSR223 Assertion" enabled="true"> - <stringProp name="scriptLanguage">groovy</stringProp> - <stringProp name="parameters"></stringProp> <stringProp name="filename"></stringProp> - <stringProp name="cacheKey">true</stringProp> - <stringProp name="script">import groovy.json.JsonSlurper; - -def res = []; -if (prev.getResponseCode() == '200') { - def jsonSlurper = new JsonSlurper(); - res = jsonSlurper.parseText(prev.getResponseDataAsString()); - - assert res instanceof Map; - assert res.get('guard.frequency.scaleout').version == "1.0.0"; -}</stringProp> - </JSR223Assertion> - <hashTree/> - </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Delete Guard Policy V5" enabled="true"> - <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> - <collectionProp name="Arguments.arguments"/> - </elementProp> - <stringProp name="HTTPSampler.domain">${API_HOST}</stringProp> - <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> - <stringProp name="HTTPSampler.protocol">https</stringProp> - <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.controlloop.Guard/versions/1.0.0/policies/guard.frequency.scaleout/versions/5</stringProp> - <stringProp name="HTTPSampler.method">DELETE</stringProp> - <boolProp name="HTTPSampler.follow_redirects">true</boolProp> - <boolProp name="HTTPSampler.auto_redirects">false</boolProp> - <boolProp name="HTTPSampler.use_keepalive">true</boolProp> - <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> - <stringProp name="HTTPSampler.embedded_url_re"></stringProp> - <stringProp name="HTTPSampler.connect_timeout"></stringProp> - <stringProp name="HTTPSampler.response_timeout"></stringProp> - </HTTPSamplerProxy> - <hashTree> - <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true"> - <collectionProp name="Asserion.test_strings"> - <stringProp name="49586">200</stringProp> - </collectionProp> - <stringProp name="Assertion.custom_message"></stringProp> - <stringProp name="Assertion.test_field">Assertion.response_code</stringProp> - <boolProp name="Assertion.assume_success">false</boolProp> - <intProp name="Assertion.test_type">1</intProp> - </ResponseAssertion> - <hashTree/> - <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JSR223 Assertion" enabled="true"> - <stringProp name="scriptLanguage">groovy</stringProp> <stringProp name="parameters"></stringProp> - <stringProp name="filename"></stringProp> - <stringProp name="cacheKey">true</stringProp> <stringProp name="script">import groovy.json.JsonSlurper; def res = []; @@ -8163,59 +4135,16 @@ if (prev.getResponseCode() == '200') { res = jsonSlurper.parseText(prev.getResponseDataAsString()); assert res instanceof Map; - assert res.get('guard.frequency.scaleout').version == "5.0.0"; + assert res.code == 200; + assert res.name == "Policy API"; + assert res.healthy==true; + assert res.message=="alive"; }</stringProp> - </JSR223Assertion> - <hashTree/> - </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Delete Guard Policy V9" enabled="true"> - <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> - <collectionProp name="Arguments.arguments"/> - </elementProp> - <stringProp name="HTTPSampler.domain">${API_HOST}</stringProp> - <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> - <stringProp name="HTTPSampler.protocol">https</stringProp> - <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.controlloop.Guard/versions/1.0.0/policies/guard.frequency.scaleout/versions/9</stringProp> - <stringProp name="HTTPSampler.method">DELETE</stringProp> - <boolProp name="HTTPSampler.follow_redirects">true</boolProp> - <boolProp name="HTTPSampler.auto_redirects">false</boolProp> - <boolProp name="HTTPSampler.use_keepalive">true</boolProp> - <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> - <stringProp name="HTTPSampler.embedded_url_re"></stringProp> - <stringProp name="HTTPSampler.connect_timeout"></stringProp> - <stringProp name="HTTPSampler.response_timeout"></stringProp> - </HTTPSamplerProxy> - <hashTree> - <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true"> - <collectionProp name="Asserion.test_strings"> - <stringProp name="49586">200</stringProp> - </collectionProp> - <stringProp name="Assertion.custom_message"></stringProp> - <stringProp name="Assertion.test_field">Assertion.response_code</stringProp> - <boolProp name="Assertion.assume_success">false</boolProp> - <intProp name="Assertion.test_type">1</intProp> - </ResponseAssertion> - <hashTree/> - <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JSR223 Assertion" enabled="true"> <stringProp name="scriptLanguage">groovy</stringProp> - <stringProp name="parameters"></stringProp> - <stringProp name="filename"></stringProp> - <stringProp name="cacheKey">true</stringProp> - <stringProp name="script">import groovy.json.JsonSlurper; - -def res = []; -if (prev.getResponseCode() == '200') { - def jsonSlurper = new JsonSlurper(); - res = jsonSlurper.parseText(prev.getResponseDataAsString()); - - assert res instanceof Map; - assert res.get('guard.frequency.scaleout').version == "9.0.0"; -}</stringProp> </JSR223Assertion> <hashTree/> </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Delete Guard Policy V12" enabled="true"> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get Preloaded Policy Types" enabled="true"> <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> <collectionProp name="Arguments.arguments"/> </elementProp> @@ -8223,8 +4152,8 @@ if (prev.getResponseCode() == '200') { <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> <stringProp name="HTTPSampler.protocol">https</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.controlloop.Guard/versions/1.0.0/policies/guard.frequency.scaleout/versions/12</stringProp> - <stringProp name="HTTPSampler.method">DELETE</stringProp> + <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes</stringProp> + <stringProp name="HTTPSampler.method">GET</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> <boolProp name="HTTPSampler.use_keepalive">true</boolProp> @@ -8257,7 +4186,8 @@ if (prev.getResponseCode() == '200') { res = jsonSlurper.parseText(prev.getResponseDataAsString()); assert res instanceof Map; - assert res.get('guard.frequency.scaleout').version == "12.0.0"; + assert res.policy_types instanceof Map; + assert res.policy_types.size() == 35; }</stringProp> </JSR223Assertion> <hashTree/> @@ -8297,7 +4227,7 @@ if (prev.getResponseCode() == '200') { <connectTime>true</connectTime> </value> </objProp> - <stringProp name="filename">/home/ubuntu/s3p/stability.log</stringProp> + <stringProp name="filename">/home/liam/work/WIndriver/summary.log</stringProp> </ResultCollector> <hashTree/> <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true"> @@ -8371,7 +4301,7 @@ if (prev.getResponseCode() == '200') { <connectTime>true</connectTime> </value> </objProp> - <stringProp name="filename">/home/ubuntu/s3p/stability.log</stringProp> + <stringProp name="filename">/home/liam/work/WIndriver/Results.log</stringProp> </ResultCollector> <hashTree/> </hashTree> |