summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSteven Blimkie <Steven.Blimkie@amdocs.com>2017-10-13 19:53:14 +0000
committerGerrit Code Review <gerrit@onap.org>2017-10-13 19:53:14 +0000
commit9ea50a0fa4afa95e4090f1ab4a607e6e1bc04ed2 (patch)
treeef0b6ef7556337d8d5151b33cf40e470297086cc /src
parent25dea2d3021dd0b1e54a93dea5b296781abe828f (diff)
parent693ae815dc41650498fefb87bf2d4a1639a3b855 (diff)
Merge "Fixing the startup after junit increase"
Diffstat (limited to 'src')
-rw-r--r--src/main/config/ajsc-override-web.xml10
-rw-r--r--src/main/config/runner-web.xml12
-rw-r--r--src/main/java/org/onap/aai/sparky/HelloWorld.java46
-rw-r--r--src/main/java/org/onap/aai/sparky/dal/sas/config/SearchServiceConfig.java5
-rw-r--r--src/main/java/org/onap/aai/sparky/synchronizer/task/PerformActiveInventoryRetrieval.java4
-rw-r--r--src/main/java/org/onap/aai/sparky/util/KeystoreBuilder.java2
-rw-r--r--src/test/resources/appconfig/elasticsearch.properties2
-rw-r--r--src/test/resources/appconfig/etc/ajsc-override-web.xml10
-rw-r--r--src/test/resources/appconfig/etc/runner-web.xml12
-rw-r--r--src/test/resources/appconfig/search-service.properties3
10 files changed, 50 insertions, 56 deletions
diff --git a/src/main/config/ajsc-override-web.xml b/src/main/config/ajsc-override-web.xml
index c07a539..c66ac89 100644
--- a/src/main/config/ajsc-override-web.xml
+++ b/src/main/config/ajsc-override-web.xml
@@ -26,16 +26,6 @@
<url-pattern>/visualization/*</url-pattern>
</servlet-mapping>
- <servlet-mapping>
- <servlet-name>GeoVisualizationServlet</servlet-name>
- <url-pattern>/visualization/geovisualization/*</url-pattern>
- </servlet-mapping>
-
- <servlet-mapping>
- <servlet-name>EntityCountHistoryServlet</servlet-name>
- <url-pattern>/visualization/entityCountHistory/*</url-pattern>
- </servlet-mapping>
-
<filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/*</url-pattern>
diff --git a/src/main/config/runner-web.xml b/src/main/config/runner-web.xml
index f70d71b..1c6ccdc 100644
--- a/src/main/config/runner-web.xml
+++ b/src/main/config/runner-web.xml
@@ -30,18 +30,6 @@
<servlet-class>org.onap.aai.sparky.viewandinspect.servlet.VisualizationServlet</servlet-class>
</servlet>
- <servlet>
- <servlet-name>GeoVisualizationServlet</servlet-name>
- <servlet-class>org.onap.aai.sparky.inventory.servlet.GeoVisualizationServlet</servlet-class>
- </servlet>
-
- <servlet>
- <servlet-name>EntityCountHistoryServlet</servlet-name>
- <servlet-class>org.onap.aai.sparky.inventory.servlet.EntityCountHistoryServlet</servlet-class>
- </servlet>
-
-
-
<filter>
<filter-name>ElasticSearchSynchronizerFilter</filter-name>
<filter-class>org.onap.aai.sparky.synchronizer.filter.ElasticSearchSynchronizerFilter</filter-class>
diff --git a/src/main/java/org/onap/aai/sparky/HelloWorld.java b/src/main/java/org/onap/aai/sparky/HelloWorld.java
new file mode 100644
index 0000000..688416b
--- /dev/null
+++ b/src/main/java/org/onap/aai/sparky/HelloWorld.java
@@ -0,0 +1,46 @@
+/**
+ * ============LICENSE_START=======================================================
+ * org.onap.aai
+ * ================================================================================
+ * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright © 2017 Amdocs
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ */
+package org.onap.aai.sparky;
+
+import org.apache.camel.Exchange;
+
+/**
+ * The Class HelloWorld.
+ */
+public class HelloWorld {
+
+ /**
+ * Instantiates a new hello world.
+ */
+ public HelloWorld() {}
+
+ /**
+ * Speak.
+ *
+ * @param exc the exc
+ */
+ public final void speak(Exchange exc) {
+ exc.setOut(exc.getIn());
+ exc.getOut().setBody("Hello World!");
+ }
+} \ No newline at end of file
diff --git a/src/main/java/org/onap/aai/sparky/dal/sas/config/SearchServiceConfig.java b/src/main/java/org/onap/aai/sparky/dal/sas/config/SearchServiceConfig.java
index 66e7d7b..ff3a151 100644
--- a/src/main/java/org/onap/aai/sparky/dal/sas/config/SearchServiceConfig.java
+++ b/src/main/java/org/onap/aai/sparky/dal/sas/config/SearchServiceConfig.java
@@ -70,9 +70,6 @@ public class SearchServiceConfig {
private static final String TOPOGRAPHICAL_INDEX_NAME_DEFAULT =
"topographicalsearchindex-localhost";
- private static final String ENTITY_COUNT_HISTORY_INDEX_NAME_DEFAULT =
- "entitycounthistoryindex-localhost";
-
private static final String VERSION_DEFAULT = "v1";
public static SearchServiceConfig getConfig() throws Exception {
@@ -111,8 +108,6 @@ public class SearchServiceConfig {
auditIndexName = sasProps.getProperty("auditIndexName", AUDIT_INDEX_NAME_DEFAULT);
topographicalSearchIndex = sasProps.getProperty("topographicalIndexName",
TOPOGRAPHICAL_INDEX_NAME_DEFAULT);
- entityCountHistoryIndex = sasProps.getProperty("entityCountHistoryIndexName",
- ENTITY_COUNT_HISTORY_INDEX_NAME_DEFAULT);
certName =
sasProps.getProperty("ssl.cert-name", "aai-client-cert.p12");
keystorePassword = sasProps.getProperty("ssl.keystore-password",
diff --git a/src/main/java/org/onap/aai/sparky/synchronizer/task/PerformActiveInventoryRetrieval.java b/src/main/java/org/onap/aai/sparky/synchronizer/task/PerformActiveInventoryRetrieval.java
index cde59d3..f3b1dff 100644
--- a/src/main/java/org/onap/aai/sparky/synchronizer/task/PerformActiveInventoryRetrieval.java
+++ b/src/main/java/org/onap/aai/sparky/synchronizer/task/PerformActiveInventoryRetrieval.java
@@ -27,6 +27,7 @@ import java.util.function.Supplier;
import org.onap.aai.sparky.dal.NetworkTransaction;
import org.onap.aai.sparky.dal.aai.ActiveInventoryDataProvider;
+import org.onap.aai.sparky.dal.aai.config.ActiveInventoryConfig;
import org.onap.aai.sparky.dal.rest.OperationResult;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -74,7 +75,8 @@ public class PerformActiveInventoryRetrieval implements Supplier<NetworkTransact
OperationResult result = null;
try {
// todo: use proper config instead of hard-coding parameters
- result = aaiProvider.queryActiveInventoryWithRetries(txn.getLink(), "application/json", 5);
+ final String absoluteSelfLink = ActiveInventoryConfig.getConfig().repairSelfLink(txn.getLink());
+ result = aaiProvider.queryActiveInventoryWithRetries(absoluteSelfLink, "application/json", 5);
} catch (Exception exc) {
logger.error("Failure to resolve self link from AAI. Error = ", exc);
result = new OperationResult(500,
diff --git a/src/main/java/org/onap/aai/sparky/util/KeystoreBuilder.java b/src/main/java/org/onap/aai/sparky/util/KeystoreBuilder.java
index 54474db..9f9f8c9 100644
--- a/src/main/java/org/onap/aai/sparky/util/KeystoreBuilder.java
+++ b/src/main/java/org/onap/aai/sparky/util/KeystoreBuilder.java
@@ -207,7 +207,7 @@ public class KeystoreBuilder {
} else {
System.out.println("keystore file doesn't exist, preloading new file with jssecacerts");
}
- password = "changeit";
+ password = keystorePassword;
}
diff --git a/src/test/resources/appconfig/elasticsearch.properties b/src/test/resources/appconfig/elasticsearch.properties
index 55e4350..07f16dc 100644
--- a/src/test/resources/appconfig/elasticsearch.properties
+++ b/src/test/resources/appconfig/elasticsearch.properties
@@ -16,8 +16,6 @@ elasticsearch.javaApiPort=8443
# Index names for various searches.
#
elasticsearch.indexName=entity-search-index
-elasticsearch.topographicalIndexName=topography-search-index
-elasticsearch.entityCountHistoryIndexName=entitycounthistoryindex
elasticsearch.autosuggestIndexname=entity-autosuggest-index
# Default document type
diff --git a/src/test/resources/appconfig/etc/ajsc-override-web.xml b/src/test/resources/appconfig/etc/ajsc-override-web.xml
index c07a539..c66ac89 100644
--- a/src/test/resources/appconfig/etc/ajsc-override-web.xml
+++ b/src/test/resources/appconfig/etc/ajsc-override-web.xml
@@ -26,16 +26,6 @@
<url-pattern>/visualization/*</url-pattern>
</servlet-mapping>
- <servlet-mapping>
- <servlet-name>GeoVisualizationServlet</servlet-name>
- <url-pattern>/visualization/geovisualization/*</url-pattern>
- </servlet-mapping>
-
- <servlet-mapping>
- <servlet-name>EntityCountHistoryServlet</servlet-name>
- <url-pattern>/visualization/entityCountHistory/*</url-pattern>
- </servlet-mapping>
-
<filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/*</url-pattern>
diff --git a/src/test/resources/appconfig/etc/runner-web.xml b/src/test/resources/appconfig/etc/runner-web.xml
index f70d71b..1c6ccdc 100644
--- a/src/test/resources/appconfig/etc/runner-web.xml
+++ b/src/test/resources/appconfig/etc/runner-web.xml
@@ -30,18 +30,6 @@
<servlet-class>org.onap.aai.sparky.viewandinspect.servlet.VisualizationServlet</servlet-class>
</servlet>
- <servlet>
- <servlet-name>GeoVisualizationServlet</servlet-name>
- <servlet-class>org.onap.aai.sparky.inventory.servlet.GeoVisualizationServlet</servlet-class>
- </servlet>
-
- <servlet>
- <servlet-name>EntityCountHistoryServlet</servlet-name>
- <servlet-class>org.onap.aai.sparky.inventory.servlet.EntityCountHistoryServlet</servlet-class>
- </servlet>
-
-
-
<filter>
<filter-name>ElasticSearchSynchronizerFilter</filter-name>
<filter-class>org.onap.aai.sparky.synchronizer.filter.ElasticSearchSynchronizerFilter</filter-class>
diff --git a/src/test/resources/appconfig/search-service.properties b/src/test/resources/appconfig/search-service.properties
index 13e25ac..4f7f036 100644
--- a/src/test/resources/appconfig/search-service.properties
+++ b/src/test/resources/appconfig/search-service.properties
@@ -15,9 +15,6 @@ search-service.httpPort=9509
#
# Searchable entities
search-service.indexName=entity-search-index
-# Inventory searches
-search-service.topographicalIndexName=topography-search-index
-search-service.entityCountHistoryIndexName=entitycounthistoryindex
############################## Version ##############################
#