use of org.batfish.representation.juniper.PsFromRouteFilter in project batfish by batfish.
the class ConfigurationBuilder method enterPopsf_route_filter.
@Override
public void enterPopsf_route_filter(Popsf_route_filterContext ctx) {
_currentRouteFilter = _termRouteFilters.get(_currentPsTerm);
if (_currentRouteFilter == null) {
String rfName = _currentPolicyStatement.getName() + ":" + _currentPsTerm.getName();
_currentRouteFilter = new RouteFilter(rfName);
_termRouteFilters.put(_currentPsTerm, _currentRouteFilter);
_configuration.getRouteFilters().put(rfName, _currentRouteFilter);
PsFromRouteFilter from = new PsFromRouteFilter(rfName);
_currentPsTerm.getFroms().add(from);
}
if (ctx.IP_PREFIX() != null) {
_currentRouteFilterPrefix = Prefix.parse(ctx.IP_PREFIX().getText());
_currentRouteFilter.setIpv4(true);
} else if (ctx.IPV6_PREFIX() != null) {
_currentRoute6FilterPrefix = new Prefix6(ctx.IPV6_PREFIX().getText());
_currentRouteFilter.setIpv6(true);
}
}
Aggregations