@Test public void testConversion() { AsPath regex = new AsPath("1 2"); Warnings w = new Warnings(true, true, true); BooleanExpr ret = PsFromAsPath.toBooleanExpr(regex, w); assertThat(ret, instanceOf(MatchAsPath.class)); assertThat(w.getRedFlagWarnings(), empty()); }
@Override public BooleanExpr toBooleanExpr(JuniperConfiguration jc, Configuration c, Warnings warnings) { Map<String, AsPath> asPaths = jc.getMasterLogicalSystem().getAsPaths(); return toBooleanExpr(asPaths.get(_asPathName), warnings); }
PsFromAsPath extends PsFrom { @Override public BooleanExpr toBooleanExpr(JuniperConfiguration jc, Configuration c, Warnings warnings) { Map<String, AsPath> asPaths = jc.getMasterLogicalSystem().getAsPaths(); return toBooleanExpr(asPaths.get(_asPathName), warnings); } }
PsFromAsPath extends PsFrom { @Override public BooleanExpr toBooleanExpr(JuniperConfiguration jc, Configuration c, Warnings warnings) { Map<String, AsPath> asPaths = jc.getMasterLogicalSystem().getAsPaths(); return toBooleanExpr(asPaths.get(_asPathName), warnings); } PsFromAsPath(String asPathName); }
PsFromAsPath extends PsFrom { @Override public BooleanExpr toBooleanExpr(JuniperConfiguration jc, Configuration c, Warnings warnings) { Map<String, AsPath> asPaths = jc.getMasterLogicalSystem().getAsPaths(); return toBooleanExpr(asPaths.get(_asPathName), warnings); } PsFromAsPath(String asPathName); @Override BooleanExpr toBooleanExpr(JuniperConfiguration jc, Configuration c, Warnings warnings); }
PsFromAsPath extends PsFrom { @Override public BooleanExpr toBooleanExpr(JuniperConfiguration jc, Configuration c, Warnings warnings) { Map<String, AsPath> asPaths = jc.getMasterLogicalSystem().getAsPaths(); return toBooleanExpr(asPaths.get(_asPathName), warnings); } PsFromAsPath(String asPathName); @Override BooleanExpr toBooleanExpr(JuniperConfiguration jc, Configuration c, Warnings warnings);  }