@Test public void testIsisToRow() { IsisEdge testEdge = new IsisEdge( IsisLevel.LEVEL_1, new IsisNode("host1", "int1"), new IsisNode("host2", "int2")); Row row = isisEdgeToRow(testEdge); 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 isisEdgeToRow(IsisEdge isisEdge) { RowBuilder row = Row.builder(); row.put( COL_INTERFACE, NodeInterfacePair.of( isisEdge.getNode1().getNode(), isisEdge.getNode1().getInterfaceName())) .put( COL_REMOTE_INTERFACE, NodeInterfacePair.of( isisEdge.getNode2().getNode(), isisEdge.getNode2().getInterfaceName())); return row.build(); }
EdgesAnswerer extends Answerer { static Row isisEdgeToRow(IsisEdge isisEdge) { RowBuilder row = Row.builder(); row.put( COL_INTERFACE, NodeInterfacePair.of( isisEdge.getNode1().getNode(), isisEdge.getNode1().getInterfaceName())) .put( COL_REMOTE_INTERFACE, NodeInterfacePair.of( isisEdge.getNode2().getNode(), isisEdge.getNode2().getInterfaceName())); return row.build(); } }
EdgesAnswerer extends Answerer { static Row isisEdgeToRow(IsisEdge isisEdge) { RowBuilder row = Row.builder(); row.put( COL_INTERFACE, NodeInterfacePair.of( isisEdge.getNode1().getNode(), isisEdge.getNode1().getInterfaceName())) .put( COL_REMOTE_INTERFACE, NodeInterfacePair.of( isisEdge.getNode2().getNode(), isisEdge.getNode2().getInterfaceName())); return row.build(); } EdgesAnswerer(Question question, IBatfish batfish); }
EdgesAnswerer extends Answerer { static Row isisEdgeToRow(IsisEdge isisEdge) { RowBuilder row = Row.builder(); row.put( COL_INTERFACE, NodeInterfacePair.of( isisEdge.getNode1().getNode(), isisEdge.getNode1().getInterfaceName())) .put( COL_REMOTE_INTERFACE, NodeInterfacePair.of( isisEdge.getNode2().getNode(), isisEdge.getNode2().getInterfaceName())); return row.build(); } EdgesAnswerer(Question question, IBatfish batfish); @Override AnswerElement answer(NetworkSnapshot snapshot); }
EdgesAnswerer extends Answerer { static Row isisEdgeToRow(IsisEdge isisEdge) { RowBuilder row = Row.builder(); row.put( COL_INTERFACE, NodeInterfacePair.of( isisEdge.getNode1().getNode(), isisEdge.getNode1().getInterfaceName())) .put( COL_REMOTE_INTERFACE, NodeInterfacePair.of( isisEdge.getNode2().getNode(), isisEdge.getNode2().getInterfaceName())); return row.build(); } EdgesAnswerer(Question question, IBatfish batfish); @Override AnswerElement answer(NetworkSnapshot snapshot);  }