summaryrefslogtreecommitdiffstats
path: root/dcae-analytics/dcae-analytics-web/src
diff options
context:
space:
mode:
Diffstat (limited to 'dcae-analytics/dcae-analytics-web/src')
-rw-r--r--dcae-analytics/dcae-analytics-web/src/main/java/org/onap/dcae/analytics/web/spring/ConfigBindingServiceEnvironmentPostProcessor.java1
-rw-r--r--dcae-analytics/dcae-analytics-web/src/test/java/org/onap/dcae/analytics/web/spring/ConfigBindingServiceEnvironmentPostProcessorTest.java4
2 files changed, 5 insertions, 0 deletions
diff --git a/dcae-analytics/dcae-analytics-web/src/main/java/org/onap/dcae/analytics/web/spring/ConfigBindingServiceEnvironmentPostProcessor.java b/dcae-analytics/dcae-analytics-web/src/main/java/org/onap/dcae/analytics/web/spring/ConfigBindingServiceEnvironmentPostProcessor.java
index 453cd9c..0a94f8d 100644
--- a/dcae-analytics/dcae-analytics-web/src/main/java/org/onap/dcae/analytics/web/spring/ConfigBindingServiceEnvironmentPostProcessor.java
+++ b/dcae-analytics/dcae-analytics-web/src/main/java/org/onap/dcae/analytics/web/spring/ConfigBindingServiceEnvironmentPostProcessor.java
@@ -234,6 +234,7 @@ public class ConfigBindingServiceEnvironmentPostProcessor implements Environment
String policies = null;
if (jsonPolicyConfig != null) {
policies = jsonPolicyConfig.getAsJsonObject().getAsJsonArray(ConfigBindingServiceConstants.ITEMS).get(0)
+ .getAsJsonObject().get(ConfigBindingServiceConstants.CONFIG)
.getAsJsonObject().get(ConfigBindingServiceConstants.TCAPOLICY).toString();
}
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 0fce3c2..c673933 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
@@ -211,6 +211,7 @@ public class ConfigBindingServiceEnvironmentPostProcessorTest extends BaseAnalyt
" \"policies\": {\r\n" +
" \"event\": {},\r\n" +
" \"items\": [{\r\n" +
+ " \"config\": {\r\n" +
" \"tca.policy\": {\r\n" +
" \"domain\": \"measurementsForVfScaling\",\r\n" +
" \"metricsPerEventName\": [{\r\n" +
@@ -238,6 +239,7 @@ public class ConfigBindingServiceEnvironmentPostProcessorTest extends BaseAnalyt
" \"policyVersion\": \"v0.0.1\"\r\n" +
" }]\r\n" +
" }\r\n" +
+ " }\r\n" +
" }]\r\n" +
" }\r\n" +
"}";
@@ -286,6 +288,7 @@ public class ConfigBindingServiceEnvironmentPostProcessorTest extends BaseAnalyt
" \"policies\": {\r\n" +
" \"event\": {},\r\n" +
" \"items\": [{\r\n" +
+ " \"config\": {\r\n" +
" \"tca.policy\": {\r\n" +
" \"domain\": \"measurementsForVfScaling\",\r\n" +
" \"metricsPerEventName\": [{\r\n" +
@@ -313,6 +316,7 @@ public class ConfigBindingServiceEnvironmentPostProcessorTest extends BaseAnalyt
" \"policyVersion\": \"v0.0.1\"\r\n" +
" }]\r\n" +
" }\r\n" +
+ " }\r\n" +
" }]\r\n" +
" }\r\n" +
"}";