aboutsummaryrefslogtreecommitdiffstats
path: root/sdnr/wt/odlux/core
diff options
context:
space:
mode:
authorAijana Schumann <aijana.schumann@highstreet-technologies.com>2021-08-04 11:59:18 +0200
committerAijana Schumann <aijana.schumann@highstreet-technologies.com>2021-08-04 16:06:05 +0200
commit437f67407aece6f7aed8e989638b0d64075f0c0a (patch)
tree53e9e336cd8544edf8a06c889e33f5b9c98fe083 /sdnr/wt/odlux/core
parent1c4995eb199437e9c86336efff9972f2049e1532 (diff)
Update ODLUX
Add various updates and bugfixes to NetworkMap, Configuration, LinkCalculation and ConnectApp Issue-ID: CCSDK-3414 Signed-off-by: Aijana Schumann <aijana.schumann@highstreet-technologies.com> Change-Id: I6ea5c3a9d6ccbe9c450da43220654a53fd2f262b Signed-off-by: Aijana Schumann <aijana.schumann@highstreet-technologies.com>
Diffstat (limited to 'sdnr/wt/odlux/core')
-rw-r--r--sdnr/wt/odlux/core/features/pom.xml5
-rwxr-xr-xsdnr/wt/odlux/core/installer/pom.xml4
-rw-r--r--sdnr/wt/odlux/core/model/pom.xml2
-rw-r--r--sdnr/wt/odlux/core/model/src/main/java/com/opensymphony/xwork2/util/ClassLoaderUtil.java2
-rw-r--r--sdnr/wt/odlux/core/provider/pom.xml15
-rw-r--r--sdnr/wt/odlux/core/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/odlux/IndexOdluxBundle.java15
-rw-r--r--sdnr/wt/odlux/core/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/odlux/ResFilesServlet.java1
7 files changed, 25 insertions, 19 deletions
diff --git a/sdnr/wt/odlux/core/features/pom.xml b/sdnr/wt/odlux/core/features/pom.xml
index 051de3d0a..5d81f954c 100644
--- a/sdnr/wt/odlux/core/features/pom.xml
+++ b/sdnr/wt/odlux/core/features/pom.xml
@@ -50,11 +50,6 @@
<dependency>
<groupId>${project.groupId}</groupId>
- <artifactId>sdnr-wt-odlux-core-model</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
<artifactId>sdnr-wt-odlux-core-provider</artifactId>
<version>${project.version}</version>
</dependency>
diff --git a/sdnr/wt/odlux/core/installer/pom.xml b/sdnr/wt/odlux/core/installer/pom.xml
index 89de0b142..9cd173f11 100755
--- a/sdnr/wt/odlux/core/installer/pom.xml
+++ b/sdnr/wt/odlux/core/installer/pom.xml
@@ -50,7 +50,7 @@
<dependencies>
<dependency>
- <groupId>org.onap.ccsdk.features.sdnr.wt</groupId>
+ <groupId>${project.groupId}</groupId>
<artifactId>${application.name}-feature</artifactId>
<version>${project.version}</version>
<type>xml</type>
@@ -63,7 +63,7 @@
</exclusions>
</dependency>
<dependency>
- <groupId>org.onap.ccsdk.features.sdnr.wt</groupId>
+ <groupId>${project.groupId}</groupId>
<artifactId>${application.name}-provider</artifactId>
<version>${project.version}</version>
</dependency>
diff --git a/sdnr/wt/odlux/core/model/pom.xml b/sdnr/wt/odlux/core/model/pom.xml
index faec06761..c16705f58 100644
--- a/sdnr/wt/odlux/core/model/pom.xml
+++ b/sdnr/wt/odlux/core/model/pom.xml
@@ -58,5 +58,7 @@
<artifactId>org.osgi.compendium</artifactId>
<scope>provided</scope>
</dependency>
+
</dependencies>
+
</project>
diff --git a/sdnr/wt/odlux/core/model/src/main/java/com/opensymphony/xwork2/util/ClassLoaderUtil.java b/sdnr/wt/odlux/core/model/src/main/java/com/opensymphony/xwork2/util/ClassLoaderUtil.java
index bbe36c840..636c9db29 100644
--- a/sdnr/wt/odlux/core/model/src/main/java/com/opensymphony/xwork2/util/ClassLoaderUtil.java
+++ b/sdnr/wt/odlux/core/model/src/main/java/com/opensymphony/xwork2/util/ClassLoaderUtil.java
@@ -203,7 +203,7 @@ public class ClassLoaderUtil {
private Enumeration<E> determineCurrentEnumeration() {
if (cur != null && !cur.hasMoreElements()) {
- if (!enums.isEmpty()) {
+ if (enums.size() > 0) {
cur = enums.removeLast();
} else {
cur = null;
diff --git a/sdnr/wt/odlux/core/provider/pom.xml b/sdnr/wt/odlux/core/provider/pom.xml
index 7436b3768..94a239aa4 100644
--- a/sdnr/wt/odlux/core/provider/pom.xml
+++ b/sdnr/wt/odlux/core/provider/pom.xml
@@ -49,16 +49,14 @@
<dependencies>
<dependency>
- <groupId>org.onap.ccsdk.features.sdnr.wt</groupId>
+ <groupId>${project.groupId}</groupId>
<artifactId>sdnr-wt-odlux-core-model</artifactId>
<version>${project.version}</version>
- <scope>provided</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>sdnr-wt-odlux-framework</artifactId>
<version>${project.version}</version>
- <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
@@ -77,7 +75,6 @@
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
- <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
@@ -90,14 +87,14 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.onap.ccsdk.features.sdnr.wt</groupId>
- <artifactId>sdnr-wt-common</artifactId>
- <version>${project.version}</version>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-server</artifactId>
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-server</artifactId>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>sdnr-wt-common</artifactId>
+ <version>${project.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
diff --git a/sdnr/wt/odlux/core/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/odlux/IndexOdluxBundle.java b/sdnr/wt/odlux/core/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/odlux/IndexOdluxBundle.java
index c1cf875fc..82df2f0cd 100644
--- a/sdnr/wt/odlux/core/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/odlux/IndexOdluxBundle.java
+++ b/sdnr/wt/odlux/core/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/odlux/IndexOdluxBundle.java
@@ -48,14 +48,18 @@ public class IndexOdluxBundle extends OdluxBundle implements OdluxBundleResource
private static final String ENABLE_OAUTH_DEFAULT = "false";
private static final String ENV_ENABLE_ODLUX_RBAC = "ENABLE_ODLUX_RBAC";
private static final String ENABLE_ODLUX_RBAC_DEFAULT = "false";
+ private static final String ENV_TRANSPORTPCEGUIURL = "TRPCEGUIURL";
+ private static final String TRANSPORTPCEGUIURL_DEFAULT = "";
private final boolean oauthEnabled;
private final boolean policyEnabled;
+ private final String transportPceGuiUrl;
public IndexOdluxBundle() {
super(null, BUNDLENAME_APP);
this.oauthEnabled = "true".equals(getEnvVar(ENV_ENABLE_OAUTH, ENABLE_OAUTH_DEFAULT));
this.policyEnabled = "true".equals(getEnvVar(ENV_ENABLE_ODLUX_RBAC, ENABLE_ODLUX_RBAC_DEFAULT));
+ this.transportPceGuiUrl = getEnvVar(ENV_TRANSPORTPCEGUIURL, TRANSPORTPCEGUIURL_DEFAULT);
LOG.info("instantiating index with oauthEnabled={} and policyEnabled={}",this.oauthEnabled, this.policyEnabled);
}
@@ -134,8 +138,15 @@ public class IndexOdluxBundle extends OdluxBundle implements OdluxBundleResource
}
private String generateConfigureJson() {
- return String.format("{\"authentication\":\"%s\",\"enablePolicy\":%s}", this.oauthEnabled ? "oauth" : "basic",
- String.valueOf(this.policyEnabled));
+ StringBuilder sb = new StringBuilder();
+ sb.append(String.format("{\"authentication\":\"%s\",\"enablePolicy\":%s", this.oauthEnabled ? "oauth" : "basic",
+ String.valueOf(this.policyEnabled)));
+ if (this.transportPceGuiUrl != null && this.transportPceGuiUrl.length() > 0) {
+ sb.append(String.format(",\"transportpceUrl\":\"%s\"}", this.transportPceGuiUrl));
+ } else {
+ sb.append("}");
+ }
+ return sb.toString();
}
private static String getEnvVar(String v, String defaultValue) {
diff --git a/sdnr/wt/odlux/core/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/odlux/ResFilesServlet.java b/sdnr/wt/odlux/core/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/odlux/ResFilesServlet.java
index b8afc3329..62e73ef1d 100644
--- a/sdnr/wt/odlux/core/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/odlux/ResFilesServlet.java
+++ b/sdnr/wt/odlux/core/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/odlux/ResFilesServlet.java
@@ -88,4 +88,5 @@ public class ResFilesServlet extends HttpServlet {
return t;
}
+
}