Adding AAI reactive webClient

Change-Id: Iedf88dfe12f41f0d994bcfc7c94e21ddf945a001
Issue-ID: DCAEGEN2-609
Signed-off-by: pwielebs <piotr.wielebski@nokia.com>
diff --git a/prh-app-server/config/prh_endpoints.json b/prh-app-server/config/prh_endpoints.json
index f5f7959..429dac4 100644
--- a/prh-app-server/config/prh_endpoints.json
+++ b/prh-app-server/config/prh_endpoints.json
@@ -27,7 +27,7 @@
     "aai": {
       "aaiClientConfiguration": {
         "aaiHost": "localhost",
-        "aaiHostPortNumber": 8080,
+        "aaiPort": 8080,
         "aaiProtocol": "https",
         "aaiUserName": "AAI",
         "aaiUserPassword": "AAI",
@@ -38,7 +38,8 @@
           "X-FromAppId": "prh",
           "X-TransactionId": "9999",
           "Accept": "application/json",
-          "Real-Time": "true"
+          "Real-Time": "true",
+          "Content-Type":"application/merge-patch+json"
         }
       }
     }
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 e10c51d..c1000fe 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 String aaiHost;
 
     @Value("${aai.aaiClientConfiguration.aaiHostPortNumber:}")
-    public Integer aaiHostPortNumber;
+    public Integer aaiPort;
 
     @Value("${aai.aaiClientConfiguration.aaiProtocol:}")
     public String aaiProtocol;
@@ -161,9 +161,9 @@
     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 71c996b..6d1c4b9 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 @@
 
     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 @@
         + "\"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 8af562b..ea458a0 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 @@
     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 5e60bf0..9020612 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 @@
     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 b45ce48..84ad4fc 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"
         }
       }
     },