summaryrefslogtreecommitdiffstats
path: root/dcae-analytics
diff options
context:
space:
mode:
authorVijay Venkatesh Kumar <vv770d@att.com>2020-03-20 21:28:02 +0000
committerGerrit Code Review <gerrit@onap.org>2020-03-20 21:28:02 +0000
commit4f3d731d6910c96da55eabca5b3b7fdc122e5f71 (patch)
tree4a153a708b0ba84c4e84ceb66949cc4e5cd8e26b /dcae-analytics
parent68dc5ec35c81214f8451426cd51f43a463dd69db (diff)
parent6b79a386cd7bc3cac6bc03fec9d5405b5a6c50cf (diff)
Merge "modify aai enrichment can be disabled"
Diffstat (limited to 'dcae-analytics')
-rw-r--r--dcae-analytics/dcae-analytics-tca-web/src/main/java/org/onap/dcae/analytics/tca/web/TcaAppProperties.java2
-rw-r--r--dcae-analytics/dcae-analytics-tca-web/src/main/java/org/onap/dcae/analytics/tca/web/config/TcaAaiConfig.java6
2 files changed, 7 insertions, 1 deletions
diff --git a/dcae-analytics/dcae-analytics-tca-web/src/main/java/org/onap/dcae/analytics/tca/web/TcaAppProperties.java b/dcae-analytics/dcae-analytics-tca-web/src/main/java/org/onap/dcae/analytics/tca/web/TcaAppProperties.java
index 2698d9b..fe905f4 100644
--- a/dcae-analytics/dcae-analytics-tca-web/src/main/java/org/onap/dcae/analytics/tca/web/TcaAppProperties.java
+++ b/dcae-analytics/dcae-analytics-tca-web/src/main/java/org/onap/dcae/analytics/tca/web/TcaAppProperties.java
@@ -88,7 +88,7 @@ public class TcaAppProperties extends BaseConfigBindingServiceProperties {
aai.setUrl(environment.getProperty(ConfigBindingServiceConstants.AAIURL));
aai.setUsername(environment.getProperty(ConfigBindingServiceConstants.AAIUSERNAME));
aai.setPassword(environment.getProperty(ConfigBindingServiceConstants.AAIPASSWORD));
- aai.setGenericVnfPath(ConfigBindingServiceConstants.AAIGENERICVNFPATH);
+ aai.setGenericVnfPath(environment.getProperty(ConfigBindingServiceConstants.AAIGENERICVNFPATH));
aai.setNodeQueryPath(environment.getProperty(ConfigBindingServiceConstants.AAINODEQUERYPATH));
tca.setAai(aai);
diff --git a/dcae-analytics/dcae-analytics-tca-web/src/main/java/org/onap/dcae/analytics/tca/web/config/TcaAaiConfig.java b/dcae-analytics/dcae-analytics-tca-web/src/main/java/org/onap/dcae/analytics/tca/web/config/TcaAaiConfig.java
index 773b9d3..4ec42d5 100644
--- a/dcae-analytics/dcae-analytics-tca-web/src/main/java/org/onap/dcae/analytics/tca/web/config/TcaAaiConfig.java
+++ b/dcae-analytics/dcae-analytics-tca-web/src/main/java/org/onap/dcae/analytics/tca/web/config/TcaAaiConfig.java
@@ -46,6 +46,9 @@ public class TcaAaiConfig {
@Bean
public RestTemplate aaiRestTemplate(final TcaAaiRestClientPreferences aaiRestClientPreferences,
final RestTemplateBuilder restTemplateBuilder) {
+ if(aaiRestClientPreferences == null) {
+ return null;
+ }
return restTemplateBuilder
.additionalCustomizers(new HttpClientPreferencesCustomizer<>(aaiRestClientPreferences))
.build();
@@ -54,6 +57,9 @@ public class TcaAaiConfig {
@Bean
public TcaAaiEnrichmentService aaiEnrichmentService(final TcaAppProperties tcaAppProperties,
final RestTemplate aaiRestTemplate) {
+ if (aaiRestTemplate == null) {
+ return null;
+ }
return new TcaAaiEnrichmentServiceImpl(tcaAppProperties, aaiRestTemplate);
}