diff options
Diffstat (limited to 'sdnr/wt/data-provider/setup/src/main/java')
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\": " |