@Test public void testRipToRow() { Row row = getRipEdgeRow("host1", "int1", "host2", "int2"); assertThat( row, allOf( hasColumn( COL_INTERFACE, equalTo(NodeInterfacePair.of("host1", "int1")), Schema.INTERFACE), hasColumn( COL_REMOTE_INTERFACE, equalTo(NodeInterfacePair.of("host2", "int2")), Schema.INTERFACE))); }
static Row getRipEdgeRow(String node, String iface, String remoteNode, String remoteIface) { RowBuilder row = Row.builder(); row.put(COL_INTERFACE, NodeInterfacePair.of(node, iface)) .put(COL_REMOTE_INTERFACE, NodeInterfacePair.of(remoteNode, remoteIface)); return row.build(); }
EdgesAnswerer extends Answerer { static Row getRipEdgeRow(String node, String iface, String remoteNode, String remoteIface) { RowBuilder row = Row.builder(); row.put(COL_INTERFACE, NodeInterfacePair.of(node, iface)) .put(COL_REMOTE_INTERFACE, NodeInterfacePair.of(remoteNode, remoteIface)); return row.build(); } }
EdgesAnswerer extends Answerer { static Row getRipEdgeRow(String node, String iface, String remoteNode, String remoteIface) { RowBuilder row = Row.builder(); row.put(COL_INTERFACE, NodeInterfacePair.of(node, iface)) .put(COL_REMOTE_INTERFACE, NodeInterfacePair.of(remoteNode, remoteIface)); return row.build(); } EdgesAnswerer(Question question, IBatfish batfish); }
EdgesAnswerer extends Answerer { static Row getRipEdgeRow(String node, String iface, String remoteNode, String remoteIface) { RowBuilder row = Row.builder(); row.put(COL_INTERFACE, NodeInterfacePair.of(node, iface)) .put(COL_REMOTE_INTERFACE, NodeInterfacePair.of(remoteNode, remoteIface)); return row.build(); } EdgesAnswerer(Question question, IBatfish batfish); @Override AnswerElement answer(NetworkSnapshot snapshot); }
EdgesAnswerer extends Answerer { static Row getRipEdgeRow(String node, String iface, String remoteNode, String remoteIface) { RowBuilder row = Row.builder(); row.put(COL_INTERFACE, NodeInterfacePair.of(node, iface)) .put(COL_REMOTE_INTERFACE, NodeInterfacePair.of(remoteNode, remoteIface)); return row.build(); } EdgesAnswerer(Question question, IBatfish batfish); @Override AnswerElement answer(NetworkSnapshot snapshot);  }