summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNorm Traxler <normant@amdocs.com>2018-12-17 22:24:55 +0000
committerNorm Traxler <normant@amdocs.com>2018-12-17 22:25:20 +0000
commit9c99e066e1d0021758270de2b9d99f08525d988c (patch)
tree4b6e814ba9e3a0f42b3afbceea7cd507b22df79d
parent665ae055a0a015d98e2dd78c3f3a74c04de70c43 (diff)
Bugfix: HTTP for SDNC context builder
Change code to use correct AAI protocol property. Issue-ID: LOG-904 Change-Id: I88d4b18450b398667c6a3358f2f902a6acd01dac Signed-off-by: Norm Traxler <normant@amdocs.com>
-rw-r--r--config/application.properties2
-rw-r--r--src/main/java/org/onap/pomba/contextbuilder/sdnc/SdncConfiguration.java6
2 files changed, 3 insertions, 5 deletions
diff --git a/config/application.properties b/config/application.properties
index b37456a..c454c01 100644
--- a/config/application.properties
+++ b/config/application.properties
@@ -43,7 +43,7 @@ aai.trustStorePath=n/a
aai.keyStorePath=n/a
aai.keyStorePassword=n/a
aai.connectionTimeout=5000
-aai.readTimeout=1000
+aai.readTimeout=5000
# HTTP Basic Authorization credentials for AAI Rest Service API
aai.http.userId=admin
diff --git a/src/main/java/org/onap/pomba/contextbuilder/sdnc/SdncConfiguration.java b/src/main/java/org/onap/pomba/contextbuilder/sdnc/SdncConfiguration.java
index 7317143..35fe248 100644
--- a/src/main/java/org/onap/pomba/contextbuilder/sdnc/SdncConfiguration.java
+++ b/src/main/java/org/onap/pomba/contextbuilder/sdnc/SdncConfiguration.java
@@ -22,7 +22,6 @@ import java.util.Base64;
import javax.ws.rs.ApplicationPath;
import org.eclipse.jetty.util.security.Password;
import org.onap.aai.restclient.client.RestClient;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Conditional;
@@ -159,8 +158,7 @@ public class SdncConfiguration {
@Bean(name="aaiClient")
public RestClient restClientWithClientCert() {
RestClient restClient = new RestClient();
- System.out.println("in client cert");
- if (httpProtocol.equals("https"))
+ if ("https".equals(aaiHttpProtocol))
restClient.validateServerHostname(false).validateServerCertChain(false).trustStore(trustStorePath).clientCertFile(keyStorePath).clientCertPassword(keyStorePassword).connectTimeoutMs(connectionTimeout).readTimeoutMs(readTimeout);
else
restClient.validateServerHostname(false).validateServerCertChain(false).connectTimeoutMs(connectionTimeout).readTimeoutMs(readTimeout);
@@ -169,7 +167,7 @@ public class SdncConfiguration {
@Bean(name="aaiBaseUrl")
public String getAaiURL() {
- return httpProtocol + "://" + aaiHost + ":" + aaiPort;
+ return aaiHttpProtocol + "://" + aaiHost + ":" + aaiPort;
}
@Bean(name="aaiPathToSearchNodeQuery")