use of org.batfish.job.ParseEnvironmentRoutingTableJob in project batfish by batfish.
the class Batfish method parseEnvironmentRoutingTables.
private SortedMap<String, RoutesByVrf> parseEnvironmentRoutingTables(SortedMap<Path, String> inputData, ParseEnvironmentRoutingTablesAnswerElement answerElement) {
_logger.info("\n*** PARSING ENVIRONMENT ROUTING TABLES ***\n");
_logger.resetTimer();
SortedMap<String, RoutesByVrf> routingTables = new TreeMap<>();
List<ParseEnvironmentRoutingTableJob> jobs = new ArrayList<>();
SortedMap<String, Configuration> configurations = loadConfigurations();
for (Entry<Path, String> routingFile : inputData.entrySet()) {
Path currentFile = routingFile.getKey();
String fileText = routingFile.getValue();
String hostname = currentFile.getFileName().toString();
if (!configurations.containsKey(hostname)) {
continue;
}
Warnings warnings = buildWarnings(_settings);
ParseEnvironmentRoutingTableJob job = new ParseEnvironmentRoutingTableJob(_settings, fileText, currentFile, warnings, this);
jobs.add(job);
}
BatfishJobExecutor.runJobsInExecutor(_settings, _logger, jobs, routingTables, answerElement, _settings.getHaltOnParseError(), "Parse environment routing tables");
_logger.printElapsedTime();
return routingTables;
}
Aggregations