Search in sources :

Example 1 with MatchTag

use of org.batfish.datamodel.routing_policy.expr.MatchTag in project batfish by batfish.

the class RouteMapMatchTagLine method toBooleanExpr.

@Override
public BooleanExpr toBooleanExpr(Configuration c, CiscoConfiguration cc, Warnings w) {
    Disjunction d = new Disjunction();
    List<BooleanExpr> disjuncts = d.getDisjuncts();
    for (int tag : _tags) {
        disjuncts.add(new MatchTag(IntComparator.EQ, new LiteralInt(tag)));
    }
    return d.simplify();
}
Also used : Disjunction(org.batfish.datamodel.routing_policy.expr.Disjunction) MatchTag(org.batfish.datamodel.routing_policy.expr.MatchTag) BooleanExpr(org.batfish.datamodel.routing_policy.expr.BooleanExpr) LiteralInt(org.batfish.datamodel.routing_policy.expr.LiteralInt)

Aggregations

BooleanExpr (org.batfish.datamodel.routing_policy.expr.BooleanExpr)1 Disjunction (org.batfish.datamodel.routing_policy.expr.Disjunction)1 LiteralInt (org.batfish.datamodel.routing_policy.expr.LiteralInt)1 MatchTag (org.batfish.datamodel.routing_policy.expr.MatchTag)1