@Test public void testToBooleanExpr() { String name = "name"; RouteMapMatchAsPath matchLine = new RouteMapMatchAsPath(name); Configuration c = new Configuration("hostname", ConfigurationFormat.CUMULUS_CONCATENATED); assertThat(matchLine.toBooleanExpr(c, null, null), equalTo(BooleanExprs.FALSE)); c.getAsPathAccessLists().put(name, new AsPathAccessList(name, null)); assertThat( matchLine.toBooleanExpr(c, null, null), equalTo(new MatchAsPath(new NamedAsPathSet(name)))); }
@Nonnull @Override public BooleanExpr toBooleanExpr(Configuration c, CumulusNodeConfiguration vc, Warnings w) { if (!c.getAsPathAccessLists().containsKey(_name)) { return BooleanExprs.FALSE; } return new MatchAsPath(new NamedAsPathSet(_name)); }
RouteMapMatchAsPath implements RouteMapMatch { @Nonnull @Override public BooleanExpr toBooleanExpr(Configuration c, CumulusNodeConfiguration vc, Warnings w) { if (!c.getAsPathAccessLists().containsKey(_name)) { return BooleanExprs.FALSE; } return new MatchAsPath(new NamedAsPathSet(_name)); } }
RouteMapMatchAsPath implements RouteMapMatch { @Nonnull @Override public BooleanExpr toBooleanExpr(Configuration c, CumulusNodeConfiguration vc, Warnings w) { if (!c.getAsPathAccessLists().containsKey(_name)) { return BooleanExprs.FALSE; } return new MatchAsPath(new NamedAsPathSet(_name)); } RouteMapMatchAsPath(@Nonnull String name); }
RouteMapMatchAsPath implements RouteMapMatch { @Nonnull @Override public BooleanExpr toBooleanExpr(Configuration c, CumulusNodeConfiguration vc, Warnings w) { if (!c.getAsPathAccessLists().containsKey(_name)) { return BooleanExprs.FALSE; } return new MatchAsPath(new NamedAsPathSet(_name)); } RouteMapMatchAsPath(@Nonnull String name); @Nonnull @Override BooleanExpr toBooleanExpr(Configuration c, CumulusNodeConfiguration vc, Warnings w); @Nonnull String getName(); }
RouteMapMatchAsPath implements RouteMapMatch { @Nonnull @Override public BooleanExpr toBooleanExpr(Configuration c, CumulusNodeConfiguration vc, Warnings w) { if (!c.getAsPathAccessLists().containsKey(_name)) { return BooleanExprs.FALSE; } return new MatchAsPath(new NamedAsPathSet(_name)); } RouteMapMatchAsPath(@Nonnull String name); @Nonnull @Override BooleanExpr toBooleanExpr(Configuration c, CumulusNodeConfiguration vc, Warnings w); @Nonnull String getName();  }