Search in sources :

Example 1 with LoggingType

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

the class CiscoControlPlaneExtractor method exitLogging_trap.

@Override
public void exitLogging_trap(Logging_trapContext 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 trap = logging.getTrap();
    if (trap == null) {
        trap = new LoggingType();
        logging.setTrap(trap);
    }
    trap.setSeverity(severity);
    trap.setSeverityNum(severityNum);
}
Also used : Logging(org.batfish.datamodel.vendor_family.cisco.Logging) LoggingType(org.batfish.datamodel.vendor_family.cisco.LoggingType)

Example 2 with LoggingType

use of org.batfish.datamodel.vendor_family.cisco.LoggingType 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)2 LoggingType (org.batfish.datamodel.vendor_family.cisco.LoggingType)2