use of org.batfish.datamodel.routing_policy.expr.MatchIp6AccessList in project batfish by batfish.
the class RouteMapMatchIpv6AccessListLine method toBooleanExpr.
@Override
public BooleanExpr toBooleanExpr(Configuration c, CiscoConfiguration cc, Warnings w) {
Disjunction d = new Disjunction();
List<BooleanExpr> disjuncts = d.getDisjuncts();
for (String listName : _listNames) {
Object list;
Ip6AccessList ipAccessList = null;
Route6FilterList routeFilterList = null;
if (_routing) {
routeFilterList = c.getRoute6FilterLists().get(listName);
list = routeFilterList;
} else {
ipAccessList = c.getIp6AccessLists().get(listName);
list = ipAccessList;
}
if (list == null) {
cc.undefined(CiscoStructureType.IPV6_ACCESS_LIST, listName, CiscoStructureUsage.ROUTE_MAP_MATCH_IPV6_ACCESS_LIST, _statementLine);
} else {
String msg = "route-map match ipv6 access-list line";
ExtendedIpv6AccessList extendedAccessList = cc.getExtendedIpv6Acls().get(listName);
if (extendedAccessList != null) {
extendedAccessList.getReferers().put(this, msg);
}
StandardIpv6AccessList standardAccessList = cc.getStandardIpv6Acls().get(listName);
if (standardAccessList != null) {
standardAccessList.getReferers().put(this, msg);
}
if (_routing) {
disjuncts.add(new MatchPrefix6Set(new DestinationNetwork6(), new NamedPrefix6Set(listName)));
} else {
disjuncts.add(new MatchIp6AccessList(listName));
}
}
}
return d.simplify();
}
Aggregations