use of org.batfish.datamodel.AsPathAccessListLine in project batfish by batfish.
the class CiscoConfiguration method toAsPathAccessListLine.
private AsPathAccessListLine toAsPathAccessListLine(AsPathSetElem elem) {
String rawRegex = elem.regex();
String regex = toJavaRegex(rawRegex);
AsPathAccessListLine line = new AsPathAccessListLine();
line.setAction(LineAction.ACCEPT);
line.setRegex(regex);
return line;
}
use of org.batfish.datamodel.AsPathAccessListLine in project batfish by batfish.
the class CiscoConfiguration method toAsPathAccessList.
private AsPathAccessList toAsPathAccessList(AsPathSet asPathSet) {
String name = asPathSet.getName();
AsPathAccessList list = new AsPathAccessList(name);
for (AsPathSetElem elem : asPathSet.getElements()) {
AsPathAccessListLine line = toAsPathAccessListLine(elem);
list.getLines().add(line);
}
return list;
}
use of org.batfish.datamodel.AsPathAccessListLine in project batfish by batfish.
the class IpAsPathAccessListLine method applyTo.
public void applyTo(AsPathAccessList newList) {
List<AsPathAccessListLine> lines = newList.getLines();
AsPathAccessListLine line = new AsPathAccessListLine();
line.setAction(_action);
String regex = CiscoConfiguration.toJavaRegex(_regex);
line.setRegex(regex);
lines.add(line);
}
Aggregations