summaryrefslogtreecommitdiffstats
path: root/dcae-analytics/dcae-analytics-web/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'dcae-analytics/dcae-analytics-web/src/test')
-rw-r--r--dcae-analytics/dcae-analytics-web/src/test/java/org/onap/dcae/analytics/web/spring/ConfigBindingServiceEnvironmentPostProcessorTest.java174
1 files changed, 71 insertions, 103 deletions
diff --git a/dcae-analytics/dcae-analytics-web/src/test/java/org/onap/dcae/analytics/web/spring/ConfigBindingServiceEnvironmentPostProcessorTest.java b/dcae-analytics/dcae-analytics-web/src/test/java/org/onap/dcae/analytics/web/spring/ConfigBindingServiceEnvironmentPostProcessorTest.java
index e07c83d..0fce3c2 100644
--- a/dcae-analytics/dcae-analytics-web/src/test/java/org/onap/dcae/analytics/web/spring/ConfigBindingServiceEnvironmentPostProcessorTest.java
+++ b/dcae-analytics/dcae-analytics-web/src/test/java/org/onap/dcae/analytics/web/spring/ConfigBindingServiceEnvironmentPostProcessorTest.java
@@ -169,93 +169,76 @@ public class ConfigBindingServiceEnvironmentPostProcessorTest extends BaseAnalyt
String parseConfig = "{\r\n" +
" \"config\": {\r\n" +
- " \"config\": {\r\n" +
- " \"spring.data.mongodb.uri\": \"mongodb://dcae-mongohost/dcae-tcagen2\",\r\n" +
- " \"streams_subscribes\": {\r\n" +
- " \"tca_handle_in\": {\r\n" +
- " \"type\": \"message_router\",\r\n" +
- " \"dmaap_info\": {\r\n" +
- " \"topic_url\": \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.VES_MEASUREMENT_OUTPUT\"\r\n" +
- " }\r\n" +
- " }\r\n" +
- " },\r\n" +
- " \"tca.enable_ecomp_logging\": true,\r\n" +
- " \"tca.enable_abatement\": true,\r\n" +
- " \"tca.aai.password\": \"DCAE\",\r\n" +
- " \"streams_subscribes.tca_handle_in.consumer_group\": \"cg1\",\r\n" +
- " \"streams_subscribes.tca_handle_in.polling.auto_adjusting.step_up\": 10000,\r\n" +
- " \"tca.aai.node_query_path\": \"aai/v11/search/nodes-query\",\r\n" +
- " \"streams_publishes\": {\r\n" +
- " \"tca_handle_out\": {\r\n" +
- " \"type\": \"message_router\",\r\n" +
- " \"dmaap_info\": {\r\n" +
- " \"topic_url\": \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.TCAGEN2-OUTPUT\"\r\n" +
- " }\r\n" +
+ " \"spring.data.mongodb.uri\": \"mongodb://dcae-mongohost/dcae-tcagen2\",\r\n" +
+ " \"streams_subscribes\": {\r\n" +
+ " \"tca_handle_in\": {\r\n" +
+ " \"type\": \"message_router\",\r\n" +
+ " \"dmaap_info\": {\r\n" +
+ " \"topic_url\": \"http://message-router:3904/events/unauthenticated.VES_MEASUREMENT_OUTPUT/\"\r\n" +
" }\r\n" +
- " },\r\n" +
- " \"streams_subscribes.tca_handle_in.consumer_ids[1]\": \"c1\",\r\n" +
- " \"tca.aai.generic_vnf_path\": \"aai/v11/network/generic-vnfs/generic-vnf\",\r\n" +
- " \"streams_subscribes.tca_handle_in.polling.auto_adjusting.step_down\": 30000,\r\n" +
- " \"streams_subscribes.tca_handle_in.polling.auto_adjusting.max\": 60000,\r\n" +
- " \"tca.aai.username\": \"DCAE\",\r\n" +
- " \"streams_subscribes.tca_handle_in.polling.auto_adjusting.min\": 30000,\r\n" +
- " \"tca.aai.url\": \"http://aai.onap.svc.cluster.local\",\r\n" +
- " \"streams_subscribes.tca_handle_in.timeout\": -1,\r\n" +
- " \"tca.aai.enable_enrichment\": true,\r\n" +
- " \"tca.policy\": \"{\\\"domain\\\":\\\"measurementsForVfScaling\\\",\\\"metricsPerEventName\\\":[{\\\"eventName\\\":\\\"vFirewallBroadcastPackets\\\",\\\"controlLoopSchemaType\\\":\\\"VM\\\",\\\"policyScope\\\":\\\"DCAE\\\",\\\"policyName\\\":\\\"DCAE.Config_tca-hi-lo\\\",\\\"policyVersion\\\":\\\"v0.0.1\\\",\\\"thresholds\\\":[{\\\"closedLoopControlName\\\":\\\"ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a\\\",\\\"version\\\":\\\"1.0.2\\\",\\\"fieldPath\\\":\\\"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta\\\",\\\"thresholdValue\\\":300,\\\"direction\\\":\\\"LESS_OR_EQUAL\\\",\\\"severity\\\":\\\"MAJOR\\\",\\\"closedLoopEventStatus\\\":\\\"ONSET\\\"},{\\\"closedLoopControlName\\\":\\\"ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a\\\",\\\"version\\\":\\\"1.0.2\\\",\\\"fieldPath\\\":\\\"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta\\\",\\\"thresholdValue\\\":700,\\\"direction\\\":\\\"GREATER_OR_EQUAL\\\",\\\"severity\\\":\\\"CRITICAL\\\",\\\"closedLoopEventStatus\\\":\\\"ONSET\\\"}]},{\\\"eventName\\\":\\\"vLoadBalancer\\\",\\\"controlLoopSchemaType\\\":\\\"VM\\\",\\\"policyScope\\\":\\\"DCAE\\\",\\\"policyName\\\":\\\"DCAE.Config_tca-hi-lo\\\",\\\"policyVersion\\\":\\\"v0.0.1\\\",\\\"thresholds\\\":[{\\\"closedLoopControlName\\\":\\\"ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3\\\",\\\"version\\\":\\\"1.0.2\\\",\\\"fieldPath\\\":\\\"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta\\\",\\\"thresholdValue\\\":300,\\\"direction\\\":\\\"GREATER_OR_EQUAL\\\",\\\"severity\\\":\\\"CRITICAL\\\",\\\"closedLoopEventStatus\\\":\\\"ONSET\\\"}]},{\\\"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\\\"}]}]}\",\r\n" +
- " \"tca.processing_batch_size\": 10000,\r\n" +
- " \"streams_subscribes.tca_handle_in.polling.fixed_rate\": 0,\r\n" +
- " \"streams_subscribes.tca_handle_in.message_limit\": 50000,\r\n" +
- " \"service_calls\": [],\r\n" +
- " \"streams_subscribes.tca_handle_in.consumer_ids[0]\": \"c0\"\r\n" +
+ " }\r\n" +
" },\r\n" +
- " \"policies\": {\r\n" +
- " \"event\": {\r\n" +
- " \"action\": \"gathered\",\r\n" +
- " \"timestamp\": \"2020-04-08T19:45:38.927Z\",\r\n" +
- " \"update_id\": \"d86a3b58-8c4b-49e9-ade7-8238501adf02\",\r\n" +
- " \"policies_count\": 1\r\n" +
- " },\r\n" +
- " \"items\": [{\r\n" +
- " \"policyName\": \"onap.vfirewall.tca.1-0-0.xml\",\r\n" +
- " \"name\": \"onap.vfirewall.tca\",\r\n" +
- " \"tca.policy\": {\r\n" +
- " \"domain\": \"measurementsForVfScaling\",\r\n" +
- " \"metricsPerEventName\": [{\r\n" +
- " \"policyName\": \"onap.vfirewall.tca\",\r\n" +
- " \"policyScope\": \"resource=vLoadBalancer;type=configuration\",\r\n" +
- " \"thresholds\": [{\r\n" +
- " \"direction\": \"LESS_OR_EQUAL\",\r\n" +
- " \"severity\": \"MAJOR\",\r\n" +
- " \"closedLoopControlName\": \"VVK_ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a\",\r\n" +
- " \"fieldPath\": \"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated\",\r\n" +
- " \"version\": \"1.0.2\",\r\n" +
- " \"closedLoopEventStatus\": \"ONSET\",\r\n" +
- " \"thresholdValue\": 500\r\n" +
- " }, {\r\n" +
- " \"direction\": \"GREATER_OR_EQUAL\",\r\n" +
- " \"severity\": \"CRITICAL\",\r\n" +
- " \"closedLoopControlName\": \"VVK_ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a\",\r\n" +
- " \"fieldPath\": \"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated\",\r\n" +
- " \"version\": \"1.0.2\",\r\n" +
- " \"closedLoopEventStatus\": \"ONSET\",\r\n" +
- " \"thresholdValue\": 5000\r\n" +
- " }],\r\n" +
- " \"eventName\": \"vLoadBalancer\",\r\n" +
- " \"controlLoopSchemaType\": \"VNF\",\r\n" +
- " \"policyVersion\": \"v0.0.1\"\r\n" +
- " }]\r\n" +
- " },\r\n" +
- " \"type_version\": \"1.0.0\",\r\n" +
- " \"version\": \"1.0.0\",\r\n" +
- " \"policyVersion\": \"1.0.0\",\r\n" +
- " \"type\": \"onap.policies.monitoring.cdap.tca.hi.lo.app\",\r\n" +
- " \"metadata\": {\r\n" +
- " \"policy-id\": \"onap.vfirewall.tca\",\r\n" +
- " \"policy-version\": \"1.0.0\"\r\n" +
+ " \"tca.enable_ecomp_logging\": true,\r\n" +
+ " \"tca.enable_abatement\": true,\r\n" +
+ " \"tca.aai.password\": \"DCAE\",\r\n" +
+ " \"streams_subscribes.tca_handle_in.consumer_group\": \"cg1\",\r\n" +
+ " \"streams_subscribes.tca_handle_in.polling.auto_adjusting.step_up\": 10000,\r\n" +
+ " \"tca.aai.node_query_path\": \"aai/v11/search/nodes-query\",\r\n" +
+ " \"streams_publishes\": {\r\n" +
+ " \"tca_handle_out\": {\r\n" +
+ " \"type\": \"message_router\",\r\n" +
+ " \"dmaap_info\": {\r\n" +
+ " \"topic_url\": \"http://message-router:3904/events/unauthenticated.TCAGEN2_OUTPUT/\"\r\n" +
" }\r\n" +
- " }]\r\n" +
- " }\r\n" +
+ " }\r\n" +
+ " },\r\n" +
+ " \"streams_subscribes.tca_handle_in.consumer_ids[1]\": \"c1\",\r\n" +
+ " \"tca.aai.generic_vnf_path\": \"aai/v11/network/generic-vnfs/generic-vnf\",\r\n" +
+ " \"streams_subscribes.tca_handle_in.polling.auto_adjusting.step_down\": 30000,\r\n" +
+ " \"streams_subscribes.tca_handle_in.polling.auto_adjusting.max\": 60000,\r\n" +
+ " \"tca.aai.username\": \"DCAE\",\r\n" +
+ " \"streams_subscribes.tca_handle_in.polling.auto_adjusting.min\": 30000,\r\n" +
+ " \"tca.aai.url\": \"http://aai.onap.svc.cluster.local\",\r\n" +
+ " \"streams_subscribes.tca_handle_in.timeout\": -1,\r\n" +
+ " \"tca.aai.enable_enrichment\": true,\r\n" +
+ " \"tca.policy\": \"{\\\"domain\\\":\\\"measurementsForVfScaling\\\",\\\"metricsPerEventName\\\":[{\\\"eventName\\\":\\\"vFirewallBroadcastPackets\\\",\\\"controlLoopSchemaType\\\":\\\"VM\\\",\\\"policyScope\\\":\\\"DCAE\\\",\\\"policyName\\\":\\\"DCAE.Config_tca-hi-lo\\\",\\\"policyVersion\\\":\\\"v0.0.1\\\",\\\"thresholds\\\":[{\\\"closedLoopControlName\\\":\\\"TEST-ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a\\\",\\\"version\\\":\\\"1.0.2\\\",\\\"fieldPath\\\":\\\"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta\\\",\\\"thresholdValue\\\":300,\\\"direction\\\":\\\"LESS_OR_EQUAL\\\",\\\"severity\\\":\\\"MAJOR\\\",\\\"closedLoopEventStatus\\\":\\\"ONSET\\\"},{\\\"closedLoopControlName\\\":\\\"TEST-ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a\\\",\\\"version\\\":\\\"1.0.2\\\",\\\"fieldPath\\\":\\\"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta\\\",\\\"thresholdValue\\\":700,\\\"direction\\\":\\\"GREATER_OR_EQUAL\\\",\\\"severity\\\":\\\"CRITICAL\\\",\\\"closedLoopEventStatus\\\":\\\"ONSET\\\"}]},{\\\"eventName\\\":\\\"vLoadBalancer\\\",\\\"controlLoopSchemaType\\\":\\\"VM\\\",\\\"policyScope\\\":\\\"DCAE\\\",\\\"policyName\\\":\\\"DCAE.Config_tca-hi-lo\\\",\\\"policyVersion\\\":\\\"v0.0.1\\\",\\\"thresholds\\\":[{\\\"closedLoopControlName\\\":\\\"ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3\\\",\\\"version\\\":\\\"1.0.2\\\",\\\"fieldPath\\\":\\\"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta\\\",\\\"thresholdValue\\\":300,\\\"direction\\\":\\\"GREATER_OR_EQUAL\\\",\\\"severity\\\":\\\"CRITICAL\\\",\\\"closedLoopEventStatus\\\":\\\"ONSET\\\"}]},{\\\"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\\\"}]}]}\",\r\n" +
+ " \"tca.processing_batch_size\": 10000,\r\n" +
+ " \"streams_subscribes.tca_handle_in.polling.fixed_rate\": 0,\r\n" +
+ " \"streams_subscribes.tca_handle_in.message_limit\": 50000,\r\n" +
+ " \"service_calls\": [],\r\n" +
+ " \"streams_subscribes.tca_handle_in.consumer_ids[0]\": \"c0\"\r\n" +
+ " },\r\n" +
+ " \"policies\": {\r\n" +
+ " \"event\": {},\r\n" +
+ " \"items\": [{\r\n" +
+ " \"tca.policy\": {\r\n" +
+ " \"domain\": \"measurementsForVfScaling\",\r\n" +
+ " \"metricsPerEventName\": [{\r\n" +
+ " \"policyName\": \"onap.vfirewall.tca\",\r\n" +
+ " \"policyScope\": \"resource=vLoadBalancer;type=configuration\",\r\n" +
+ " \"thresholds\": [{\r\n" +
+ " \"direction\": \"LESS_OR_EQUAL\",\r\n" +
+ " \"severity\": \"MAJOR\",\r\n" +
+ " \"closedLoopControlName\": \"VVK_ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a\",\r\n" +
+ " \"fieldPath\": \"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated\",\r\n" +
+ " \"version\": \"1.0.2\",\r\n" +
+ " \"closedLoopEventStatus\": \"ONSET\",\r\n" +
+ " \"thresholdValue\": 500\r\n" +
+ " }, {\r\n" +
+ " \"direction\": \"GREATER_OR_EQUAL\",\r\n" +
+ " \"severity\": \"CRITICAL\",\r\n" +
+ " \"closedLoopControlName\": \"VVK_ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a\",\r\n" +
+ " \"fieldPath\": \"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated\",\r\n" +
+ " \"version\": \"1.0.2\",\r\n" +
+ " \"closedLoopEventStatus\": \"ONSET\",\r\n" +
+ " \"thresholdValue\": 5000\r\n" +
+ " }],\r\n" +
+ " \"eventName\": \"vLoadBalancer\",\r\n" +
+ " \"controlLoopSchemaType\": \"VNF\",\r\n" +
+ " \"policyVersion\": \"v0.0.1\"\r\n" +
+ " }]\r\n" +
+ " }\r\n" +
+ " }]\r\n" +
" }\r\n" +
"}";
@@ -266,7 +249,7 @@ public class ConfigBindingServiceEnvironmentPostProcessorTest extends BaseAnalyt
" \"tca_handle_in\": {\r\n" +
" \"type\": \"message_router\",\r\n" +
" \"dmaap_info\": {\r\n" +
- " \"topic_url\": \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.VES_MEASUREMENT_OUTPUT\"\r\n" +
+ " \"topic_url\": \"http://message-router:3904/events/unauthenticated.VES_MEASUREMENT_OUTPUT/\"\r\n" +
" }\r\n" +
" }\r\n" +
" },\r\n" +
@@ -280,7 +263,7 @@ public class ConfigBindingServiceEnvironmentPostProcessorTest extends BaseAnalyt
" \"tca_handle_out\": {\r\n" +
" \"type\": \"message_router\",\r\n" +
" \"dmaap_info\": {\r\n" +
- " \"topic_url\": \"http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.TCAGEN2-OUTPUT\"\r\n" +
+ " \"topic_url\": \"http://message-router:3904/events/unauthenticated.TCAGEN2_OUTPUT/\"\r\n" +
" }\r\n" +
" }\r\n" +
" },\r\n" +
@@ -293,7 +276,7 @@ public class ConfigBindingServiceEnvironmentPostProcessorTest extends BaseAnalyt
" \"tca.aai.url\": \"http://aai.onap.svc.cluster.local\",\r\n" +
" \"streams_subscribes.tca_handle_in.timeout\": -1,\r\n" +
" \"tca.aai.enable_enrichment\": true,\r\n" +
- " \"tca.policy\": \"{\\\"domain\\\":\\\"measurementsForVfScaling\\\",\\\"metricsPerEventName\\\":[{\\\"eventName\\\":\\\"vFirewallBroadcastPackets\\\",\\\"controlLoopSchemaType\\\":\\\"VM\\\",\\\"policyScope\\\":\\\"DCAE\\\",\\\"policyName\\\":\\\"DCAE.Config_tca-hi-lo\\\",\\\"policyVersion\\\":\\\"v0.0.1\\\",\\\"thresholds\\\":[{\\\"closedLoopControlName\\\":\\\"ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a\\\",\\\"version\\\":\\\"1.0.2\\\",\\\"fieldPath\\\":\\\"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta\\\",\\\"thresholdValue\\\":300,\\\"direction\\\":\\\"LESS_OR_EQUAL\\\",\\\"severity\\\":\\\"MAJOR\\\",\\\"closedLoopEventStatus\\\":\\\"ONSET\\\"},{\\\"closedLoopControlName\\\":\\\"ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a\\\",\\\"version\\\":\\\"1.0.2\\\",\\\"fieldPath\\\":\\\"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta\\\",\\\"thresholdValue\\\":700,\\\"direction\\\":\\\"GREATER_OR_EQUAL\\\",\\\"severity\\\":\\\"CRITICAL\\\",\\\"closedLoopEventStatus\\\":\\\"ONSET\\\"}]},{\\\"eventName\\\":\\\"vLoadBalancer\\\",\\\"controlLoopSchemaType\\\":\\\"VM\\\",\\\"policyScope\\\":\\\"DCAE\\\",\\\"policyName\\\":\\\"DCAE.Config_tca-hi-lo\\\",\\\"policyVersion\\\":\\\"v0.0.1\\\",\\\"thresholds\\\":[{\\\"closedLoopControlName\\\":\\\"ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3\\\",\\\"version\\\":\\\"1.0.2\\\",\\\"fieldPath\\\":\\\"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta\\\",\\\"thresholdValue\\\":300,\\\"direction\\\":\\\"GREATER_OR_EQUAL\\\",\\\"severity\\\":\\\"CRITICAL\\\",\\\"closedLoopEventStatus\\\":\\\"ONSET\\\"}]},{\\\"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\\\"}]}]}\",\r\n" +
+ " \"tca.policy\": \"{\\\"domain\\\":\\\"measurementsForVfScaling\\\",\\\"metricsPerEventName\\\":[{\\\"eventName\\\":\\\"vFirewallBroadcastPackets\\\",\\\"controlLoopSchemaType\\\":\\\"VM\\\",\\\"policyScope\\\":\\\"DCAE\\\",\\\"policyName\\\":\\\"DCAE.Config_tca-hi-lo\\\",\\\"policyVersion\\\":\\\"v0.0.1\\\",\\\"thresholds\\\":[{\\\"closedLoopControlName\\\":\\\"TEST-ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a\\\",\\\"version\\\":\\\"1.0.2\\\",\\\"fieldPath\\\":\\\"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta\\\",\\\"thresholdValue\\\":300,\\\"direction\\\":\\\"LESS_OR_EQUAL\\\",\\\"severity\\\":\\\"MAJOR\\\",\\\"closedLoopEventStatus\\\":\\\"ONSET\\\"},{\\\"closedLoopControlName\\\":\\\"TEST-ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a\\\",\\\"version\\\":\\\"1.0.2\\\",\\\"fieldPath\\\":\\\"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta\\\",\\\"thresholdValue\\\":700,\\\"direction\\\":\\\"GREATER_OR_EQUAL\\\",\\\"severity\\\":\\\"CRITICAL\\\",\\\"closedLoopEventStatus\\\":\\\"ONSET\\\"}]},{\\\"eventName\\\":\\\"vLoadBalancer\\\",\\\"controlLoopSchemaType\\\":\\\"VM\\\",\\\"policyScope\\\":\\\"DCAE\\\",\\\"policyName\\\":\\\"DCAE.Config_tca-hi-lo\\\",\\\"policyVersion\\\":\\\"v0.0.1\\\",\\\"thresholds\\\":[{\\\"closedLoopControlName\\\":\\\"ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3\\\",\\\"version\\\":\\\"1.0.2\\\",\\\"fieldPath\\\":\\\"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta\\\",\\\"thresholdValue\\\":300,\\\"direction\\\":\\\"GREATER_OR_EQUAL\\\",\\\"severity\\\":\\\"CRITICAL\\\",\\\"closedLoopEventStatus\\\":\\\"ONSET\\\"}]},{\\\"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\\\"}]}]}\",\r\n" +
" \"tca.processing_batch_size\": 10000,\r\n" +
" \"streams_subscribes.tca_handle_in.polling.fixed_rate\": 0,\r\n" +
" \"streams_subscribes.tca_handle_in.message_limit\": 50000,\r\n" +
@@ -301,15 +284,8 @@ public class ConfigBindingServiceEnvironmentPostProcessorTest extends BaseAnalyt
" \"streams_subscribes.tca_handle_in.consumer_ids[0]\": \"c0\"\r\n" +
" },\r\n" +
" \"policies\": {\r\n" +
- " \"event\": {\r\n" +
- " \"action\": \"gathered\",\r\n" +
- " \"timestamp\": \"2020-04-08T19:45:38.927Z\",\r\n" +
- " \"update_id\": \"d86a3b58-8c4b-49e9-ade7-8238501adf02\",\r\n" +
- " \"policies_count\": 1\r\n" +
- " },\r\n" +
+ " \"event\": {},\r\n" +
" \"items\": [{\r\n" +
- " \"policyName\": \"onap.vfirewall.tca.1-0-0.xml\",\r\n" +
- " \"name\": \"onap.vfirewall.tca\",\r\n" +
" \"tca.policy\": {\r\n" +
" \"domain\": \"measurementsForVfScaling\",\r\n" +
" \"metricsPerEventName\": [{\r\n" +
@@ -336,14 +312,6 @@ public class ConfigBindingServiceEnvironmentPostProcessorTest extends BaseAnalyt
" \"controlLoopSchemaType\": \"VNF\",\r\n" +
" \"policyVersion\": \"v0.0.1\"\r\n" +
" }]\r\n" +
- " },\r\n" +
- " \"type_version\": \"1.0.0\",\r\n" +
- " \"version\": \"1.0.0\",\r\n" +
- " \"policyVersion\": \"1.0.0\",\r\n" +
- " \"type\": \"onap.policies.monitoring.cdap.tca.hi.lo.app\",\r\n" +
- " \"metadata\": {\r\n" +
- " \"policy-id\": \"onap.vfirewall.tca\",\r\n" +
- " \"policy-version\": \"1.0.0\"\r\n" +
" }\r\n" +
" }]\r\n" +
" }\r\n" +