From 2ef3886c9b0223f4813ac1385318d6f2e600a4a8 Mon Sep 17 00:00:00 2001 From: Tal Gitelman Date: Mon, 30 Apr 2018 19:06:20 +0300 Subject: Remove dead code asdctool Change-Id: I467f70b442a02a15b8a18b160309bac9a8ab3f9a Issue-ID: SDC-1270 Signed-off-by: Tal Gitelman --- .../org/openecomp/sdc/asdctool/impl/ArtifactUuidFix.java | 2 +- .../org/openecomp/sdc/asdctool/impl/GraphMLConverter.java | 2 -- .../sdc/asdctool/impl/validator/ArtifactToolBL.java | 4 ---- .../sdc/asdctool/impl/validator/ValidationToolBL.java | 4 ---- .../executers/TopologyTemplateValidatorExecuter.java | 3 --- .../tasks/artifacts/VfArtifactValidationTask.java | 3 --- .../sdc/asdctool/main/ArtifactValidatorTool.java | 2 +- .../org/openecomp/sdc/asdctool/main/DataSchemaMenu.java | 2 +- .../sdc/asdctool/main/EsToCassandraDataMigrationMenu.java | 2 +- .../java/org/openecomp/sdc/asdctool/main/RemoveUtils.java | 2 +- .../org/openecomp/sdc/asdctool/main/UpdateIsVnfMenu.java | 2 +- .../org/openecomp/sdc/asdctool/main/ValidationTool.java | 2 +- .../migration/tasks/mig1710/UpgradeMigration1710.java | 15 --------------- .../sdc/asdctool/servlets/ExportImportTitanServlet.java | 2 -- 14 files changed, 7 insertions(+), 40 deletions(-) (limited to 'asdctool/src/main') diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/ArtifactUuidFix.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/ArtifactUuidFix.java index 5d4610c91f..d413c3f23a 100644 --- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/ArtifactUuidFix.java +++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/ArtifactUuidFix.java @@ -330,7 +330,7 @@ public class ArtifactUuidFix { return true; } - private boolean isProblematicService( Service service, String serviceName) throws IOException { + private boolean isProblematicService( Service service, String serviceName) { List componentInstances = service.getComponentInstances(); diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/GraphMLConverter.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/GraphMLConverter.java index 7bea2eaa4a..b6925416e6 100644 --- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/GraphMLConverter.java +++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/GraphMLConverter.java @@ -457,8 +457,6 @@ public class GraphMLConverter { } catch (Exception e) { e.printStackTrace(); - GraphPropertiesDictionary[] values = GraphPropertiesDictionary.values(); - Object property1 = vertex.value(GraphPropertiesDictionary.HEALTH_CHECK.getProperty()); System.out.println(property1); diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/ArtifactToolBL.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/ArtifactToolBL.java index 341a56f68a..f70236432d 100644 --- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/ArtifactToolBL.java +++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/ArtifactToolBL.java @@ -16,12 +16,8 @@ public class ArtifactToolBL { @Autowired protected List validators; - @Autowired - protected ReportManager reportManager; - private boolean allValid = true; - public boolean validateAll() { for (IArtifactValidatorExecuter validatorExec: validators) { System.out.println("ValidatorExecuter "+validatorExec.getName()+" started"); diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/ValidationToolBL.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/ValidationToolBL.java index e373107081..9406351a6c 100644 --- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/ValidationToolBL.java +++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/ValidationToolBL.java @@ -20,12 +20,8 @@ public class ValidationToolBL { @Autowired protected List validators; - @Autowired - protected ReportManager reportManager; - private boolean allValid = true; - public boolean validateAll() { for (ValidatorExecuter validatorExec: validators) { System.out.println("ValidatorExecuter "+validatorExec.getName()+" started"); diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/executers/TopologyTemplateValidatorExecuter.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/executers/TopologyTemplateValidatorExecuter.java index 04f014fbc9..f875aa4742 100644 --- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/executers/TopologyTemplateValidatorExecuter.java +++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/executers/TopologyTemplateValidatorExecuter.java @@ -34,9 +34,6 @@ public class TopologyTemplateValidatorExecuter { @Autowired protected TitanDao titanDao; - @Autowired - protected TopologyTemplateOperation topologyTemplateOperation; - protected String name; public void setName(String name) { diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/tasks/artifacts/VfArtifactValidationTask.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/tasks/artifacts/VfArtifactValidationTask.java index bb25d25e2b..1c18fb751e 100644 --- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/tasks/artifacts/VfArtifactValidationTask.java +++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/tasks/artifacts/VfArtifactValidationTask.java @@ -15,9 +15,6 @@ public class VfArtifactValidationTask extends VfValidationTask { @Autowired ArtifactValidationUtils artifactValidationUtils; - @Autowired - protected TopologyTemplateOperation topologyTemplateOperation; - public VfArtifactValidationTask() { this.name = "VF Artifact Validation Task"; } diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/main/ArtifactValidatorTool.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/main/ArtifactValidatorTool.java index 5ae543cb73..b1180f9483 100644 --- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/main/ArtifactValidatorTool.java +++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/main/ArtifactValidatorTool.java @@ -15,7 +15,7 @@ import org.springframework.context.annotation.AnnotationConfigApplicationContext public class ArtifactValidatorTool { private static Logger log = LoggerFactory.getLogger(ValidationTool.class.getName()); - public static void main(String[] args) throws Exception { + public static void main(String[] args) { String outputPath = args[0]; ValidationConfigManager.setOutputFullFilePath(outputPath); 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 2fb3270bf3..b0e3dbea6d 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 @@ -33,7 +33,7 @@ public class DataSchemaMenu { private static Logger log = LoggerFactory.getLogger(DataSchemaMenu.class.getName()); - public static void main(String[] args) throws Exception { + public static void main(String[] args) { String operation = args[0]; diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/main/EsToCassandraDataMigrationMenu.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/main/EsToCassandraDataMigrationMenu.java index 0bac1df353..f791098493 100644 --- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/main/EsToCassandraDataMigrationMenu.java +++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/main/EsToCassandraDataMigrationMenu.java @@ -34,7 +34,7 @@ public class EsToCassandraDataMigrationMenu { private static Logger log = LoggerFactory.getLogger(EsToCassandraDataMigrationMenu.class.getName()); - public static void main(String[] args) throws Exception { + public static void main(String[] args) { if (args == null || args.length < 2) { usageAndExit(); diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/main/RemoveUtils.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/main/RemoveUtils.java index ddece759c0..5546300740 100644 --- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/main/RemoveUtils.java +++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/main/RemoveUtils.java @@ -27,7 +27,7 @@ import org.openecomp.sdc.asdctool.impl.ProductLogic; */ public class RemoveUtils { - public static void main(String[] args) throws Exception { + public static void main(String[] args) { if (args == null || args.length < 1) { removeUsage(); diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/main/UpdateIsVnfMenu.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/main/UpdateIsVnfMenu.java index dce9f9c072..b9a1e1741b 100644 --- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/main/UpdateIsVnfMenu.java +++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/main/UpdateIsVnfMenu.java @@ -45,7 +45,7 @@ public class UpdateIsVnfMenu { "Usage: updateIsVnfTrue "); } - public static void main(String[] args) throws Exception { + public static void main(String[] args) { if (args == null || args.length < 1) { usageAndExit(); diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/main/ValidationTool.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/main/ValidationTool.java index 51e2d500da..e07b3af551 100644 --- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/main/ValidationTool.java +++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/main/ValidationTool.java @@ -19,7 +19,7 @@ public class ValidationTool { private static Logger log = LoggerFactory.getLogger(ValidationTool.class.getName()); - public static void main(String[] args) throws Exception { + public static void main(String[] args) { String outputPath = args[0]; ValidationConfigManager.setOutputFullFilePath(outputPath); diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/tasks/mig1710/UpgradeMigration1710.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/tasks/mig1710/UpgradeMigration1710.java index ca8c4c8a3c..e6acb7a1d4 100644 --- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/tasks/mig1710/UpgradeMigration1710.java +++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/tasks/mig1710/UpgradeMigration1710.java @@ -803,21 +803,6 @@ public class UpgradeMigration1710 implements PostMigration { return titanDao.getByCriteria(vertexType, propertiesToMatch, propertiesNotToMatch, JsonParseFlagEnum.ParseMetadata); } - protected Either, TitanOperationStatus> findResourcesPathRecursively(GraphVertex nodeTypeV, List allCertifiedUids) { - Either, TitanOperationStatus> parentResourceRes = titanDao.getParentVertecies(nodeTypeV, EdgeLabelEnum.DERIVED_FROM, JsonParseFlagEnum.ParseMetadata); - if (parentResourceRes.isRight()) { - return Either.right(parentResourceRes.right().value()); - } - List derivedResourcesUid = new ArrayList<>(); - for (GraphVertex chV : parentResourceRes.left().value()) { - Optional op = allCertifiedUids.stream().filter(id -> id.equals((String) chV.getJsonMetadataField(JsonPresentationFields.UNIQUE_ID))).findAny(); - if (op.isPresent()) { - derivedResourcesUid.add(chV); - } - } - return null; - } - private Either, StorageOperationStatus> getLatestByName(GraphPropertyEnum property, String nodeName) { Map propertiesToMatch = new EnumMap<>(GraphPropertyEnum.class); diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/servlets/ExportImportTitanServlet.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/servlets/ExportImportTitanServlet.java index 898bd96177..9d40354651 100644 --- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/servlets/ExportImportTitanServlet.java +++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/servlets/ExportImportTitanServlet.java @@ -161,8 +161,6 @@ public class ExportImportTitanServlet { // graph.commit(); graph.tx().commit(); - String exportedGraph = out.toString(); - result = outputFile; } catch (Exception e) { -- cgit 1.2.3-korg