@Test public void testEigrpToRow() { EigrpEdge testEdge = new EigrpEdge( new EigrpNeighborConfigId(1L, "host1", "int1", "vrf1"), new EigrpNeighborConfigId(1L, "host2", "int2", "vrf2")); Row row = eigrpEdgeToRow(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))); }
@VisibleForTesting static Row eigrpEdgeToRow(EigrpEdge eigrpEdge) { RowBuilder row = Row.builder(); row.put( COL_INTERFACE, NodeInterfacePair.of( eigrpEdge.getNode1().getHostname(), eigrpEdge.getNode1().getInterfaceName())) .put( COL_REMOTE_INTERFACE, NodeInterfacePair.of( eigrpEdge.getNode2().getHostname(), eigrpEdge.getNode2().getInterfaceName())); return row.build(); }
EdgesAnswerer extends Answerer { @VisibleForTesting static Row eigrpEdgeToRow(EigrpEdge eigrpEdge) { RowBuilder row = Row.builder(); row.put( COL_INTERFACE, NodeInterfacePair.of( eigrpEdge.getNode1().getHostname(), eigrpEdge.getNode1().getInterfaceName())) .put( COL_REMOTE_INTERFACE, NodeInterfacePair.of( eigrpEdge.getNode2().getHostname(), eigrpEdge.getNode2().getInterfaceName())); return row.build(); } }
EdgesAnswerer extends Answerer { @VisibleForTesting static Row eigrpEdgeToRow(EigrpEdge eigrpEdge) { RowBuilder row = Row.builder(); row.put( COL_INTERFACE, NodeInterfacePair.of( eigrpEdge.getNode1().getHostname(), eigrpEdge.getNode1().getInterfaceName())) .put( COL_REMOTE_INTERFACE, NodeInterfacePair.of( eigrpEdge.getNode2().getHostname(), eigrpEdge.getNode2().getInterfaceName())); return row.build(); } EdgesAnswerer(Question question, IBatfish batfish); }
EdgesAnswerer extends Answerer { @VisibleForTesting static Row eigrpEdgeToRow(EigrpEdge eigrpEdge) { RowBuilder row = Row.builder(); row.put( COL_INTERFACE, NodeInterfacePair.of( eigrpEdge.getNode1().getHostname(), eigrpEdge.getNode1().getInterfaceName())) .put( COL_REMOTE_INTERFACE, NodeInterfacePair.of( eigrpEdge.getNode2().getHostname(), eigrpEdge.getNode2().getInterfaceName())); return row.build(); } EdgesAnswerer(Question question, IBatfish batfish); @Override AnswerElement answer(NetworkSnapshot snapshot); }
EdgesAnswerer extends Answerer { @VisibleForTesting static Row eigrpEdgeToRow(EigrpEdge eigrpEdge) { RowBuilder row = Row.builder(); row.put( COL_INTERFACE, NodeInterfacePair.of( eigrpEdge.getNode1().getHostname(), eigrpEdge.getNode1().getInterfaceName())) .put( COL_REMOTE_INTERFACE, NodeInterfacePair.of( eigrpEdge.getNode2().getHostname(), eigrpEdge.getNode2().getInterfaceName())); return row.build(); } EdgesAnswerer(Question question, IBatfish batfish); @Override AnswerElement answer(NetworkSnapshot snapshot);  }