use of org.batfish.datamodel.answers.DataPlaneAnswerElement in project batfish by batfish.
the class Batfish method loadDataPlaneAnswerElement.
private DataPlaneAnswerElement loadDataPlaneAnswerElement(boolean compressed, boolean firstAttempt) {
Path answerPath = compressed ? _testrigSettings.getEnvironmentSettings().getCompressedDataPlaneAnswerPath() : _testrigSettings.getEnvironmentSettings().getDataPlaneAnswerPath();
DataPlaneAnswerElement bae = deserializeObject(answerPath, DataPlaneAnswerElement.class);
if (!Version.isCompatibleVersion("Service", "Old data plane", bae.getVersion())) {
if (firstAttempt) {
repairDataPlane(compressed);
return loadDataPlaneAnswerElement(compressed, false);
} else {
throw new BatfishException("Version error repairing data plane for data plane answer element");
}
} else {
return bae;
}
}
Aggregations