Search in sources :

Example 1 with IsisProcess

use of org.batfish.representation.cisco.IsisProcess in project batfish by batfish.

the class CiscoControlPlaneExtractor method enterNet_is_stanza.

@Override
public void enterNet_is_stanza(Net_is_stanzaContext ctx) {
    IsisProcess proc = currentVrf().getIsisProcess();
    IsoAddress isoAddress = new IsoAddress(ctx.ISO_ADDRESS().getText());
    proc.setNetAddress(isoAddress);
}
Also used : IsisProcess(org.batfish.representation.cisco.IsisProcess) IsoAddress(org.batfish.datamodel.IsoAddress)

Example 2 with IsisProcess

use of org.batfish.representation.cisco.IsisProcess in project batfish by batfish.

the class CiscoControlPlaneExtractor method enterRouter_isis_stanza.

@Override
public void enterRouter_isis_stanza(Router_isis_stanzaContext ctx) {
    IsisProcess isisProcess = new IsisProcess();
    isisProcess.setLevel(IsisLevel.LEVEL_1_2);
    currentVrf().setIsisProcess(isisProcess);
    _currentIsisProcess = isisProcess;
}
Also used : IsisProcess(org.batfish.representation.cisco.IsisProcess)

Example 3 with IsisProcess

use of org.batfish.representation.cisco.IsisProcess in project batfish by batfish.

the class CiscoControlPlaneExtractor method exitRedistribute_static_is_stanza.

@Override
public void exitRedistribute_static_is_stanza(Redistribute_static_is_stanzaContext ctx) {
    IsisProcess proc = currentVrf().getIsisProcess();
    RoutingProtocol sourceProtocol = RoutingProtocol.STATIC;
    IsisRedistributionPolicy r = new IsisRedistributionPolicy(sourceProtocol);
    proc.getRedistributionPolicies().put(sourceProtocol, r);
    if (ctx.metric != null) {
        int metric = toInteger(ctx.metric);
        r.setMetric(metric);
    }
    if (ctx.map != null) {
        String map = ctx.map.getText();
        r.setMap(map);
    }
    if (ctx.LEVEL_1() != null) {
        r.setLevel(IsisLevel.LEVEL_1);
    } else if (ctx.LEVEL_2() != null) {
        r.setLevel(IsisLevel.LEVEL_2);
    } else if (ctx.LEVEL_1_2() != null) {
        r.setLevel(IsisLevel.LEVEL_1_2);
    } else {
        r.setLevel(IsisRedistributionPolicy.DEFAULT_LEVEL);
    }
}
Also used : RoutingProtocol(org.batfish.datamodel.RoutingProtocol) IsisProcess(org.batfish.representation.cisco.IsisProcess) IsisRedistributionPolicy(org.batfish.representation.cisco.IsisRedistributionPolicy)

Example 4 with IsisProcess

use of org.batfish.representation.cisco.IsisProcess in project batfish by batfish.

the class CiscoControlPlaneExtractor method exitRedistribute_connected_is_stanza.

@Override
public void exitRedistribute_connected_is_stanza(Redistribute_connected_is_stanzaContext ctx) {
    IsisProcess proc = currentVrf().getIsisProcess();
    RoutingProtocol sourceProtocol = RoutingProtocol.CONNECTED;
    IsisRedistributionPolicy r = new IsisRedistributionPolicy(sourceProtocol);
    proc.getRedistributionPolicies().put(sourceProtocol, r);
    if (ctx.metric != null) {
        int metric = toInteger(ctx.metric);
        r.setMetric(metric);
    }
    if (ctx.map != null) {
        String map = ctx.map.getText();
        r.setMap(map);
    }
    if (ctx.LEVEL_1() != null) {
        r.setLevel(IsisLevel.LEVEL_1);
    } else if (ctx.LEVEL_2() != null) {
        r.setLevel(IsisLevel.LEVEL_2);
    } else if (ctx.LEVEL_1_2() != null) {
        r.setLevel(IsisLevel.LEVEL_1_2);
    } else {
        r.setLevel(IsisRedistributionPolicy.DEFAULT_LEVEL);
    }
}
Also used : RoutingProtocol(org.batfish.datamodel.RoutingProtocol) IsisProcess(org.batfish.representation.cisco.IsisProcess) IsisRedistributionPolicy(org.batfish.representation.cisco.IsisRedistributionPolicy)

Aggregations

IsisProcess (org.batfish.representation.cisco.IsisProcess)4 RoutingProtocol (org.batfish.datamodel.RoutingProtocol)2 IsisRedistributionPolicy (org.batfish.representation.cisco.IsisRedistributionPolicy)2 IsoAddress (org.batfish.datamodel.IsoAddress)1