summaryrefslogtreecommitdiffstats
path: root/asdctool/src/main/java/org
diff options
context:
space:
mode:
Diffstat (limited to 'asdctool/src/main/java/org')
-rw-r--r--asdctool/src/main/java/org/openecomp/sdc/asdctool/main/DataSchemaMenu.java12
1 files changed, 9 insertions, 3 deletions
diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/main/DataSchemaMenu.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/main/DataSchemaMenu.java
index 496eb1864e..fe117d1a1a 100644
--- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/main/DataSchemaMenu.java
+++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/main/DataSchemaMenu.java
@@ -16,6 +16,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
* ============LICENSE_END=========================================================
+ * Modifications copyright (c) 2018 Nokia
+ * ================================================================================
*/
package org.openecomp.sdc.asdctool.main;
@@ -23,6 +25,7 @@ package org.openecomp.sdc.asdctool.main;
import org.openecomp.sdc.asdctool.impl.TitanGraphInitializer;
import org.openecomp.sdc.be.config.ConfigurationManager;
import org.openecomp.sdc.be.dao.cassandra.schema.SdcSchemaBuilder;
+import org.openecomp.sdc.be.dao.cassandra.schema.SdcSchemaUtils;
import org.openecomp.sdc.common.api.ConfigurationSource;
import org.openecomp.sdc.common.impl.ExternalConfiguration;
import org.openecomp.sdc.common.impl.FSConfigurationSource;
@@ -34,7 +37,7 @@ public class DataSchemaMenu {
public static void main(String[] args) {
- String operation = args[0];
+ String operation = args[0];
String appConfigDir = args[1];
@@ -45,10 +48,13 @@ public class DataSchemaMenu {
ConfigurationSource configurationSource = new FSConfigurationSource(ExternalConfiguration.getChangeListener(), appConfigDir);
ConfigurationManager configurationManager = new ConfigurationManager(configurationSource);
+ SdcSchemaBuilder sdcSchemaBuilder = new SdcSchemaBuilder(new SdcSchemaUtils(),
+ ConfigurationManager.getConfigurationManager().getConfiguration()::getCassandraConfig);
+
switch (operation.toLowerCase()) {
case "create-cassandra-structures":
log.debug("Start create cassandra keyspace, tables and indexes");
- if (SdcSchemaBuilder.createSchema()) {
+ if (sdcSchemaBuilder.createSchema()) {
log.debug("create cassandra keyspace, tables and indexes successfull");
System.exit(0);
} else {
@@ -69,7 +75,7 @@ public class DataSchemaMenu {
break;
case "clean-cassndra":
log.debug("Start clean keyspace, tables");
- if (SdcSchemaBuilder.deleteSchema()) {
+ if (sdcSchemaBuilder.deleteSchema()) {
log.debug(" successfull");
System.exit(0);
} else {