* 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;
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;
public static void main(String[] args) {
- String operation = args[0];
+ String operation = args[0];
String appConfigDir = args[1];
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 {
break;
case "clean-cassndra":
log.debug("Start clean keyspace, tables");
- if (SdcSchemaBuilder.deleteSchema()) {
+ if (sdcSchemaBuilder.deleteSchema()) {
log.debug(" successfull");
System.exit(0);
} else {