Search in sources :

Example 6 with Logging

use of org.batfish.datamodel.vendor_family.cisco.Logging in project batfish by batfish.

the class CiscoControlPlaneExtractor method exitLogging_on.

@Override
public void exitLogging_on(Logging_onContext ctx) {
    Logging logging = _configuration.getCf().getLogging();
    logging.setOn(!_no);
}
Also used : Logging(org.batfish.datamodel.vendor_family.cisco.Logging)

Example 7 with Logging

use of org.batfish.datamodel.vendor_family.cisco.Logging in project batfish by batfish.

the class CiscoControlPlaneExtractor method exitLogging_source_interface.

@Override
public void exitLogging_source_interface(Logging_source_interfaceContext ctx) {
    if (_no) {
        return;
    }
    Logging logging = _configuration.getCf().getLogging();
    String sourceInterface = toInterfaceName(ctx.interface_name());
    logging.setSourceInterface(sourceInterface);
}
Also used : Logging(org.batfish.datamodel.vendor_family.cisco.Logging)

Example 8 with Logging

use of org.batfish.datamodel.vendor_family.cisco.Logging in project batfish by batfish.

the class CiscoControlPlaneExtractor method exitLogging_host.

@Override
public void exitLogging_host(Logging_hostContext ctx) {
    if (_no) {
        return;
    }
    Logging logging = _configuration.getCf().getLogging();
    String hostname = ctx.hostname.getText();
    LoggingHost host = new LoggingHost(hostname);
    logging.getHosts().put(hostname, host);
}
Also used : Logging(org.batfish.datamodel.vendor_family.cisco.Logging) LoggingHost(org.batfish.datamodel.vendor_family.cisco.LoggingHost)

Example 9 with Logging

use of org.batfish.datamodel.vendor_family.cisco.Logging in project batfish by batfish.

the class CiscoControlPlaneExtractor method exitLogging_console.

@Override
public void exitLogging_console(Logging_consoleContext ctx) {
    if (_no) {
        return;
    }
    Integer severityNum = null;
    String severity = null;
    if (ctx.logging_severity() != null) {
        severityNum = toLoggingSeverityNum(ctx.logging_severity());
        severity = toLoggingSeverity(ctx.logging_severity());
    }
    Logging logging = _configuration.getCf().getLogging();
    LoggingType console = logging.getConsole();
    if (console == null) {
        console = new LoggingType();
        logging.setConsole(console);
    }
    console.setSeverity(severity);
    console.setSeverityNum(severityNum);
}
Also used : Logging(org.batfish.datamodel.vendor_family.cisco.Logging) LoggingType(org.batfish.datamodel.vendor_family.cisco.LoggingType)

Aggregations

Logging (org.batfish.datamodel.vendor_family.cisco.Logging)9 LoggingHost (org.batfish.datamodel.vendor_family.cisco.LoggingHost)3 LoggingType (org.batfish.datamodel.vendor_family.cisco.LoggingType)2 BatfishException (org.batfish.common.BatfishException)1 RedFlagBatfishException (org.batfish.common.RedFlagBatfishException)1 Buffered (org.batfish.datamodel.vendor_family.cisco.Buffered)1 CiscoConfiguration (org.batfish.representation.cisco.CiscoConfiguration)1