diff options
author | Ravi Pendurty <ravi.pendurty@highstreet-technologies.com> | 2023-10-20 13:23:33 +0530 |
---|---|---|
committer | Ravi Pendurty <ravi.pendurty@highstreet-technologies.com> | 2023-10-20 13:24:11 +0530 |
commit | cb9bd650a1ba6c1c2f5c7dd410f640b9b6f876c7 (patch) | |
tree | 18ae49eb64806a3687d388d24a35276361759d3e /sdnr/wt/data-provider/setup/src/main | |
parent | 70cc4c4295376e4af9cb9009a6ee5ddc389d61d9 (diff) |
Extend user settings API
Extend user settings API
Issue-ID: CCSDK-3947
Change-Id: Ic0e7783abb2b084142c5bc2d36dc31810f6ca9cf
Signed-off-by: Ravi Pendurty <ravi.pendurty@highstreet-technologies.com>
Diffstat (limited to 'sdnr/wt/data-provider/setup/src/main')
2 files changed, 14 insertions, 1 deletions
diff --git a/sdnr/wt/data-provider/setup/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/setup/data/DatabaseInfo7.java b/sdnr/wt/data-provider/setup/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/setup/data/DatabaseInfo7.java index 87fc07ef9..8a7f03040 100644 --- a/sdnr/wt/data-provider/setup/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/setup/data/DatabaseInfo7.java +++ b/sdnr/wt/data-provider/setup/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/setup/data/DatabaseInfo7.java @@ -27,20 +27,33 @@ package org.onap.ccsdk.features.sdnr.wt.dataprovider.setup.data; */ public class DatabaseInfo7 extends DatabaseInfo { + private boolean disableMapping; + public DatabaseInfo7(String alias, String doctype, String mapping) { super(alias, alias, doctype, mapping); + this.disableMapping = false; } public DatabaseInfo7(String alias, String doctype, String mapping, String settingsformat) { super(alias, alias, doctype, mapping, settingsformat); + this.disableMapping = false; } public DatabaseInfo7(String index, String alias, String doctype, String mapping, String settingsformat) { super(index, alias, doctype, mapping, settingsformat); + this.disableMapping = false; } @Override public String getMapping(boolean useStrict) { + if(this.disableMapping){ + return "{\"enabled\": false}"; + } return this.mapping == null ? null : String.format("{%s\"properties\":%s}", useStrict ? "\"dynamic\": false," : "\"dynamic\": true,", this.mapping); } + + public DatabaseInfo disableMapping() { + this.disableMapping = true; + return this; + } } diff --git a/sdnr/wt/data-provider/setup/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/setup/istanbul/IstanbulReleaseInformation.java b/sdnr/wt/data-provider/setup/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/setup/istanbul/IstanbulReleaseInformation.java index 6148e21d5..ba39a81b3 100644 --- a/sdnr/wt/data-provider/setup/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/setup/istanbul/IstanbulReleaseInformation.java +++ b/sdnr/wt/data-provider/setup/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/setup/istanbul/IstanbulReleaseInformation.java @@ -170,7 +170,7 @@ public class IstanbulReleaseInformation extends ReleaseInformation { public static Map<ComponentName, DatabaseInfo> createDBMap() { Map<ComponentName, DatabaseInfo> map = HonoluluReleaseInformation.createDBMap(); - map.put(ComponentName.USERDATA, new DatabaseInfo7("userdata", "userdata", "{}")); + map.put(ComponentName.USERDATA, new DatabaseInfo7("userdata", "userdata", "").disableMapping()); map.put(ComponentName.REQUIRED_NETWORKELEMENT, new DatabaseInfo7("networkelement-connection", "networkelement-connection", "{\"node-id\": {\"type\": \"keyword\"},\"host\": {\"type\": \"keyword\"},\"port\": " |