diff options
author | highstreetherbert <herbert.eiselt@highstreet-technologies.com> | 2020-07-13 19:05:55 +0200 |
---|---|---|
committer | highstreetherbert <herbert.eiselt@highstreet-technologies.com> | 2020-07-15 10:40:35 +0200 |
commit | 7dfb26b3c3a35fe73684019fbcf68ab6c9cf091a (patch) | |
tree | d2b3fac81dcfabd5c463bc2071e1f477236e744c /sdnr/wt/data-provider/provider/src/main/java | |
parent | 5dfcc4c815f930edb9fc9f5f94a9ef6d9791a709 (diff) |
SDN-R common Elasticsearch 7.x support
Extend SDN-R common for Elasticsearch 7.x support
Issue-ID: SDNC-1284
Signed-off-by: highstreetherbert <herbert.eiselt@highstreet-technologies.com>
Change-Id: I4c4f66f73f8adbdf2a9ba4f77d1e2d274ce49892
Signed-off-by: highstreetherbert <herbert.eiselt@highstreet-technologies.com>
Diffstat (limited to 'sdnr/wt/data-provider/provider/src/main/java')
2 files changed, 3 insertions, 6 deletions
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 */ |