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);
}
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;
}
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);
}
}
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);
}
}
Aggregations