aboutsummaryrefslogtreecommitdiffstats
path: root/asdctool/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'asdctool/src/main')
-rw-r--r--asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/report/ReportFile.java15
-rw-r--r--asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/utils/ReportManager.java12
-rw-r--r--asdctool/src/main/java/org/openecomp/sdc/asdctool/main/ValidationTool.java2
3 files changed, 16 insertions, 13 deletions
diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/report/ReportFile.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/report/ReportFile.java
index b22edb6cee..b483964a6e 100644
--- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/report/ReportFile.java
+++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/report/ReportFile.java
@@ -95,6 +95,21 @@ public class ReportFile {
writer.writeln("");
writer.write(sb.toString());
}
+
+ public void reportEndOfToolRun(Report report) {
+ StrBuilder sb = new StrBuilder();
+ sb.appendln("-----------------------------------Validator Tool Summary-----------------------------------");
+ report.forEachFailure((taskName, failedVertices) -> {
+ sb.append("Task: ")
+ .append(taskName)
+ .appendNewLine()
+ .append("FailedVertices: ")
+ .append(String.valueOf(failedVertices))
+ .appendNewLine();
+ });
+ writer.writeln("");
+ writer.write(sb.toString());
+ }
}
/**
diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/utils/ReportManager.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/utils/ReportManager.java
index a733eec38b..9b09e67c39 100644
--- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/utils/ReportManager.java
+++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/utils/ReportManager.java
@@ -68,16 +68,4 @@ public class ReportManager {
log.info("write to file failed - {}", e.getClass().getSimpleName(), e);
}
}
-
- public static void reportEndOfToolRun(Report report, String outputFilePath) {
- StrBuilder sb = new StrBuilder();
- sb.appendln("-----------------------------------Validator Tool Summary-----------------------------------");
- report.forEachFailure((taskName, failedVertices) -> {
- sb.append("Task: " + taskName);
- sb.appendNewLine();
- sb.append("FailedVertices: " + failedVertices);
- sb.appendNewLine();
- });
- writeReportLineToFile(sb.toString(), outputFilePath);
- }
}
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 d84f0a5d69..3bffa0b5e2 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
@@ -59,7 +59,7 @@ public class ValidationTool {
log.info("Start Validation Tool");
Report report = Report.make();
boolean result = validationToolBL.validateAll(report, textFile, txtReportFilePath);
- ReportManager.reportEndOfToolRun(report, txtReportFilePath);
+ textFile.reportEndOfToolRun(report);
csvFile.printAllResults(report);
if (result) {
log.info("Validation finished successfully");