@Test public void testGetColumnMetadata() { List<ColumnMetadata> metadata = getColumnMetadata(); assertThat( metadata, equalTo( ImmutableList.of( new ColumnMetadata( COL_NODE, Schema.NODE, "Node where the route is present", true, false), new ColumnMetadata( COL_VRF, Schema.STRING, "VRF where the route is present", true, false), new ColumnMetadata(COL_IP, Schema.IP, "IP that was being matched on", true, false), new ColumnMetadata( COL_NETWORK, Schema.PREFIX, "The longest-prefix network that matched", false, true), new ColumnMetadata( COL_NUM_ROUTES, Schema.INTEGER, "Number of routes that matched (in case of ECMP)", false, true)))); }
@VisibleForTesting static List<ColumnMetadata> getColumnMetadata() { return ImmutableList.<ColumnMetadata>builder() .add( new ColumnMetadata( COL_NODE, Schema.NODE, "Node where the route is present", true, false)) .add( new ColumnMetadata( COL_VRF, Schema.STRING, "VRF where the route is present", true, false)) .add(new ColumnMetadata(COL_IP, Schema.IP, "IP that was being matched on", true, false)) .add( new ColumnMetadata( COL_NETWORK, Schema.PREFIX, "The longest-prefix network that matched", false, true)) .add( new ColumnMetadata( COL_NUM_ROUTES, Schema.INTEGER, "Number of routes that matched (in case of ECMP)", false, true)) .build(); }
LpmRoutesAnswerer extends Answerer { @VisibleForTesting static List<ColumnMetadata> getColumnMetadata() { return ImmutableList.<ColumnMetadata>builder() .add( new ColumnMetadata( COL_NODE, Schema.NODE, "Node where the route is present", true, false)) .add( new ColumnMetadata( COL_VRF, Schema.STRING, "VRF where the route is present", true, false)) .add(new ColumnMetadata(COL_IP, Schema.IP, "IP that was being matched on", true, false)) .add( new ColumnMetadata( COL_NETWORK, Schema.PREFIX, "The longest-prefix network that matched", false, true)) .add( new ColumnMetadata( COL_NUM_ROUTES, Schema.INTEGER, "Number of routes that matched (in case of ECMP)", false, true)) .build(); } }
LpmRoutesAnswerer extends Answerer { @VisibleForTesting static List<ColumnMetadata> getColumnMetadata() { return ImmutableList.<ColumnMetadata>builder() .add( new ColumnMetadata( COL_NODE, Schema.NODE, "Node where the route is present", true, false)) .add( new ColumnMetadata( COL_VRF, Schema.STRING, "VRF where the route is present", true, false)) .add(new ColumnMetadata(COL_IP, Schema.IP, "IP that was being matched on", true, false)) .add( new ColumnMetadata( COL_NETWORK, Schema.PREFIX, "The longest-prefix network that matched", false, true)) .add( new ColumnMetadata( COL_NUM_ROUTES, Schema.INTEGER, "Number of routes that matched (in case of ECMP)", false, true)) .build(); } LpmRoutesAnswerer(Question question, IBatfish batfish); }
LpmRoutesAnswerer extends Answerer { @VisibleForTesting static List<ColumnMetadata> getColumnMetadata() { return ImmutableList.<ColumnMetadata>builder() .add( new ColumnMetadata( COL_NODE, Schema.NODE, "Node where the route is present", true, false)) .add( new ColumnMetadata( COL_VRF, Schema.STRING, "VRF where the route is present", true, false)) .add(new ColumnMetadata(COL_IP, Schema.IP, "IP that was being matched on", true, false)) .add( new ColumnMetadata( COL_NETWORK, Schema.PREFIX, "The longest-prefix network that matched", false, true)) .add( new ColumnMetadata( COL_NUM_ROUTES, Schema.INTEGER, "Number of routes that matched (in case of ECMP)", false, true)) .build(); } LpmRoutesAnswerer(Question question, IBatfish batfish); @Override AnswerElement answer(NetworkSnapshot snapshot); }
LpmRoutesAnswerer extends Answerer { @VisibleForTesting static List<ColumnMetadata> getColumnMetadata() { return ImmutableList.<ColumnMetadata>builder() .add( new ColumnMetadata( COL_NODE, Schema.NODE, "Node where the route is present", true, false)) .add( new ColumnMetadata( COL_VRF, Schema.STRING, "VRF where the route is present", true, false)) .add(new ColumnMetadata(COL_IP, Schema.IP, "IP that was being matched on", true, false)) .add( new ColumnMetadata( COL_NETWORK, Schema.PREFIX, "The longest-prefix network that matched", false, true)) .add( new ColumnMetadata( COL_NUM_ROUTES, Schema.INTEGER, "Number of routes that matched (in case of ECMP)", false, true)) .build(); } LpmRoutesAnswerer(Question question, IBatfish batfish); @Override AnswerElement answer(NetworkSnapshot snapshot);  }