diff options
Diffstat (limited to 'testsuites/stability/src/main')
9 files changed, 8013 insertions, 322 deletions
diff --git a/testsuites/stability/src/main/resources/README.md b/testsuites/stability/src/main/resources/README.md new file mode 100644 index 00000000..50297b45 --- /dev/null +++ b/testsuites/stability/src/main/resources/README.md @@ -0,0 +1,5 @@ +Scripts and corresponding configurations under *apisetup* and *simulatorsetup* are not needed +if stability test is planned to run over ONAP OOM based Policy deployment in lab. + +They are needed only if stability test is planned to run over component level deployment +(i.e. two VMs, one for API while the other for MariaDB).
\ No newline at end of file diff --git a/testsuites/stability/src/main/resources/apisetup/config/api/bin/policy-api.sh b/testsuites/stability/src/main/resources/apisetup/config/api/bin/policy-api.sh new file mode 100644 index 00000000..35463b45 --- /dev/null +++ b/testsuites/stability/src/main/resources/apisetup/config/api/bin/policy-api.sh @@ -0,0 +1,42 @@ +#!/bin/bash +# +# ============LICENSE_START======================================================= +# Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END========================================================= +# + +JAVA_HOME=/usr/lib/jvm/java-1.8-openjdk/ +POLICY_API_HOME=/opt/app/policy/api +KEYSTORE="${POLICY_HOME}/etc/ssl/policy-keystore" +KEYSTORE_PASSWD="Pol1cy_0nap" +TRUSTSTORE="${POLICY_HOME}/etc/ssl/policy-truststore" +TRUSTSTORE_PASSWD="Pol1cy_0nap" + + +if [ "$#" -ge 1 ]; then + CONFIG_FILE=$1 +else + CONFIG_FILE=${CONFIG_FILE} +fi + +if [ -z "$CONFIG_FILE" ]; then + CONFIG_FILE="$POLICY_API_HOME/etc/defaultConfig.json" +fi + +echo "Policy api config file: $CONFIG_FILE" + +$JAVA_HOME/bin/java -cp "$POLICY_API_HOME/etc:$POLICY_API_HOME/lib/*" -Djavax.net.ssl.keyStore="$KEYSTORE" -Djavax.net.ssl.keyStorePassword="$KEYSTORE_PASSWD" -Djavax.net.ssl.trustStore="$TRUSTSTORE" -Djavax.net.ssl.trustStorePassword="$TRUSTSTORE_PASSWD" -Dcom.sun.management.jmxremote.rmi.port=9090 -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=9090 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.local.only=false -Djava.rmi.server.hostname=$API_HOST org.onap.policy.api.main.startstop.Main -c $CONFIG_FILE
\ No newline at end of file diff --git a/testsuites/stability/src/main/resources/apisetup/config/api/etc/defaultConfig.json b/testsuites/stability/src/main/resources/apisetup/config/api/etc/defaultConfig.json new file mode 100644 index 00000000..70dbac36 --- /dev/null +++ b/testsuites/stability/src/main/resources/apisetup/config/api/etc/defaultConfig.json @@ -0,0 +1,20 @@ +{ + "name": "ApiGroup", + "restServerParameters": { + "host": "0.0.0.0", + "port": 6969, + "userName": "healthcheck", + "password": "zb!XztG34", + "https": true, + "aaf": false + }, + "databaseProviderParameters": { + "name": "PolicyProviderParameterGroup", + "implementation": "org.onap.policy.models.provider.impl.DatabasePolicyModelsProviderImpl", + "databaseDriver": "org.mariadb.jdbc.Driver", + "databaseUrl": "jdbc:mariadb://mariadb:3306/policyadmin", + "databaseUser": "policy_user", + "databasePassword": "cG9saWN5X3VzZXI=", + "persistenceUnit": "PolicyMariaDb" + } +}
\ No newline at end of file diff --git a/testsuites/stability/src/main/resources/apisetup/setup_api.sh b/testsuites/stability/src/main/resources/apisetup/setup_api.sh new file mode 100644 index 00000000..3d50501f --- /dev/null +++ b/testsuites/stability/src/main/resources/apisetup/setup_api.sh @@ -0,0 +1,34 @@ +#!/bin/bash +# ============LICENSE_START======================================================= +# Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END========================================================= + +# the directory of the script +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +echo ${DIR} + +if [ "$#" -lt 2 ]; then + echo "API and MariaDB IPs should be passed as two parameters. API IP goes first." + exit 1 +else + API=$1 + echo "API IP: ${API}" + MARIADB=$2 + echo "MariaDB IP: ${MARIADB}" +fi + +docker run -p 9090:9090 -p 6969:6969 -e "API_HOST=${API}" -v ${DIR}/config/api/bin/policy-api.sh:/opt/app/policy/api/bin/policy-api.sh -v ${DIR}/config/api/etc/defaultConfig.json:/opt/app/policy/api/etc/defaultConfig.json --add-host mariadb:${MARIADB} --name policy-api -d --rm nexus3.onap.org:10001/onap/policy-api:2.1.1-SNAPSHOT
\ No newline at end of file diff --git a/testsuites/stability/src/main/resources/simulatorsetup/config/db/db.conf b/testsuites/stability/src/main/resources/simulatorsetup/config/db/db.conf new file mode 100644 index 00000000..97cc8530 --- /dev/null +++ b/testsuites/stability/src/main/resources/simulatorsetup/config/db/db.conf @@ -0,0 +1,16 @@ +# Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +MYSQL_ROOT_PASSWORD=secret +MYSQL_USER=policy_user +MYSQL_PASSWORD=policy_user
\ No newline at end of file diff --git a/testsuites/stability/src/main/resources/simulatorsetup/config/db/db.sh b/testsuites/stability/src/main/resources/simulatorsetup/config/db/db.sh new file mode 100644 index 00000000..92ec09b1 --- /dev/null +++ b/testsuites/stability/src/main/resources/simulatorsetup/config/db/db.sh @@ -0,0 +1,22 @@ +#!/bin/bash -xv +# Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +for db in policyadmin +do + mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "CREATE DATABASE IF NOT EXISTS ${db};" + mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "GRANT ALL PRIVILEGES ON \`${db}\`.* TO '${MYSQL_USER}'@'%' ;" +done + +mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "FLUSH PRIVILEGES;" diff --git a/testsuites/stability/src/main/resources/simulatorsetup/setup_components.sh b/testsuites/stability/src/main/resources/simulatorsetup/setup_components.sh new file mode 100644 index 00000000..1dc6f4fb --- /dev/null +++ b/testsuites/stability/src/main/resources/simulatorsetup/setup_components.sh @@ -0,0 +1,24 @@ +#!/bin/bash +# ============LICENSE_START======================================================= +# Copyright (c) 2019 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END========================================================= + +# the directory of the script +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +echo ${DIR} + +docker run -p 3306:3306 -v ${DIR}/config/db:/docker-entrypoint-initdb.d --name mariadb --env-file ${DIR}/config/db/db.conf -d --rm mariadb:10.2.14 --lower-case-table-names=1 --wait_timeout=28800
\ No newline at end of file diff --git a/testsuites/stability/src/main/resources/testplans/policy_api_stability.jmx b/testsuites/stability/src/main/resources/testplans/policy_api_stability.jmx new file mode 100644 index 00000000..05368f1c --- /dev/null +++ b/testsuites/stability/src/main/resources/testplans/policy_api_stability.jmx @@ -0,0 +1,7850 @@ +<?xml version="1.0" encoding="UTF-8"?> +<jmeterTestPlan version="1.2" properties="5.0" jmeter="5.1.1 r1855137"> + <hashTree> + <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Policy API Stability" enabled="true"> + <stringProp name="TestPlan.comments"></stringProp> + <boolProp name="TestPlan.functional_mode">false</boolProp> + <boolProp name="TestPlan.tearDown_on_shutdown">true</boolProp> + <boolProp name="TestPlan.serialize_threadgroups">false</boolProp> + <elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> + <collectionProp name="Arguments.arguments"> + <elementProp name="API_HOST" elementType="Argument"> + <stringProp name="Argument.name">API_HOST</stringProp> + <stringProp name="Argument.value">10.12.6.151</stringProp> + <stringProp name="Argument.metadata">=</stringProp> + </elementProp> + <elementProp name="API_PORT" elementType="Argument"> + <stringProp name="Argument.name">API_PORT</stringProp> + <stringProp name="Argument.value">6969</stringProp> + <stringProp name="Argument.metadata">=</stringProp> + </elementProp> + </collectionProp> + </elementProp> + <stringProp name="TestPlan.user_define_classpath"></stringProp> + </TestPlan> + <hashTree> + <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}:6969/policy/api/v1</stringProp> + <stringProp name="Authorization.username">healthcheck</stringProp> + <stringProp name="Authorization.password">zb!XztG34</stringProp> + <stringProp name="Authorization.domain"></stringProp> + <stringProp name="Authorization.realm"></stringProp> + </elementProp> + </collectionProp> + <boolProp name="AuthManager.clearEachIteration">true</boolProp> + </AuthManager> + <hashTree/> + <HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true"> + <collectionProp name="HeaderManager.headers"> + <elementProp name="" elementType="Header"> + <stringProp name="Header.name">Accept</stringProp> + <stringProp name="Header.value">application/json</stringProp> + </elementProp> + <elementProp name="" elementType="Header"> + <stringProp name="Header.name">Content-Type</stringProp> + <stringProp name="Header.value">application/json</stringProp> + </elementProp> + </collectionProp> + </HeaderManager> + <hashTree/> + <SetupThreadGroup guiclass="SetupThreadGroupGui" testclass="SetupThreadGroup" testname="setUp 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> + </SetupThreadGroup> + <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> + <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/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> + <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="cacheKey">true</stringProp> + <stringProp name="filename"></stringProp> + <stringProp name="parameters"></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.code == 200; + assert res.name == "Policy API"; + assert res.healthy==true; + assert res.message=="alive"; +}</stringProp> + <stringProp name="scriptLanguage">groovy</stringProp> + </JSR223Assertion> + <hashTree/> + </hashTree> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get Statistics" 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/statistics</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.code == 200; +}</stringProp> + </JSR223Assertion> + <hashTree/> + </hashTree> + <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> + <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">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 == 18; +}</stringProp> + </JSR223Assertion> + <hashTree/> + </hashTree> + </hashTree> + <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="API Test Flow" 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">10000000</stringProp> + </elementProp> + <stringProp name="ThreadGroup.num_threads">5</stringProp> + <stringProp name="ThreadGroup.ramp_time">5</stringProp> + <boolProp name="ThreadGroup.scheduler">true</boolProp> + <stringProp name="ThreadGroup.duration">259200</stringProp> + <stringProp name="ThreadGroup.delay">5</stringProp> + </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> + </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 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",
 + "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": "2.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> + </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"
 + }
 + }
 + }
 + }
 + }
 + ],
 + "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> + </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 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",
 + "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": "4.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> + </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"
 + }
 + }
 + }
 + }
 + }
 + ],
 + "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> + </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 V6" 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"
 + }
 + ]
 + },
 + "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 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"
 + }
 + },
 + {
 + "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"
 + }
 + }
 + }
 + }
 + },
 + {
 + "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 V8" 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"
 + }
 + }
 + }
 + }
 + }
 + ],
 + "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> + </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.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"
 + }
 + }
 + }
 + }
 + }
 + ],
 + "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> + </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 V10" 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": "10.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> + </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 V11" 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"
 + }
 + }
 + }
 + }
 + },
 + {
 + "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> + <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"/> + </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">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 == 28; + + def n = 28; + for (i=0; i<n; i++) { + assert res.policy_types[i] instanceof Map; + } +}</stringProp> + </JSR223Assertion> + <hashTree/> + </hashTree> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get All Versions of TCA 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> + <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</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 == 11; + + def n = 11; + for (i=0; i<n; i++) { + assert res.policy_types[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"> + <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">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 == "5.0.0"; +}</stringProp> + </JSR223Assertion> + <hashTree/> + </hashTree> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get 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">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 == "6.0.0"; +}</stringProp> + </JSR223Assertion> + <hashTree/> + </hashTree> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get 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">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 == "7.0.0"; +}</stringProp> + </JSR223Assertion> + <hashTree/> + </hashTree> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get TCA Policy Type V8" 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/8.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 == "8.0.0"; +}</stringProp> + </JSR223Assertion> + <hashTree/> + </hashTree> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get TCA Policy Type 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/9.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 == "9.0.0"; +}</stringProp> + </JSR223Assertion> + <hashTree/> + </hashTree> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get TCA Policy Type 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/10.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 == "10.0.0"; +}</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"> + <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/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.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">10000</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 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 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",
 + "topology_template": {
 + "policies": [
 + {
 + "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"
 + }
 + ]
 + }
 + ]
 + }
 + }
 + }
 + }
 + ]
 + }
 +}</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 V6" 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": "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"
 + }
 + ]
 + }
 + ]
 + }
 + }
 + }
 + }
 + ]
 + }
 +}</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 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",
 + "topology_template": {
 + "policies": [
 + {
 + "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"
 + }
 + ]
 + }
 + ]
 + }
 + }
 + }
 + }
 + ]
 + }
 +}</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 V8" 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"
 + }
 + ]
 + }
 + ]
 + }
 + }
 + }
 + }
 + ]
 + }
 +}</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 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",
 + "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"
 + }
 + ]
 + }
 + ]
 + }
 + }
 + }
 + }
 + ]
 + }
 +}</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 V10" 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": "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"
 + }
 + ]
 + }
 + ]
 + }
 + }
 + }
 + }
 + ]
 + }
 +}</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 V11" 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": "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/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> + <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"/> + </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">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.topology_template.policies instanceof List; + assert res.topology_template.policies.size == 11; + + def n = 11; + for (i=0; i<n; 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"> + <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</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.topology_template.policies instanceof List; + assert res.topology_template.policies.size == 11; + + def n = 11; + for (i=0; i<n; i++) { + assert res.topology_template.policies[i] instanceof Map; + } +}</stringProp> + </JSR223Assertion> + <hashTree/> + </hashTree> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get 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">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.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="Get 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">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.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="Get 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">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.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> + </JSR223Assertion> + <hashTree/> + </hashTree> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get TCA Policy 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/2.0.0/policies/onap.restart.tca/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.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> + </JSR223Assertion> + <hashTree/> + </hashTree> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get TCA 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.monitoring.cdap.tca.hi.lo.app/versions/2.0.0/policies/onap.restart.tca/versions/5.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.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> + </JSR223Assertion> + <hashTree/> + </hashTree> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get TCA Policy 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/2.0.0/policies/onap.restart.tca/versions/6.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.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> + </JSR223Assertion> + <hashTree/> + </hashTree> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get TCA Policy 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/2.0.0/policies/onap.restart.tca/versions/7.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.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> + </JSR223Assertion> + <hashTree/> + </hashTree> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get TCA Policy V8" 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/8.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.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> + </JSR223Assertion> + <hashTree/> + </hashTree> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get 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/9.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.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="Get 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">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.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="Get 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">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.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="Get latest TCA 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.monitoring.cdap.tca.hi.lo.app/versions/2.0.0/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> + <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> + <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true"> + <stringProp name="ConstantTimer.delay">10000</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"; +}</stringProp> + </JSR223Assertion> + <hashTree/> + </hashTree> + <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true"> + <stringProp name="ConstantTimer.delay">10000</stringProp> + </ConstantTimer> + <hashTree/> + </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> + </PostThreadGroup> + <hashTree> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Delete 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">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/> + <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() == '409') { + def jsonSlurper = new JsonSlurper(); + res = jsonSlurper.parseText(prev.getResponseDataAsString()); + + assert res instanceof Map; + assert res.code == "CONFLICT"; +}</stringProp> + </JSR223Assertion> + <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.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 == "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"; +}</stringProp> + </JSR223Assertion> + <hashTree/> + </hashTree> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Delete TCA Policy Type V8" 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/8.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 == "8.0.0"; +}</stringProp> + </JSR223Assertion> + <hashTree/> + </hashTree> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Delete TCA Policy Type 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/9.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 == "9.0.0"; +}</stringProp> + </JSR223Assertion> + <hashTree/> + </hashTree> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Delete TCA Policy Type 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/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.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> + </JSR223Assertion> + <hashTree/> + </hashTree> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Delete 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">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 == "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> + </JSR223Assertion> + <hashTree/> + </hashTree> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Delete TCA Policy 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/2.0.0/policies/onap.restart.tca/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.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> + </JSR223Assertion> + <hashTree/> + </hashTree> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Delete TCA 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.monitoring.cdap.tca.hi.lo.app/versions/2.0.0/policies/onap.restart.tca/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.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> + </JSR223Assertion> + <hashTree/> + </hashTree> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Delete TCA Policy 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/2.0.0/policies/onap.restart.tca/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.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> + </JSR223Assertion> + <hashTree/> + </hashTree> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Delete TCA Policy 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/2.0.0/policies/onap.restart.tca/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.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> + </JSR223Assertion> + <hashTree/> + </hashTree> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Delete TCA Policy V8" 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/8.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 == "8.0.0"; +}</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"> + <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">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 == "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 = []; +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="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"> + <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">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 == "12.0.0"; +}</stringProp> + </JSR223Assertion> + <hashTree/> + </hashTree> + </hashTree> + <ResultCollector guiclass="SummaryReport" testclass="ResultCollector" testname="Summary Report" enabled="true"> + <boolProp name="ResultCollector.error_logging">false</boolProp> + <objProp> + <name>saveConfig</name> + <value class="SampleSaveConfiguration"> + <time>true</time> + <latency>true</latency> + <timestamp>true</timestamp> + <success>true</success> + <label>true</label> + <code>true</code> + <message>true</message> + <threadName>true</threadName> + <dataType>true</dataType> + <encoding>false</encoding> + <assertions>true</assertions> + <subresults>true</subresults> + <responseData>false</responseData> + <samplerData>false</samplerData> + <xml>false</xml> + <fieldNames>true</fieldNames> + <responseHeaders>false</responseHeaders> + <requestHeaders>false</requestHeaders> + <responseDataOnError>false</responseDataOnError> + <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage> + <assertionsResultsToSave>0</assertionsResultsToSave> + <bytes>true</bytes> + <sentBytes>true</sentBytes> + <url>true</url> + <threadCounts>true</threadCounts> + <idleTime>true</idleTime> + <connectTime>true</connectTime> + </value> + </objProp> + <stringProp name="filename">/home/ubuntu/s3p/stability.log</stringProp> + </ResultCollector> + <hashTree/> + <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true"> + <boolProp name="ResultCollector.error_logging">false</boolProp> + <objProp> + <name>saveConfig</name> + <value class="SampleSaveConfiguration"> + <time>true</time> + <latency>true</latency> + <timestamp>true</timestamp> + <success>true</success> + <label>true</label> + <code>true</code> + <message>true</message> + <threadName>true</threadName> + <dataType>true</dataType> + <encoding>false</encoding> + <assertions>true</assertions> + <subresults>true</subresults> + <responseData>false</responseData> + <samplerData>false</samplerData> + <xml>false</xml> + <fieldNames>true</fieldNames> + <responseHeaders>false</responseHeaders> + <requestHeaders>false</requestHeaders> + <responseDataOnError>false</responseDataOnError> + <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage> + <assertionsResultsToSave>0</assertionsResultsToSave> + <bytes>true</bytes> + <sentBytes>true</sentBytes> + <url>true</url> + <threadCounts>true</threadCounts> + <idleTime>true</idleTime> + <connectTime>true</connectTime> + </value> + </objProp> + <stringProp name="filename">/home/ubuntu/s3p/stability.log</stringProp> + </ResultCollector> + <hashTree/> + <ResultCollector guiclass="TableVisualizer" testclass="ResultCollector" testname="View Results in Table" enabled="true"> + <boolProp name="ResultCollector.error_logging">false</boolProp> + <objProp> + <name>saveConfig</name> + <value class="SampleSaveConfiguration"> + <time>true</time> + <latency>true</latency> + <timestamp>true</timestamp> + <success>true</success> + <label>true</label> + <code>true</code> + <message>true</message> + <threadName>true</threadName> + <dataType>true</dataType> + <encoding>false</encoding> + <assertions>true</assertions> + <subresults>true</subresults> + <responseData>false</responseData> + <samplerData>false</samplerData> + <xml>false</xml> + <fieldNames>true</fieldNames> + <responseHeaders>false</responseHeaders> + <requestHeaders>false</requestHeaders> + <responseDataOnError>false</responseDataOnError> + <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage> + <assertionsResultsToSave>0</assertionsResultsToSave> + <bytes>true</bytes> + <sentBytes>true</sentBytes> + <url>true</url> + <threadCounts>true</threadCounts> + <idleTime>true</idleTime> + <connectTime>true</connectTime> + </value> + </objProp> + <stringProp name="filename">/home/ubuntu/s3p/stability.log</stringProp> + </ResultCollector> + <hashTree/> + </hashTree> + </hashTree> +</jmeterTestPlan> diff --git a/testsuites/stability/src/main/resources/testplans/stability.jmx b/testsuites/stability/src/main/resources/testplans/stability.jmx deleted file mode 100644 index 84095e38..00000000 --- a/testsuites/stability/src/main/resources/testplans/stability.jmx +++ /dev/null @@ -1,322 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - ============LICENSE_START======================================================= - ONAP Policy API - ================================================================================ - Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. - ================================================================================ - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ============LICENSE_END========================================================= - --> -<jmeterTestPlan version="1.2" properties="5.0" jmeter="5.0 r1840935"> - <hashTree> - <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Policy API Stability" enabled="true"> - <stringProp name="TestPlan.comments">Policy API Stability Tests</stringProp> - <boolProp name="TestPlan.functional_mode">false</boolProp> - <boolProp name="TestPlan.tearDown_on_shutdown">true</boolProp> - <boolProp name="TestPlan.serialize_threadgroups">false</boolProp> - <elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> - <collectionProp name="Arguments.arguments"> - <elementProp name="POLICY_API_HOST" elementType="Argument"> - <stringProp name="Argument.name">POLICY_API_HOST</stringProp> - <stringProp name="Argument.value">${__P(host,10.12.6.93)}</stringProp> - <stringProp name="Argument.metadata">=</stringProp> - </elementProp> - <elementProp name="DURATION" elementType="Argument"> - <stringProp name="Argument.name">DURATION</stringProp> - <stringProp name="Argument.value">${__P(duration, 5)}</stringProp> - <stringProp name="Argument.metadata">=</stringProp> - </elementProp> - <elementProp name="USERS" elementType="Argument"> - <stringProp name="Argument.name">USERS</stringProp> - <stringProp name="Argument.value">${__P(users, 1)}</stringProp> - <stringProp name="Argument.metadata">=</stringProp> - </elementProp> - <elementProp name="PORT" elementType="Argument"> - <stringProp name="Argument.name">PORT</stringProp> - <stringProp name="Argument.value">${__P(port, 6969)}</stringProp> - <stringProp name="Argument.metadata">=</stringProp> - </elementProp> - </collectionProp> - </elementProp> - <stringProp name="TestPlan.user_define_classpath"></stringProp> - </TestPlan> - <hashTree> - <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Health Check API" 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> - <intProp name="LoopController.loops">-1</intProp> - </elementProp> - <stringProp name="ThreadGroup.num_threads">${USERS}</stringProp> - <stringProp name="ThreadGroup.ramp_time">1</stringProp> - <boolProp name="ThreadGroup.scheduler">true</boolProp> - <stringProp name="ThreadGroup.duration">${DURATION}</stringProp> - <stringProp name="ThreadGroup.delay">1</stringProp> - </ThreadGroup> - <hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Check Health" 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">${POLICY_API_HOST}</stringProp> - <stringProp name="HTTPSampler.port">6969</stringProp> - <stringProp name="HTTPSampler.protocol">https</stringProp> - <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">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> - <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> - <stringProp name="TestPlan.comments">Basic Health Check</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.code == 200; - assert res.name == "Policy API"; - assert res.healthy==true; - assert res.message=="alive"; - -}</stringProp> - </JSR223Assertion> - <hashTree/> - </hashTree> - <HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true"> - <collectionProp name="HeaderManager.headers"> - <elementProp name="" elementType="Header"> - <stringProp name="Header.name">Accept</stringProp> - <stringProp name="Header.value">application/json</stringProp> - </elementProp> - <elementProp name="" elementType="Header"> - <stringProp name="Header.name">Content-Type</stringProp> - <stringProp name="Header.value">application/json</stringProp> - </elementProp> - </collectionProp> - </HeaderManager> - <hashTree/> - <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://${POLICY_API_HOST}:6969/healthcheck</stringProp> - <stringProp name="Authorization.username">healthcheck</stringProp> - <stringProp name="Authorization.password">zb!XztG34</stringProp> - <stringProp name="Authorization.domain"></stringProp> - <stringProp name="Authorization.realm"></stringProp> - </elementProp> - </collectionProp> - <boolProp name="AuthManager.clearEachIteration">true</boolProp> - </AuthManager> - <hashTree/> - <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true"> - <boolProp name="ResultCollector.error_logging">false</boolProp> - <objProp> - <name>saveConfig</name> - <value class="SampleSaveConfiguration"> - <time>true</time> - <latency>true</latency> - <timestamp>true</timestamp> - <success>true</success> - <label>true</label> - <code>true</code> - <message>true</message> - <threadName>true</threadName> - <dataType>true</dataType> - <encoding>false</encoding> - <assertions>true</assertions> - <subresults>true</subresults> - <responseData>false</responseData> - <samplerData>false</samplerData> - <xml>false</xml> - <fieldNames>true</fieldNames> - <responseHeaders>false</responseHeaders> - <requestHeaders>false</requestHeaders> - <responseDataOnError>false</responseDataOnError> - <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage> - <assertionsResultsToSave>0</assertionsResultsToSave> - <bytes>true</bytes> - <sentBytes>true</sentBytes> - <url>true</url> - <threadCounts>true</threadCounts> - <idleTime>true</idleTime> - <connectTime>true</connectTime> - </value> - </objProp> - <stringProp name="filename"></stringProp> - </ResultCollector> - <hashTree/> - </hashTree> - <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Statistics Check API" 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> - <intProp name="LoopController.loops">-1</intProp> - </elementProp> - <stringProp name="ThreadGroup.num_threads">${USERS}</stringProp> - <stringProp name="ThreadGroup.ramp_time">1</stringProp> - <boolProp name="ThreadGroup.scheduler">true</boolProp> - <stringProp name="ThreadGroup.duration">${DURATION}</stringProp> - <stringProp name="ThreadGroup.delay">1</stringProp> - </ThreadGroup> - <hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Check Statistics API" 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">${POLICY_API_HOST}</stringProp> - <stringProp name="HTTPSampler.port">6969</stringProp> - <stringProp name="HTTPSampler.protocol">https</stringProp> - <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">statistics</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> - <stringProp name="TestPlan.comments">Basic Health Check</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.code == 200; - assert res.totalApiCallCount == 0; - assert res.apiCallSuccessCount==0; - assert res.apiCallFailureCount==0; - assert res.totalPolicyGetCount==0; - assert res.totalPolicyPostCount==0; - assert res.totalTemplateGetCount ==0; - assert res.totalTemplatePostCount==0; - assert res.policyGetSuccessCount==0; - assert res.policyGetFailureCount==0; - - -}</stringProp> - </JSR223Assertion> - <hashTree/> - </hashTree> - <HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true"> - <collectionProp name="HeaderManager.headers"> - <elementProp name="" elementType="Header"> - <stringProp name="Header.name">Accept</stringProp> - <stringProp name="Header.value">application/json</stringProp> - </elementProp> - <elementProp name="" elementType="Header"> - <stringProp name="Header.name">Content-Type</stringProp> - <stringProp name="Header.value">application/json</stringProp> - </elementProp> - </collectionProp> - </HeaderManager> - <hashTree/> - <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://${POLICY_API_HOST}:6969/statistics</stringProp> - <stringProp name="Authorization.username">healthcheck</stringProp> - <stringProp name="Authorization.password">zb!XztG34</stringProp> - <stringProp name="Authorization.domain"></stringProp> - <stringProp name="Authorization.realm"></stringProp> - </elementProp> - </collectionProp> - <boolProp name="AuthManager.clearEachIteration">true</boolProp> - </AuthManager> - <hashTree/> - <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true"> - <boolProp name="ResultCollector.error_logging">false</boolProp> - <objProp> - <name>saveConfig</name> - <value class="SampleSaveConfiguration"> - <time>true</time> - <latency>true</latency> - <timestamp>true</timestamp> - <success>true</success> - <label>true</label> - <code>true</code> - <message>true</message> - <threadName>true</threadName> - <dataType>true</dataType> - <encoding>false</encoding> - <assertions>true</assertions> - <subresults>true</subresults> - <responseData>false</responseData> - <samplerData>false</samplerData> - <xml>false</xml> - <fieldNames>true</fieldNames> - <responseHeaders>false</responseHeaders> - <requestHeaders>false</requestHeaders> - <responseDataOnError>false</responseDataOnError> - <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage> - <assertionsResultsToSave>0</assertionsResultsToSave> - <bytes>true</bytes> - <sentBytes>true</sentBytes> - <url>true</url> - <threadCounts>true</threadCounts> - <idleTime>true</idleTime> - <connectTime>true</connectTime> - </value> - </objProp> - <stringProp name="filename"></stringProp> - </ResultCollector> - <hashTree/> - </hashTree> - </hashTree> - </hashTree> -</jmeterTestPlan> |