@Override public BooleanExpr toBooleanExpr(CiscoConfiguration cc, Configuration c, Warnings w) { PrefixSetExpr prefixSetExpr = _prefixSet.toPrefixSetExpr(cc, c, w); if (prefixSetExpr != null) { return new MatchPrefixSet(DestinationNetwork.instance(), prefixSetExpr); } else { Prefix6SetExpr prefix6SetExpr = _prefixSet.toPrefix6SetExpr(cc, c, w); return new MatchPrefix6Set(new DestinationNetwork6(), prefix6SetExpr); } } }
@Override public BooleanExpr toBooleanExpr(Configuration c, CiscoConfiguration cc, Warnings w) { Disjunction d = new Disjunction(); List<BooleanExpr> disjuncts = d.getDisjuncts(); for (String listName : _listNames) { Prefix6List list = cc.getPrefix6Lists().get(listName); if (list != null) { disjuncts.add( new MatchPrefix6Set(new DestinationNetwork6(), new NamedPrefix6Set(listName))); } } return d.simplify(); } }
@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) { if (_routing) { disjuncts.add( new MatchPrefix6Set(new DestinationNetwork6(), new NamedPrefix6Set(listName))); } else { disjuncts.add(new MatchIp6AccessList(listName)); } } } return d.simplify(); } }
@Override public BooleanExpr toBooleanExpr(JuniperConfiguration jc, Configuration c, Warnings warnings) { RouteFilterList rfl = c.getRouteFilterLists().get(_routeFilterName); Route6FilterList rfl6 = c.getRoute6FilterLists().get(_routeFilterName); BooleanExpr match4 = null; BooleanExpr match6 = null; if (rfl != null) { match4 = new MatchPrefixSet(DestinationNetwork.instance(), new NamedPrefixSet(_routeFilterName)); } if (rfl6 != null) { match6 = new MatchPrefix6Set(new DestinationNetwork6(), new NamedPrefix6Set(_routeFilterName)); } if (match4 != null && match6 == null) { return match4; } else if (rfl == null && rfl6 != null) { return match6; } else if (rfl != null && rfl6 != null) { Disjunction d = new Disjunction(); d.getDisjuncts().add(match4); d.getDisjuncts().add(match6); return d; } else { throw new VendorConversionException( "missing route filter list: \"" + _routeFilterName + "\""); } } }
ImmutableList.of( new MatchPrefix6Set( new DestinationNetwork6(), new ExplicitPrefix6Set( new Prefix6Space(Prefix6Range.fromPrefix6(prefix6)))),
new If( new MatchPrefix6Set( new DestinationNetwork6(), new ExplicitPrefix6Set( new Prefix6Space( .add( new MatchPrefix6Set( new DestinationNetwork6(), new ExplicitPrefix6Set(space6))); exportNetwork6Conditions .getConjuncts()