summaryrefslogtreecommitdiffstats
path: root/prh-app-server/src
diff options
context:
space:
mode:
Diffstat (limited to 'prh-app-server/src')
-rw-r--r--prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/configuration/AppConfig.java8
-rw-r--r--prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/configuration/PrhAppConfigTest.java8
-rw-r--r--prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/AaiConsumerTaskImplTest.java2
-rw-r--r--prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/AaiProducerTaskImplTest.java2
-rw-r--r--prh-app-server/src/test/resources/prh_endpoints.json5
5 files changed, 13 insertions, 12 deletions
diff --git a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/configuration/AppConfig.java b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/configuration/AppConfig.java
index e10c51d0..c1000fe9 100644
--- a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/configuration/AppConfig.java
+++ b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/configuration/AppConfig.java
@@ -101,7 +101,7 @@ public class AppConfig extends PrhAppConfig {
public String aaiHost;
@Value("${aai.aaiClientConfiguration.aaiHostPortNumber:}")
- public Integer aaiHostPortNumber;
+ public Integer aaiPort;
@Value("${aai.aaiClientConfiguration.aaiProtocol:}")
public String aaiProtocol;
@@ -161,9 +161,9 @@ public class AppConfig extends PrhAppConfig {
public AaiClientConfiguration getAaiClientConfiguration() {
return new ImmutableAaiClientConfiguration.Builder()
.aaiHost(Optional.ofNullable(aaiHost).filter(isEmpty.negate()).orElse(aaiClientConfiguration.aaiHost()))
- .aaiHostPortNumber(
- Optional.ofNullable(aaiHostPortNumber).filter(p -> !p.toString().isEmpty())
- .orElse(aaiClientConfiguration.aaiHostPortNumber()))
+ .aaiPort(
+ Optional.ofNullable(aaiPort).filter(p -> !p.toString().isEmpty())
+ .orElse(aaiClientConfiguration.aaiPort()))
.aaiIgnoreSslCertificateErrors(
Optional.ofNullable(aaiIgnoreSslCertificateErrors).filter(p -> !p.toString().isEmpty())
.orElse(aaiClientConfiguration.aaiIgnoreSslCertificateErrors()))
diff --git a/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/configuration/PrhAppConfigTest.java b/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/configuration/PrhAppConfigTest.java
index 71c996bd..6d1c4b9b 100644
--- a/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/configuration/PrhAppConfigTest.java
+++ b/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/configuration/PrhAppConfigTest.java
@@ -50,10 +50,10 @@ class PrhAppConfigTest {
private static final String PRH_ENDPOINTS = "prh_endpoints.json";
private static final String jsonString = "{\"configs\":{\"aai\":{\"aaiClientConfiguration\":{\"aaiHost\":"
- + "\"localhost\",\"aaiHostPortNumber\":8080,\"aaiIgnoreSslCertificateErrors\":true,\"aaiProtocol\":"
+ + "\"localhost\",\"aaiPort\":8080,\"aaiIgnoreSslCertificateErrors\":true,\"aaiProtocol\":"
+ "\"https\",\"aaiUserName\":\"admin\",\"aaiUserPassword\":\"admin\",\"aaiBasePath\":\"/aai/v11\","
+ "\"aaiPnfPath\":\"/network/pnfs/pnf\",\"aaiHeaders\":{\"X-FromAppId\":\"prh\",\"X-TransactionId\":\"9999\","
- + "\"Accept\":\"application/json\",\"Real-Time\":\"true\",\"Authorization\":\"Basic QUFJOkFBSQ==\"}}},"
+ + "\"Accept\":\"application/json\",\"Real-Time\":\"true\",\"Content-Type\":\"application/merge-patch+json\",\"Authorization\":\"Basic QUFJOkFBSQ==\"}}},"
+ "\"dmaap\":{\"dmaapConsumerConfiguration\":{\"consumerGroup\":\"other\",\"consumerId\":\"1\","
+ "\"dmaapContentType\":\"application/json\",\"dmaapHostName\":\"localhost\",\"dmaapPortNumber\":2222,"
+ "\"dmaapProtocol\":\"http\",\"dmaapTopicName\":\"temp\",\"dmaapUserName\":\"admin\",\"dmaapUserPassword\""
@@ -62,10 +62,10 @@ class PrhAppConfigTest {
+ "\"dmaapTopicName\":\"temp\",\"dmaapUserName\":\"admin\",\"dmaapUserPassword\":\"admin\"}}}}";
private static final String incorrectJsonString = "{\"configs\":{\"aai\":{\"aaiClientConfiguration\":{\"aaiHost\":"
- + "\"localhost\",\"aaiHostPortNumber\":8080,\"aaiIgnoreSslCertificateErrors\":true,\"aaiProtocol\":\"https\","
+ + "\"localhost\",\"aaiPort\":8080,\"aaiIgnoreSslCertificateErrors\":true,\"aaiProtocol\":\"https\","
+ "\"aaiUserName\":\"admin\",\"aaiUserPassword\":\"admin\",\"aaiBasePath\":\"/aai/v11\",\"aaiPnfPath\":"
+ "\"/network/pnfs/pnf\",\"aaiHeaders\":{\"X-FromAppId\":\"prh\",\"X-TransactionId\":\"9999\",\"Accept\":"
- + "\"application/json\",\"Real-Time\":\"true\",\"Authorization\":\"Basic QUFJOkFBSQ==\"}}},\"dmaap\""
+ + "\"application/json\",\"Real-Time\":\"true\",\"Content-Type\":\"application/merge-patch+json\",\"Authorization\":\"Basic QUFJOkFBSQ==\"}}},\"dmaap\""
+ ":{\"dmaapConsumerConfiguration\":{\"consumerGroup\":\"other\",\"consumerId\":\"1\",\"dmaapContentType\""
+ ":\"application/json\",\"dmaapHostName\":\"localhost\",\"dmaapPortNumber\":2222,\"dmaapProtocol\":\"http\""
+ ",\"dmaapTopicName\":\"temp\",\"dmaapUserName\":\"admin\",\"dmaapUserPassword\":\"admin\",\"messageLimit\""
diff --git a/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/AaiConsumerTaskImplTest.java b/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/AaiConsumerTaskImplTest.java
index 8af562b2..ea458a0f 100644
--- a/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/AaiConsumerTaskImplTest.java
+++ b/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/AaiConsumerTaskImplTest.java
@@ -67,7 +67,7 @@ class AaiConsumerTaskImplTest {
static void setUp() {
aaiClientConfiguration = new ImmutableAaiClientConfiguration.Builder()
.aaiHost(AAI_HOST)
- .aaiHostPortNumber(PORT)
+ .aaiPort(PORT)
.aaiProtocol(PROTOCOL)
.aaiUserName(USER_NAME_PASSWORD)
.aaiUserPassword(USER_NAME_PASSWORD)
diff --git a/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/AaiProducerTaskImplTest.java b/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/AaiProducerTaskImplTest.java
index 5e60bf0f..90206122 100644
--- a/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/AaiProducerTaskImplTest.java
+++ b/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/AaiProducerTaskImplTest.java
@@ -71,7 +71,7 @@ class AaiProducerTaskImplTest {
static void setUp() {
aaiClientConfiguration = new ImmutableAaiClientConfiguration.Builder()
.aaiHost(AAI_HOST)
- .aaiHostPortNumber(PORT)
+ .aaiPort(PORT)
.aaiProtocol(PROTOCOL)
.aaiUserName(USER_NAME_PASSWORD)
.aaiUserPassword(USER_NAME_PASSWORD)
diff --git a/prh-app-server/src/test/resources/prh_endpoints.json b/prh-app-server/src/test/resources/prh_endpoints.json
index b45ce485..84ad4fc8 100644
--- a/prh-app-server/src/test/resources/prh_endpoints.json
+++ b/prh-app-server/src/test/resources/prh_endpoints.json
@@ -3,7 +3,7 @@
"aai": {
"aaiClientConfiguration": {
"aaiHost": "localhost",
- "aaiHostPortNumber": 8080,
+ "aaiPort": 8080,
"aaiIgnoreSSLCertificateErrors": true,
"aaiProtocol": "https",
"aaiUserName": "AAI",
@@ -14,7 +14,8 @@
"X-FromAppId": "prh",
"X-TransactionId": "9999",
"Accept": "application/json",
- "Real-Time": "true"
+ "Real-Time": "true",
+ "Content-Type":"application/merge-patch+json"
}
}
},