use of org.batfish.datamodel.answers.InitStepAnswerElement in project batfish by batfish.
the class Batfish method mergeInitStepAnswer.
private void mergeInitStepAnswer(InitInfoAnswerElement initInfoAnswerElement, InitStepAnswerElement initStepAnswerElement, boolean summary, boolean verboseError) {
if (!summary) {
if (verboseError) {
SortedMap<String, List<BatfishStackTrace>> errors = initInfoAnswerElement.getErrors();
initStepAnswerElement.getErrors().forEach((hostname, initStepErrors) -> {
errors.computeIfAbsent(hostname, k -> new ArrayList<>()).add(initStepErrors);
});
}
SortedMap<String, Warnings> warnings = initInfoAnswerElement.getWarnings();
initStepAnswerElement.getWarnings().forEach((hostname, initStepWarnings) -> {
Warnings combined = warnings.computeIfAbsent(hostname, h -> buildWarnings(_settings));
combined.getPedanticWarnings().addAll(initStepWarnings.getPedanticWarnings());
combined.getRedFlagWarnings().addAll(initStepWarnings.getRedFlagWarnings());
combined.getUnimplementedWarnings().addAll(initStepWarnings.getUnimplementedWarnings());
});
}
}
Aggregations