use of org.batfish.common.plugin.IBatfish in project batfish by batfish.
the class QuestionPlugin method pluginInitialize.
@Override
protected final void pluginInitialize() {
Question question = createQuestion();
String questionName = question.getName();
String questionClassName = question.getClass().getCanonicalName();
switch(_pluginConsumer.getType()) {
case BATFISH:
{
IBatfish batfish = (IBatfish) _pluginConsumer;
batfish.registerAnswerer(questionName, questionClassName, this::createAnswerer);
break;
}
case CLIENT:
{
IClient client = (IClient) _pluginConsumer;
client.registerQuestion(questionName, this::createQuestion);
break;
}
default:
break;
}
}
use of org.batfish.common.plugin.IBatfish in project batfish by batfish.
the class BatfishCompressionTest method compressNetwork.
private SortedMap<String, Configuration> compressNetwork(Map<String, Configuration> configs, HeaderSpace headerSpace) throws IOException {
TemporaryFolder tmp = new TemporaryFolder();
tmp.create();
IBatfish batfish = BatfishTestUtils.getBatfish(new TreeMap<>(configs), tmp);
return new TreeMap<>(new BatfishCompressor(batfish, configs).compress(headerSpace));
}
Aggregations