summaryrefslogtreecommitdiffstats
path: root/asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/core/SdcMigrationTool.java
diff options
context:
space:
mode:
Diffstat (limited to 'asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/core/SdcMigrationTool.java')
-rw-r--r--asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/core/SdcMigrationTool.java22
1 files changed, 10 insertions, 12 deletions
diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/core/SdcMigrationTool.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/core/SdcMigrationTool.java
index bdae790032..cb2f862629 100644
--- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/core/SdcMigrationTool.java
+++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/core/SdcMigrationTool.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -17,9 +17,9 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-
package org.openecomp.sdc.asdctool.migration.core;
+import java.util.List;
import org.openecomp.sdc.asdctool.migration.core.execution.MigrationExecutionResult;
import org.openecomp.sdc.asdctool.migration.core.execution.MigrationExecutorImpl;
import org.openecomp.sdc.asdctool.migration.core.task.IMigrationStage;
@@ -29,14 +29,10 @@ import org.openecomp.sdc.asdctool.migration.resolver.MigrationResolver;
import org.openecomp.sdc.asdctool.migration.service.SdcRepoService;
import org.openecomp.sdc.common.log.wrappers.Logger;
-import java.util.List;
-
public class SdcMigrationTool {
private static final Logger LOGGER = Logger.getLogger(SdcMigrationTool.class);
-
private MigrationResolver migrationsResolver;
-
private SdcRepoService sdcRepoService;
public SdcMigrationTool(MigrationResolver migrationsResolver, SdcRepoService sdcRepoService) {
@@ -56,13 +52,16 @@ public class SdcMigrationTool {
try {
MigrationExecutionResult executionResult = new MigrationExecutorImpl().execute(migration);
if (migrationHasFailed(executionResult)) {
- LOGGER.error("migration {} with version {} has failed. error msg: {}", migration.getClass().getName(), migration.getVersion().toString(), executionResult.getMsg());
+ LOGGER.error("migration {} with version {} has failed. error msg: {}", migration.getClass().getName(),
+ migration.getVersion().toString(), executionResult.getMsg());
return false;
}
- if(migration.getAspectMigration() == AspectMigrationEnum.MIGRATION)
- sdcRepoService.createMigrationTask(executionResult.toMigrationTaskEntry());
+ if (migration.getAspectMigration() == AspectMigrationEnum.MIGRATION) {
+ sdcRepoService.createMigrationTask(executionResult.toMigrationTaskEntry());
+ }
} catch (RuntimeException e) {
- LOGGER.error("migration {} with version {} has failed. error msg: {}", migration.getClass().getName(), migration.getVersion().toString(), e);
+ LOGGER.error("migration {} with version {} has failed. error msg: {}", migration.getClass().getName(),
+ migration.getVersion().toString(), e);
return false;
}
}
@@ -79,5 +78,4 @@ public class SdcMigrationTool {
sdcRepoService.clearTasksForCurrentMajor();
}
}
-
}