From a2a5c9db5025b2326ecf739de77a66f6a348a85d Mon Sep 17 00:00:00 2001 From: Kai Date: Fri, 24 Jul 2020 15:09:04 +0800 Subject: policy upgrade Issue-ID: DCAEGEN2-2198 Signed-off-by: Kai Lu Change-Id: Idfa56412268f7e7a4682cdbba5645832b0746952 --- ...BindingServiceEnvironmentPostProcessorTest.java | 108 ++++++++++----------- 1 file changed, 52 insertions(+), 56 deletions(-) (limited to 'dcae-analytics/dcae-analytics-web/src/test/java') 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 5e97765..e07c83d 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 @@ -219,34 +219,32 @@ public class ConfigBindingServiceEnvironmentPostProcessorTest extends BaseAnalyt " \"items\": [{\r\n" + " \"policyName\": \"onap.vfirewall.tca.1-0-0.xml\",\r\n" + " \"name\": \"onap.vfirewall.tca\",\r\n" + - " \"config\": {\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" + + " \"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" + @@ -312,34 +310,32 @@ public class ConfigBindingServiceEnvironmentPostProcessorTest extends BaseAnalyt " \"items\": [{\r\n" + " \"policyName\": \"onap.vfirewall.tca.1-0-0.xml\",\r\n" + " \"name\": \"onap.vfirewall.tca\",\r\n" + - " \"config\": {\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" + + " \"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" + -- cgit 1.2.3-korg