use of org.batfish.job.ConvertConfigurationJob in project batfish by batfish.
the class Batfish method convertConfigurations.
private Map<String, Configuration> convertConfigurations(Map<String, GenericConfigObject> vendorConfigurations, ConvertConfigurationAnswerElement answerElement) {
_logger.info("\n*** CONVERTING VENDOR CONFIGURATIONS TO INDEPENDENT FORMAT ***\n");
_logger.resetTimer();
Map<String, Configuration> configurations = new TreeMap<>();
List<ConvertConfigurationJob> jobs = new ArrayList<>();
for (Entry<String, GenericConfigObject> config : vendorConfigurations.entrySet()) {
GenericConfigObject vc = config.getValue();
ConvertConfigurationJob job = new ConvertConfigurationJob(_settings, vc, config.getKey());
jobs.add(job);
}
BatfishJobExecutor.runJobsInExecutor(_settings, _logger, jobs, configurations, answerElement, _settings.getHaltOnConvertError(), "Convert configurations to vendor-independent format");
_logger.printElapsedTime();
return configurations;
}
Aggregations