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/data/ElasticSearchDataProvider.java | 4 +--- .../sdnr/wt/dataprovider/data/MediatorServerDataProvider.java | 5 ++--- 2 files changed, 3 insertions(+), 6 deletions(-) (limited to 'sdnr/wt/data-provider/provider/src/main/java') diff --git a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/data/ElasticSearchDataProvider.java b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/data/ElasticSearchDataProvider.java index 08db03475..76d47e3e0 100644 --- a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/data/ElasticSearchDataProvider.java +++ b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/data/ElasticSearchDataProvider.java @@ -23,14 +23,12 @@ package org.onap.ccsdk.features.sdnr.wt.dataprovider.data; import java.io.IOException; import java.util.concurrent.TimeUnit; - import org.onap.ccsdk.features.sdnr.wt.common.database.HtDatabaseClient; import org.onap.ccsdk.features.sdnr.wt.common.database.config.HostInfo; import org.onap.ccsdk.features.sdnr.wt.dataprovider.data.DataObjectAcessorPm.Intervall; import org.onap.ccsdk.features.sdnr.wt.dataprovider.model.DataProvider; import org.onap.ccsdk.features.sdnr.wt.dataprovider.model.HtDatabaseMaintenance; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.CreateMaintenanceInput; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.CreateMaintenanceInputBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.CreateMaintenanceOutputBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.CreateMediatorServerInput; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.CreateMediatorServerOutputBuilder; @@ -110,7 +108,7 @@ public class ElasticSearchDataProvider /*extends BaseStatusProvider /* implement super(); LOG.info("Start {}", this.getClass().getName()); - this.dbClient = new HtDatabaseClient(hosts, authUsername, authPassword, trustAllCerts); + this.dbClient = HtDatabaseClient.getClient(hosts, authUsername, authPassword, trustAllCerts); this.mediatorserverRW = new DataObjectAcessor<>(dbClient, Entity.MediatorServer, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.mediator.server.list.output.Data.class); this.mediatorserverRW.setWriteInterface(MediatorServerEntity.class); diff --git a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/data/MediatorServerDataProvider.java b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/data/MediatorServerDataProvider.java index 38e5b13e2..258104db4 100644 --- a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/data/MediatorServerDataProvider.java +++ b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/data/MediatorServerDataProvider.java @@ -27,7 +27,6 @@ import java.util.Map; import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; - import org.onap.ccsdk.features.sdnr.wt.common.database.HtDatabaseClient; import org.onap.ccsdk.features.sdnr.wt.common.database.SearchResult; import org.onap.ccsdk.features.sdnr.wt.common.database.config.HostInfo; @@ -55,7 +54,7 @@ public class MediatorServerDataProvider implements AutoCloseable { super(); LOG.info("Start {}", this.getClass().getName()); this.entries = new HashMap<>(); - this.dbClient = new HtDatabaseClient(hosts, authUsername, authPassword); + this.dbClient = HtDatabaseClient.getClient(hosts, authUsername, authPassword); this.mediatorserverRW = new DataObjectAcessor<>(dbClient, Entity.MediatorServer, Data.class); this.scheduler.scheduleAtFixedRate(onTick, this.REFRESH_INTERVAL, this.REFRESH_INTERVAL, TimeUnit.SECONDS); } @@ -80,7 +79,7 @@ public class MediatorServerDataProvider implements AutoCloseable { } /** - * + * * @param dbServerId * @return url or null if not exists */ -- cgit 1.2.3-korg