use of org.batfish.job.ParseVendorConfigurationJob in project batfish by batfish.
the class Batfish method parseVendorConfigurations.
private SortedMap<String, VendorConfiguration> parseVendorConfigurations(Map<Path, String> configurationData, ParseVendorConfigurationAnswerElement answerElement, ConfigurationFormat configurationFormat) {
_logger.info("\n*** PARSING VENDOR CONFIGURATION FILES ***\n");
_logger.resetTimer();
SortedMap<String, VendorConfiguration> vendorConfigurations = new TreeMap<>();
List<ParseVendorConfigurationJob> jobs = new ArrayList<>();
for (Entry<Path, String> vendorFile : configurationData.entrySet()) {
Path currentFile = vendorFile.getKey();
String fileText = vendorFile.getValue();
Warnings warnings = buildWarnings(_settings);
ParseVendorConfigurationJob job = new ParseVendorConfigurationJob(_settings, fileText, currentFile, warnings, configurationFormat);
jobs.add(job);
}
BatfishJobExecutor.runJobsInExecutor(_settings, _logger, jobs, vendorConfigurations, answerElement, _settings.getHaltOnParseError(), "Parse configurations");
_logger.printElapsedTime();
return vendorConfigurations;
}
Aggregations