Search in sources :

Example 6 with ConvertConfigurationAnswerElement

use of org.batfish.datamodel.answers.ConvertConfigurationAnswerElement in project batfish by batfish.

the class Batfish method mergeConvertAnswer.

private void mergeConvertAnswer(boolean summary, boolean verboseError, InitInfoAnswerElement answerElement) {
    ConvertConfigurationAnswerElement convertAnswer = loadConvertConfigurationAnswerElementOrReparse();
    mergeInitStepAnswer(answerElement, convertAnswer, summary, verboseError);
    for (String failed : convertAnswer.getFailed()) {
        answerElement.getParseStatus().put(failed, ParseStatus.FAILED);
    }
}
Also used : ConvertConfigurationAnswerElement(org.batfish.datamodel.answers.ConvertConfigurationAnswerElement)

Example 7 with ConvertConfigurationAnswerElement

use of org.batfish.datamodel.answers.ConvertConfigurationAnswerElement in project batfish by batfish.

the class CiscoConfigurationTest method before.

// Initializes an empty CiscoConfiguration with a single Interface and minimal settings to not
// crash.
@Before
public void before() {
    _config = new CiscoConfiguration(Collections.emptySet());
    _config.setVendor(ConfigurationFormat.ARISTA);
    _config.setHostname("host");
    _config.setAnswerElement(new ConvertConfigurationAnswerElement());
    _interface = new Interface("iface", _config);
}
Also used : ConvertConfigurationAnswerElement(org.batfish.datamodel.answers.ConvertConfigurationAnswerElement) Before(org.junit.Before)

Aggregations

ConvertConfigurationAnswerElement (org.batfish.datamodel.answers.ConvertConfigurationAnswerElement)7 Configuration (org.batfish.datamodel.Configuration)4 HashMap (java.util.HashMap)3 BatfishException (org.batfish.common.BatfishException)2 AwsConfiguration (org.batfish.representation.aws.AwsConfiguration)2 HostConfiguration (org.batfish.representation.host.HostConfiguration)2 IptablesVendorConfiguration (org.batfish.representation.iptables.IptablesVendorConfiguration)2 VendorConfiguration (org.batfish.vendor.VendorConfiguration)2 Test (org.junit.Test)2 ImmutableConfiguration (org.apache.commons.configuration2.ImmutableConfiguration)1 CleanBatfishException (org.batfish.common.CleanBatfishException)1 Warnings (org.batfish.common.Warnings)1 NodeRoleSpecifier (org.batfish.datamodel.NodeRoleSpecifier)1 Topology (org.batfish.datamodel.Topology)1 Answer (org.batfish.datamodel.answers.Answer)1 Before (org.junit.Before)1