Search in sources :

Example 1 with MatchIp6AccessList

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();
}
Also used : MatchPrefix6Set(org.batfish.datamodel.routing_policy.expr.MatchPrefix6Set) Route6FilterList(org.batfish.datamodel.Route6FilterList) NamedPrefix6Set(org.batfish.datamodel.routing_policy.expr.NamedPrefix6Set) DestinationNetwork6(org.batfish.datamodel.routing_policy.expr.DestinationNetwork6) Disjunction(org.batfish.datamodel.routing_policy.expr.Disjunction) MatchIp6AccessList(org.batfish.datamodel.routing_policy.expr.MatchIp6AccessList) BooleanExpr(org.batfish.datamodel.routing_policy.expr.BooleanExpr) Ip6AccessList(org.batfish.datamodel.Ip6AccessList) MatchIp6AccessList(org.batfish.datamodel.routing_policy.expr.MatchIp6AccessList)

Aggregations

Ip6AccessList (org.batfish.datamodel.Ip6AccessList)1 Route6FilterList (org.batfish.datamodel.Route6FilterList)1 BooleanExpr (org.batfish.datamodel.routing_policy.expr.BooleanExpr)1 DestinationNetwork6 (org.batfish.datamodel.routing_policy.expr.DestinationNetwork6)1 Disjunction (org.batfish.datamodel.routing_policy.expr.Disjunction)1 MatchIp6AccessList (org.batfish.datamodel.routing_policy.expr.MatchIp6AccessList)1 MatchPrefix6Set (org.batfish.datamodel.routing_policy.expr.MatchPrefix6Set)1 NamedPrefix6Set (org.batfish.datamodel.routing_policy.expr.NamedPrefix6Set)1