use of org.batfish.datamodel.routing_policy.Result in project batfish by batfish.
the class BufferedStatement method execute.
@Override
public Result execute(Environment environment) {
environment.setBuffered(true);
Result result = _statement.execute(environment);
return result;
}
use of org.batfish.datamodel.routing_policy.Result in project batfish by batfish.
the class CallStatement method execute.
@Override
public Result execute(Environment environment) {
RoutingPolicy policy = environment.getConfiguration().getRoutingPolicies().get(_calledPolicyName);
Result result;
if (policy == null) {
result = new Result();
environment.setError(true);
result.setBooleanValue(false);
} else {
boolean oldCallStatementContext = environment.getCallStatementContext();
environment.setCallStatementContext(true);
result = policy.call(environment);
result.setReturn(false);
environment.setCallStatementContext(oldCallStatementContext);
}
return result;
}
use of org.batfish.datamodel.routing_policy.Result in project batfish by batfish.
the class SetDefaultPolicy method execute.
@Override
public Result execute(Environment environment) {
environment.setDefaultPolicy(_defaultPolicy);
Result result = new Result();
return result;
}
use of org.batfish.datamodel.routing_policy.Result in project batfish by batfish.
the class MatchAsPath method evaluate.
@Override
public Result evaluate(Environment environment) {
boolean match = _expr.matches(environment);
Result result = new Result();
result.setBooleanValue(match);
return result;
}
use of org.batfish.datamodel.routing_policy.Result in project batfish by batfish.
the class MatchIp6AccessList method evaluate.
@Override
public Result evaluate(Environment environment) {
Result result = new Result();
Ip6AccessList list = environment.getConfiguration().getIp6AccessLists().get(_list);
if (list != null) {
// TODO
} else {
environment.setError(true);
result.setBooleanValue(false);
return result;
}
throw new UnsupportedOperationException("no implementation for generated method");
}
Aggregations