From 7dfb26b3c3a35fe73684019fbcf68ab6c9cf091a Mon Sep 17 00:00:00 2001 From: highstreetherbert Date: Mon, 13 Jul 2020 19:05:55 +0200 Subject: SDN-R common Elasticsearch 7.x support Extend SDN-R common for Elasticsearch 7.x support Issue-ID: SDNC-1284 Signed-off-by: highstreetherbert Change-Id: I4c4f66f73f8adbdf2a9ba4f77d1e2d274ce49892 Signed-off-by: highstreetherbert --- .../sdnr/wt/dataprovider/setup/DataMigrationProviderImpl.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'sdnr/wt/data-provider/setup') diff --git a/sdnr/wt/data-provider/setup/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/setup/DataMigrationProviderImpl.java b/sdnr/wt/data-provider/setup/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/setup/DataMigrationProviderImpl.java index 821e3ec1e..dabe0047f 100644 --- a/sdnr/wt/data-provider/setup/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/setup/DataMigrationProviderImpl.java +++ b/sdnr/wt/data-provider/setup/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/setup/DataMigrationProviderImpl.java @@ -31,7 +31,6 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Set; - import org.json.JSONObject; import org.onap.ccsdk.features.sdnr.wt.common.database.HtDatabaseClient; import org.onap.ccsdk.features.sdnr.wt.common.database.Portstatus; @@ -53,8 +52,8 @@ import org.onap.ccsdk.features.sdnr.wt.common.database.responses.ListAliasesResp import org.onap.ccsdk.features.sdnr.wt.common.database.responses.ListIndicesResponse; import org.onap.ccsdk.features.sdnr.wt.dataprovider.setup.data.ComponentData; import org.onap.ccsdk.features.sdnr.wt.dataprovider.setup.data.ComponentName; -import org.onap.ccsdk.features.sdnr.wt.dataprovider.setup.data.DataMigrationReport; import org.onap.ccsdk.features.sdnr.wt.dataprovider.setup.data.DataContainer; +import org.onap.ccsdk.features.sdnr.wt.dataprovider.setup.data.DataMigrationReport; import org.onap.ccsdk.features.sdnr.wt.dataprovider.setup.data.Release; import org.onap.ccsdk.features.sdnr.wt.dataprovider.setup.data.SearchHitConverter; import org.slf4j.Logger; @@ -72,7 +71,11 @@ public class DataMigrationProviderImpl implements DataMigrationProviderService { if (timeoutms > 0) { Portstatus.waitSecondsTillAvailable(timeoutms / 1000, hosts); } - this.dbClient = new HtDatabaseClient(hosts, username, password, trustAll); + try { + this.dbClient = HtDatabaseClient.getClient(hosts, username, password, trustAll); + } catch (Exception e) { + throw new IllegalArgumentException("Can not reach database with parameters.",e); + } } @Override -- cgit 1.2.3-korg