diff options
author | Michael Dürre <michael.duerre@highstreet-technologies.com> | 2022-07-20 09:32:50 +0200 |
---|---|---|
committer | Michael Dürre <michael.duerre@highstreet-technologies.com> | 2022-07-21 12:38:52 +0200 |
commit | 25423c50e504676f15c7a57c03aad40bfc35c7e6 (patch) | |
tree | 811649e2ec44e0332e601c6563e00e914d355b9a /sdnr/wt/data-provider/provider/src/main | |
parent | cea47224b7b6afdd7b3d3ead8d08baf46eadc575 (diff) |
migrate sdnr features to sulfur
fix sdnr code for sulfur
Issue-ID: CCSDK-3692
Signed-off-by: Michael Dürre <michael.duerre@highstreet-technologies.com>
Change-Id: I0a62ade424bb978222e7ce6450215fb327f957b7
Signed-off-by: Michael Dürre <michael.duerre@highstreet-technologies.com>
Diffstat (limited to 'sdnr/wt/data-provider/provider/src/main')
7 files changed, 60 insertions, 37 deletions
diff --git a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/database/elasticsearch/EsDataObjectReaderWriter2.java b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/database/elasticsearch/EsDataObjectReaderWriter2.java index cb0f22da1..a10864c96 100644 --- a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/database/elasticsearch/EsDataObjectReaderWriter2.java +++ b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/database/elasticsearch/EsDataObjectReaderWriter2.java @@ -24,6 +24,7 @@ package org.onap.ccsdk.features.sdnr.wt.dataprovider.database.elasticsearch; import com.fasterxml.jackson.core.JsonProcessingException; import java.io.IOException; import java.lang.reflect.Field; +import java.lang.reflect.InvocationTargetException; import java.util.List; import javax.annotation.Nonnull; import javax.annotation.Nullable; @@ -92,7 +93,7 @@ public class EsDataObjectReaderWriter2<T extends DataObject> { * @param syncAfterWrite * @throws ClassNotFoundException */ - public <X extends T, @NonNull B extends Builder<X>> EsDataObjectReaderWriter2(DatabaseClient db, + public <X extends T, B> EsDataObjectReaderWriter2(DatabaseClient db, String dataTypeName, @Nonnull Class<T> clazz, @Nullable Class<B> builderClazz, boolean syncAfterWrite) throws ClassNotFoundException { LOG.info("Create {} for datatype {} class {}", this.getClass().getName(), dataTypeName, clazz.getName()); @@ -111,13 +112,13 @@ public class EsDataObjectReaderWriter2<T extends DataObject> { public void setFullsizeRequest(boolean fullsizeRequest) { this.doFullsizeRequest = fullsizeRequest; } - public <X extends T, @NonNull B extends Builder<X>> EsDataObjectReaderWriter2(DatabaseClient db, + public <X extends T, B> EsDataObjectReaderWriter2(DatabaseClient db, Entity dataTypeName, @Nonnull Class<T> clazz, @Nullable Class<B> builderClazz) throws ClassNotFoundException { this(db, dataTypeName.getName(), clazz, builderClazz, false); } - public <X extends T, @NonNull B extends Builder<X>> EsDataObjectReaderWriter2(DatabaseClient db, + public <X extends T, B> EsDataObjectReaderWriter2(DatabaseClient db, Entity dataTypeName, @Nonnull Class<T> clazz, @Nullable Class<B> builderClazz, boolean syncAfterWrite) throws ClassNotFoundException { this(db, dataTypeName.getName(), clazz, builderClazz, syncAfterWrite); @@ -160,20 +161,20 @@ public class EsDataObjectReaderWriter2<T extends DataObject> { * @return this for further operations. * @throws SecurityException if no access or IllegalArgumentException if wrong type or no attribute with this name. */ - public EsDataObjectReaderWriter2<T> setEsIdAttributeName(String esIdAttributeName) { + public <B> EsDataObjectReaderWriter2<T> setEsIdAttributeName(String esIdAttributeName) { LOG.debug("Set attribute '{}'", esIdAttributeName); this.esIdAddAtributteName = null; // Reset status this.field = null; Field attributeField; try { - Builder<? extends T> builder = yangtoolsMapper.getBuilder(clazz); + B builder = yangtoolsMapper.getBuilder(clazz); if (builder == null) { String msg = "No builder for " + clazz; LOG.debug(msg); throw new IllegalArgumentException(msg); } else { - T object = builder.build(); + T object = YangToolsMapperHelper.callBuild(builder); attributeField = object.getClass().getDeclaredField(esIdAttributeName); if (attributeField.getType().equals(String.class)) { attributeField.setAccessible(true); @@ -193,7 +194,19 @@ public class EsDataObjectReaderWriter2<T extends DataObject> { } catch (SecurityException e) { LOG.debug("Access problem " + esIdAttributeName, e); throw e; - } + } catch (NoSuchMethodException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (IllegalAccessException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (IllegalArgumentException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (InvocationTargetException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } return this; } diff --git a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/database/elasticsearch/data/acessor/DataObjectAcessorStatus.java b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/database/elasticsearch/data/acessor/DataObjectAcessorStatus.java index 5811550e6..9a4033b99 100644 --- a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/database/elasticsearch/data/acessor/DataObjectAcessorStatus.java +++ b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/database/elasticsearch/data/acessor/DataObjectAcessorStatus.java @@ -26,14 +26,15 @@ import org.onap.ccsdk.features.sdnr.wt.common.database.ExtRestClient; 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.queries.QueryBuilder; -import org.onap.ccsdk.features.sdnr.wt.common.database.queries.QueryBuilders; import org.onap.ccsdk.features.sdnr.wt.common.database.requests.SearchRequest; import org.onap.ccsdk.features.sdnr.wt.common.database.responses.AggregationEntries; import org.onap.ccsdk.features.sdnr.wt.common.database.responses.SearchResponse; +import org.onap.ccsdk.features.sdnr.wt.dataprovider.database.elasticsearch.data.rpctypehelper.QueryByFilter; import org.onap.ccsdk.features.sdnr.wt.dataprovider.database.elasticsearch.data.rpctypehelper.QueryResult; import org.onap.ccsdk.features.sdnr.wt.dataprovider.model.types.YangHelper2; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.ConnectionLogStatus; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.Entity; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.EntityInput; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.read.status.output.Data; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.read.status.output.DataBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.status.entity.FaultsBuilder; @@ -54,9 +55,11 @@ public class DataObjectAcessorStatus extends DataObjectAcessor<Data> { } - public QueryResult<Data> getDataStatus() throws IOException { + public QueryResult<Data> getDataStatus(EntityInput input) throws IOException { SearchRequest request = getNewInstanceOfSearchRequest(Entity.Faultcurrent); - QueryBuilder query = QueryBuilders.matchAllQuery().aggregations(ESDATATYPE_FAULTCURRENT_SEVERITY_KEY).size(0); + QueryByFilter queryByFilter = new QueryByFilter(input); + QueryBuilder query = queryByFilter.getQueryBuilderByFilter(); + query.aggregations(ESDATATYPE_FAULTCURRENT_SEVERITY_KEY).size(0); if(this.doFullsizeRequest) { query.doFullsizeRequest(); } @@ -71,7 +74,7 @@ public class DataObjectAcessorStatus extends DataObjectAcessor<Data> { .setWarnings(YangHelper2.getLongOrUint32(aggs.getOrDefault("Warning", 0L))).build()); request = getNewInstanceOfSearchRequest(Entity.NetworkelementConnection); - query = QueryBuilders.matchAllQuery().aggregations(ESDATATYPE_NECON_CONNECTIONSTATE_KEY).size(0); + query.aggregations(ESDATATYPE_NECON_CONNECTIONSTATE_KEY).size(0); if(this.doFullsizeRequest) { query.doFullsizeRequest(); } diff --git a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/database/elasticsearch/impl/ElasticSearchDataProvider.java b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/database/elasticsearch/impl/ElasticSearchDataProvider.java index 38ea8044e..753930cdd 100644 --- a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/database/elasticsearch/impl/ElasticSearchDataProvider.java +++ b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/database/elasticsearch/impl/ElasticSearchDataProvider.java @@ -352,7 +352,7 @@ public class ElasticSearchDataProvider implements DatabaseDataProvider { outputBuilder.setPagination( new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.read.pmdata._15m.ltp.list.output.PaginationBuilder( result.getPagination()).build()); - outputBuilder.setData(result.getResult().getHits()); + outputBuilder.setData(result.getResult().getHitSets()); return outputBuilder; } @@ -363,7 +363,7 @@ public class ElasticSearchDataProvider implements DatabaseDataProvider { outputBuilder.setPagination( new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.read.pmdata._15m.device.list.output.PaginationBuilder( result.getPagination()).build()); - outputBuilder.setData(result.getResult().getHits()); + outputBuilder.setData(result.getResult().getHitSets()); return outputBuilder; } @@ -377,7 +377,7 @@ public class ElasticSearchDataProvider implements DatabaseDataProvider { outputBuilder.setPagination( new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.read.pmdata._24h.ltp.list.output.PaginationBuilder( result.getPagination()).build()); - outputBuilder.setData(result.getResult().getHits()); + outputBuilder.setData(result.getResult().getHitSets()); return outputBuilder; } @@ -390,14 +390,15 @@ public class ElasticSearchDataProvider implements DatabaseDataProvider { outputBuilder.setPagination( new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.read.pmdata._24h.device.list.output.PaginationBuilder( result.getPagination()).build()); - outputBuilder.setData(result.getResult().getHits()); + outputBuilder.setData(result.getResult().getHitSets()); return outputBuilder; } + @Override - public ReadStatusOutputBuilder readStatus() throws IOException { + public ReadStatusOutputBuilder readStatus(EntityInput input) throws IOException { QueryResult<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.read.status.output.Data> result = - readStatus.getDataStatus(); + readStatus.getDataStatus(input); ReadStatusOutputBuilder outputBuilder = new ReadStatusOutputBuilder(); outputBuilder.setData(result.getResult().getHits()); diff --git a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/database/elasticsearch/impl/HtUserdataManagerImpl.java b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/database/elasticsearch/impl/HtUserdataManagerImpl.java index 7b7dccc96..21e2694a9 100644 --- a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/database/elasticsearch/impl/HtUserdataManagerImpl.java +++ b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/database/elasticsearch/impl/HtUserdataManagerImpl.java @@ -21,7 +21,6 @@ */ package org.onap.ccsdk.features.sdnr.wt.dataprovider.database.elasticsearch.impl; -import org.json.JSONObject; import org.onap.ccsdk.features.sdnr.wt.common.database.HtDatabaseClient; import org.onap.ccsdk.features.sdnr.wt.common.database.SearchHit; import org.onap.ccsdk.features.sdnr.wt.common.database.SearchResult; @@ -47,9 +46,7 @@ public class HtUserdataManagerImpl extends HtUserdataManagerBase { @Override public boolean setUserdata(String username, String data) { - JSONObject o = new JSONObject(this.getUserdata(username)); - JSONObject merge = mergeData(new JSONObject(data), o); - return this.dbClient.doWriteRaw(Entity.Userdata.getName(), username, merge.toString()) != null; + return this.dbClient.doWriteRaw(Entity.Userdata.getName(), username, data) != null; } @Override diff --git a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/database/nodb/NoDbDatabaseDataProvider.java b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/database/nodb/NoDbDatabaseDataProvider.java index e2ba9567e..54cf32ce0 100644 --- a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/database/nodb/NoDbDatabaseDataProvider.java +++ b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/database/nodb/NoDbDatabaseDataProvider.java @@ -72,7 +72,7 @@ public class NoDbDatabaseDataProvider implements DatabaseDataProvider { private final HtDatabaseMediatorserver mediatorserver; private final HtDatabaseMaintenance maintenance; private final DataProvider dataprovider; - + public NoDbDatabaseDataProvider() { this.usermanger = new NoDbHtUserdataManager(); this.mediatorserver = new NoDbHtDatabaseMediatorserver(); @@ -160,7 +160,7 @@ public class NoDbDatabaseDataProvider implements DatabaseDataProvider { } @Override - public ReadStatusOutputBuilder readStatus() throws IOException { + public ReadStatusOutputBuilder readStatus(EntityInput input) throws IOException { return new ReadStatusOutputBuilder(); } diff --git a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/http/about/ODLVersionLUT.java b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/http/about/ODLVersionLUT.java index 29d9ee9db..6ddc092d5 100644 --- a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/http/about/ODLVersionLUT.java +++ b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/http/about/ODLVersionLUT.java @@ -32,6 +32,9 @@ public class ODLVersionLUT { if (onapCCSDKVersion == null) { return def; } + if (onapCCSDKVersion.startsWith("2.4.")) { + return "ONAP Kohn"; + } if (onapCCSDKVersion.startsWith("2.3.")) { return "ONAP Jakarta"; } @@ -66,6 +69,8 @@ public class ODLVersionLUT { } if(odlMdsalVersionLUT==null) { odlMdsalVersionLUT = new HashMap<>(); + odlMdsalVersionLUT.put("9.0.2","sulfur-SR0 (0.16.0)"); + odlMdsalVersionLUT.put("8.0.11","phosphorus-SR2 (0.15.2)"); odlMdsalVersionLUT.put("8.0.7","phosphorus-SR1 (0.15.1)"); odlMdsalVersionLUT.put("8.0.5","phosphorus-SR0 (0.15.0)"); odlMdsalVersionLUT.put("7.0.9","silicon-SR2 (0.14.2)"); diff --git a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/impl/DataProviderServiceImpl.java b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/impl/DataProviderServiceImpl.java index 41fee76ad..b75108ab2 100644 --- a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/impl/DataProviderServiceImpl.java +++ b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/impl/DataProviderServiceImpl.java @@ -27,9 +27,12 @@ import com.google.common.util.concurrent.ListenableFuture; import java.io.IOException; import java.io.PrintWriter; import java.io.StringWriter; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; import java.util.Arrays; import java.util.Map; import java.util.Optional; +import java.util.Set; import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; @@ -38,7 +41,6 @@ import org.onap.ccsdk.features.sdnr.wt.common.configuration.ConfigurationFileRep import org.onap.ccsdk.features.sdnr.wt.common.database.HtDatabaseClient; import org.onap.ccsdk.features.sdnr.wt.dataprovider.database.DatabaseDataProvider; import org.onap.ccsdk.features.sdnr.wt.dataprovider.database.elasticsearch.impl.ElasticSearchDataProvider; -import org.onap.ccsdk.features.sdnr.wt.dataprovider.database.elasticsearch.impl.HtUserdataManagerImpl; import org.onap.ccsdk.features.sdnr.wt.dataprovider.database.nodb.NoDbDatabaseDataProvider; import org.onap.ccsdk.features.sdnr.wt.dataprovider.database.sqldb.data.SqlDBDataProvider; import org.onap.ccsdk.features.sdnr.wt.dataprovider.http.MsServlet; @@ -47,6 +49,7 @@ import org.onap.ccsdk.features.sdnr.wt.dataprovider.model.HtDatabaseMaintenance; import org.onap.ccsdk.features.sdnr.wt.dataprovider.model.HtUserdataManager; import org.onap.ccsdk.features.sdnr.wt.dataprovider.model.IEsConfig; import org.onap.ccsdk.features.sdnr.wt.dataprovider.model.SdnrDbType; +import org.onap.ccsdk.features.sdnr.wt.yang.mapper.YangToolsMapperHelper; import org.opendaylight.mdsal.binding.api.DataBroker; import org.opendaylight.mdsal.binding.api.ReadTransaction; import org.opendaylight.mdsal.binding.api.RpcProviderService; @@ -112,11 +115,10 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.pro import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.UpdateNetworkElementConnectionOutput; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.read.tls.key.entry.output.Pagination; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.read.tls.key.entry.output.PaginationBuilder; -import org.opendaylight.yangtools.concepts.Builder; import org.opendaylight.yangtools.concepts.ObjectRegistration; import org.opendaylight.yangtools.yang.binding.DataObject; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; -import org.opendaylight.yangtools.yang.common.RpcError.ErrorType; +import org.opendaylight.yangtools.yang.common.ErrorType; import org.opendaylight.yangtools.yang.common.RpcResult; import org.opendaylight.yangtools.yang.common.RpcResultBuilder; import org.opendaylight.yangtools.yang.common.Uint32; @@ -165,7 +167,7 @@ public class DataProviderServiceImpl implements DataProviderService, AutoCloseab // Register ourselves as the REST API RPC implementation LOG.info("Register RPC Service {}", DataProviderServiceImpl.class.getSimpleName()); this.rpcReg = rpcProviderService.registerRpcImplementation(DataProviderService.class, this); - + } private void sendResyncCallbackToApiGateway() { @@ -279,7 +281,8 @@ public class DataProviderServiceImpl implements DataProviderService, AutoCloseab @Override public ListenableFuture<RpcResult<ReadStatusOutput>> readStatus(ReadStatusInput input) { LOG.debug("RPC Request: readStatusEntityList with input {}", input); - RpcResultBuilder<ReadStatusOutput> result = read(() -> DataProviderServiceImpl.this.dataProvider.readStatus()); + RpcResultBuilder<ReadStatusOutput> result = + read(() -> DataProviderServiceImpl.this.dataProvider.readStatus(input)); return result.buildFuture(); } @@ -460,11 +463,11 @@ public class DataProviderServiceImpl implements DataProviderService, AutoCloseab } ReadTlsKeyEntryOutputBuilder output = new ReadTlsKeyEntryOutputBuilder(); if (result.isEmpty()) { - return output.setData(Arrays.asList()).setPagination(EMPTY_PAGINATION); + return output.setData(Set.of()).setPagination(EMPTY_PAGINATION); } Map<KeyCredentialKey, KeyCredential> keyCredential = result.get().getKeyCredential(); if (keyCredential == null) { - return output.setData(Arrays.asList()).setPagination(EMPTY_PAGINATION); + return output.setData(Set.of()).setPagination(EMPTY_PAGINATION); } org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.entity.input.Pagination pagination = input.getPagination(); @@ -474,7 +477,7 @@ public class DataProviderServiceImpl implements DataProviderService, AutoCloseab : pagination.getSize() == null ? DEFAULT_PAGESIZE : pagination.getSize().longValue(); long from = pageNum > 0 ? (pageNum - 1) * size : 0; output.setData(keyCredential.keySet().stream().skip(from).limit(size).map(e -> e.getKeyId()) - .collect(Collectors.toList())); + .collect(Collectors.toSet())); output.setPagination(new PaginationBuilder().setPage(Uint64.valueOf(pageNum)) .setSize(Uint32.valueOf(output.getData().size())).setTotal(Uint64.valueOf(keyCredential.size())) .build()); @@ -492,16 +495,16 @@ public class DataProviderServiceImpl implements DataProviderService, AutoCloseab return buf.toString(); } - private interface GetEntityInput<O extends DataObject> { - Builder<O> get() throws IOException; + private interface GetEntityInput<O extends DataObject,B> { + B get() throws IOException; } - private static <O extends DataObject, I extends DataObject> RpcResultBuilder<O> read( - GetEntityInput<O> inputgetter) { + private static <O extends DataObject, B> RpcResultBuilder<O> read( + GetEntityInput<O,B> inputgetter) { RpcResultBuilder<O> result; try { - Builder<O> outputBuilder = inputgetter.get(); - result = RpcResultBuilder.success(outputBuilder); + B outputBuilder = inputgetter.get(); + result = RpcResultBuilder.success(YangToolsMapperHelper.callBuild(outputBuilder)); } catch (Exception e) { LOG.info("Exception", e); result = RpcResultBuilder.failed(); @@ -510,6 +513,7 @@ public class DataProviderServiceImpl implements DataProviderService, AutoCloseab return result; } + public HtUserdataManager getHtDatabaseUserManager() { return this.dbUserManager; } |