summaryrefslogtreecommitdiffstats
path: root/prh-app-server/src
diff options
context:
space:
mode:
authorJoanna Jeremicz <joanna.jeremicz@nokia.com>2019-10-07 13:40:11 +0200
committerJoanna Jeremicz <joanna.jeremicz@nokia.com>2019-10-08 10:32:59 +0200
commitaa921df02964e3664b1dd332f53d9d61e26debb8 (patch)
treec790ad3cc94c66d401f9caab43df3434f949b820 /prh-app-server/src
parent3d6161b86d7da5f628a6f0eafcab5f2eaedd34c2 (diff)
Add baseUrl support
Add support for baseUrl usage. It is needed for handling objects other than pnfs from the inventory. BaseUrl is necessary for fixing the existing bug, where pnf path is used to get service-instance from AAI. Issue-ID: INT-1181 Change-Id: I340a0fc569bfdd027bbac81f059a2a5f0dae17a1 Signed-off-by: Joanna Jeremicz <joanna.jeremicz@nokia.com>
Diffstat (limited to 'prh-app-server/src')
-rw-r--r--prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/configuration/CbsContentParser.java1
-rw-r--r--prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/TestAppConfiguration.java1
-rw-r--r--prh-app-server/src/test/resources/configurationFromCbs.json1
3 files changed, 3 insertions, 0 deletions
diff --git a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/configuration/CbsContentParser.java b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/configuration/CbsContentParser.java
index 85b4c035..ebb29f36 100644
--- a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/configuration/CbsContentParser.java
+++ b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/configuration/CbsContentParser.java
@@ -113,6 +113,7 @@ class CbsContentParser {
AaiClientConfiguration getAaiClientConfig() {
return new ImmutableAaiClientConfiguration.Builder()
.pnfUrl(jsonObject.get("aai.aaiClientConfiguration.pnfUrl").getAsString())
+ .baseUrl(jsonObject.get("aai.aaiClientConfiguration.baseUrl").getAsString())
.aaiUserName(jsonObject.get("aai.aaiClientConfiguration.aaiUserName").getAsString())
.aaiServiceInstancePath(jsonObject.get("aai.aaiClientConfiguration.aaiServiceInstancePath").getAsString())
.aaiIgnoreSslCertificateErrors(
diff --git a/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/TestAppConfiguration.java b/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/TestAppConfiguration.java
index c11fe492..393b23d8 100644
--- a/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/TestAppConfiguration.java
+++ b/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/TestAppConfiguration.java
@@ -57,6 +57,7 @@ public class TestAppConfiguration {
public static ImmutableAaiClientConfiguration createDefaultAaiClientConfiguration() {
return new ImmutableAaiClientConfiguration.Builder()
.pnfUrl("https://aai.onap.svc.cluster.local:8443/aai/v12/network/pnfs/pnf")
+ .baseUrl("https://aai.onap.svc.cluster.local:8443/aai/v12/network")
.aaiUserName("AAI")
.aaiUserPassword("AAI")
.aaiIgnoreSslCertificateErrors(true)
diff --git a/prh-app-server/src/test/resources/configurationFromCbs.json b/prh-app-server/src/test/resources/configurationFromCbs.json
index d76aab4f..116a1165 100644
--- a/prh-app-server/src/test/resources/configurationFromCbs.json
+++ b/prh-app-server/src/test/resources/configurationFromCbs.json
@@ -11,6 +11,7 @@
"dmaap.dmaapUpdateProducerConfiguration.dmaapUserName":"admin",
"dmaap.dmaapUpdateProducerConfiguration.dmaapUserPassword":"admin",
"aai.aaiClientConfiguration.pnfUrl": "https://aai.onap.svc.cluster.local:8443/aai/v12/network/pnfs/pnf",
+ "aai.aaiClientConfiguration.baseUrl": "https://aai.onap.svc.cluster.local:8443/aai/v12/network",
"aai.aaiClientConfiguration.aaiUserName":"AAI",
"aai.aaiClientConfiguration.aaiUserPassword":"AAI",
"aai.aaiClientConfiguration.aaiIgnoreSslCertificateErrors":true,