summaryrefslogtreecommitdiffstats
path: root/dcae-analytics/dcae-analytics-tca-web
diff options
context:
space:
mode:
Diffstat (limited to 'dcae-analytics/dcae-analytics-tca-web')
-rw-r--r--dcae-analytics/dcae-analytics-tca-web/Dockerfile4
-rw-r--r--dcae-analytics/dcae-analytics-tca-web/pom.xml7
-rw-r--r--dcae-analytics/dcae-analytics-tca-web/src/main/java/org/onap/dcae/analytics/tca/web/TcaAppProperties.java14
3 files changed, 7 insertions, 18 deletions
diff --git a/dcae-analytics/dcae-analytics-tca-web/Dockerfile b/dcae-analytics/dcae-analytics-tca-web/Dockerfile
index b6e4778..411b6b1 100644
--- a/dcae-analytics/dcae-analytics-tca-web/Dockerfile
+++ b/dcae-analytics/dcae-analytics-tca-web/Dockerfile
@@ -3,7 +3,7 @@
# Only changes made in docker/Dockerfile template file will be persistent
# ==========================================================================
-FROM openjdk:8-jre-alpine
+FROM openjdk:11-jre-slim
MAINTAINER Rajiv Singla <rs153v@att.com>
@@ -14,7 +14,7 @@ ARG DOCKER_ARTIFACT_DIR
RUN mkdir -p /var/log/ONAP/dcaegen2/analytics/tca-gen2
#Add a new user and group to allow container to be run as non-root
-RUN addgroup -S tca-gen2 && adduser -S -G tca-gen2 tca-gen2; \
+RUN groupadd tca-gen2 && useradd -g tca-gen2 tca-gen2; \
chmod a+rwx /opt; \
chmod a+rwx /var/log/ONAP/dcaegen2/analytics/tca-gen2; \
chown -R tca-gen2:tca-gen2 /opt; \
diff --git a/dcae-analytics/dcae-analytics-tca-web/pom.xml b/dcae-analytics/dcae-analytics-tca-web/pom.xml
index 1275c71..57f9bdf 100644
--- a/dcae-analytics/dcae-analytics-tca-web/pom.xml
+++ b/dcae-analytics/dcae-analytics-tca-web/pom.xml
@@ -29,7 +29,7 @@
<parent>
<groupId>org.onap.dcaegen2.analytics.tca-gen2</groupId>
<artifactId>dcae-analytics</artifactId>
- <version>1.1.0-SNAPSHOT</version>
+ <version>1.2.0-SNAPSHOT</version>
</parent>
<artifactId>dcae-analytics-tca-web</artifactId>
@@ -119,7 +119,6 @@
<dependency>
<groupId>io.undertow</groupId>
<artifactId>undertow-core</artifactId>
- <version>2.0.17.Final</version>
</dependency>
</dependencies>
@@ -129,7 +128,7 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
- <version>5.0.11.RELEASE</version>
+ <version>5.1.12.RELEASE</version>
</dependency>
</dependencies>
</dependencyManagement>
@@ -157,7 +156,7 @@
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
- <version>1.4.3</version>
+ <version>1.4.10</version>
<configuration>
<contextDirectory>${project.basedir}</contextDirectory>
<repository>${docker.repository}/${docker.image.name}</repository>
diff --git a/dcae-analytics/dcae-analytics-tca-web/src/main/java/org/onap/dcae/analytics/tca/web/TcaAppProperties.java b/dcae-analytics/dcae-analytics-tca-web/src/main/java/org/onap/dcae/analytics/tca/web/TcaAppProperties.java
index 0214a3d..d70922b 100644
--- a/dcae-analytics/dcae-analytics-tca-web/src/main/java/org/onap/dcae/analytics/tca/web/TcaAppProperties.java
+++ b/dcae-analytics/dcae-analytics-tca-web/src/main/java/org/onap/dcae/analytics/tca/web/TcaAppProperties.java
@@ -30,11 +30,6 @@ import org.onap.dcae.analytics.model.configbindingservice.BaseConfigBindingServi
import org.onap.dcae.analytics.model.configbindingservice.ConfigBindingServiceConstants;
import org.springframework.core.env.Environment;
-import com.google.gson.JsonArray;
-import com.google.gson.JsonElement;
-import com.google.gson.JsonObject;
-import com.google.gson.JsonParser;
-
import lombok.Data;
import lombok.ToString;
@@ -106,17 +101,12 @@ public class TcaAppProperties extends BaseConfigBindingServiceProperties {
*/
private String getPolicy() {
- String policies = environment.getProperty(ConfigBindingServiceConstants.POLICIES);
+ String policies = environment.getProperty(ConfigBindingServiceConstants.WITHPOLICIES);
if (policies == null) {
return environment.getProperty(ConfigBindingServiceConstants.POLICY);
}
- JsonObject policiesObject = new JsonParser().parse(policies).getAsJsonObject();
- JsonArray items = policiesObject.get(ConfigBindingServiceConstants.ITEMS).getAsJsonArray();
- JsonElement policy = items.get(0)
- .getAsJsonObject().get(ConfigBindingServiceConstants.CONFIG)
- .getAsJsonObject().get(ConfigBindingServiceConstants.TCAPOLICY);
- return policy.toString();
+ return policies;
}