@Test public void testColumnSchemas() { TableMetadata tableMetadata = MlagPropertiesAnswerer.getMetadata(); assertThat( tableMetadata.getColumnMetadata().stream() .map(ColumnMetadata::getSchema) .collect(ImmutableList.toImmutableList()), equalTo( ImmutableList.of( Schema.NODE, Schema.STRING, Schema.IP, Schema.INTERFACE, Schema.INTERFACE))); }
@VisibleForTesting @Nonnull static TableMetadata getMetadata() { Builder<ColumnMetadata> b = ImmutableList.builder(); b.add( new ColumnMetadata(COL_NODE, Schema.NODE, "Node name", true, false), new ColumnMetadata(COL_MLAG_ID, Schema.STRING, "MLAG domain ID", true, false), new ColumnMetadata(COL_MLAG_PEER_ADDRESS, Schema.IP, "Peer's IP address", false, true), new ColumnMetadata( COL_MLAG_PEER_INTERFACE, Schema.INTERFACE, "Local interface used for MLAG peering", false, true), new ColumnMetadata( COL_MLAG_LOCAL_INTERFACE, Schema.INTERFACE, "Local interface used as source-interface for MLAG peering", false, true)); return new TableMetadata(b.build()); }
MlagPropertiesAnswerer extends Answerer { @VisibleForTesting @Nonnull static TableMetadata getMetadata() { Builder<ColumnMetadata> b = ImmutableList.builder(); b.add( new ColumnMetadata(COL_NODE, Schema.NODE, "Node name", true, false), new ColumnMetadata(COL_MLAG_ID, Schema.STRING, "MLAG domain ID", true, false), new ColumnMetadata(COL_MLAG_PEER_ADDRESS, Schema.IP, "Peer's IP address", false, true), new ColumnMetadata( COL_MLAG_PEER_INTERFACE, Schema.INTERFACE, "Local interface used for MLAG peering", false, true), new ColumnMetadata( COL_MLAG_LOCAL_INTERFACE, Schema.INTERFACE, "Local interface used as source-interface for MLAG peering", false, true)); return new TableMetadata(b.build()); } }
MlagPropertiesAnswerer extends Answerer { @VisibleForTesting @Nonnull static TableMetadata getMetadata() { Builder<ColumnMetadata> b = ImmutableList.builder(); b.add( new ColumnMetadata(COL_NODE, Schema.NODE, "Node name", true, false), new ColumnMetadata(COL_MLAG_ID, Schema.STRING, "MLAG domain ID", true, false), new ColumnMetadata(COL_MLAG_PEER_ADDRESS, Schema.IP, "Peer's IP address", false, true), new ColumnMetadata( COL_MLAG_PEER_INTERFACE, Schema.INTERFACE, "Local interface used for MLAG peering", false, true), new ColumnMetadata( COL_MLAG_LOCAL_INTERFACE, Schema.INTERFACE, "Local interface used as source-interface for MLAG peering", false, true)); return new TableMetadata(b.build()); } MlagPropertiesAnswerer(Question question, IBatfish batfish); }
MlagPropertiesAnswerer extends Answerer { @VisibleForTesting @Nonnull static TableMetadata getMetadata() { Builder<ColumnMetadata> b = ImmutableList.builder(); b.add( new ColumnMetadata(COL_NODE, Schema.NODE, "Node name", true, false), new ColumnMetadata(COL_MLAG_ID, Schema.STRING, "MLAG domain ID", true, false), new ColumnMetadata(COL_MLAG_PEER_ADDRESS, Schema.IP, "Peer's IP address", false, true), new ColumnMetadata( COL_MLAG_PEER_INTERFACE, Schema.INTERFACE, "Local interface used for MLAG peering", false, true), new ColumnMetadata( COL_MLAG_LOCAL_INTERFACE, Schema.INTERFACE, "Local interface used as source-interface for MLAG peering", false, true)); return new TableMetadata(b.build()); } MlagPropertiesAnswerer(Question question, IBatfish batfish); @Override AnswerElement answer(NetworkSnapshot snapshot); }
MlagPropertiesAnswerer extends Answerer { @VisibleForTesting @Nonnull static TableMetadata getMetadata() { Builder<ColumnMetadata> b = ImmutableList.builder(); b.add( new ColumnMetadata(COL_NODE, Schema.NODE, "Node name", true, false), new ColumnMetadata(COL_MLAG_ID, Schema.STRING, "MLAG domain ID", true, false), new ColumnMetadata(COL_MLAG_PEER_ADDRESS, Schema.IP, "Peer's IP address", false, true), new ColumnMetadata( COL_MLAG_PEER_INTERFACE, Schema.INTERFACE, "Local interface used for MLAG peering", false, true), new ColumnMetadata( COL_MLAG_LOCAL_INTERFACE, Schema.INTERFACE, "Local interface used as source-interface for MLAG peering", false, true)); return new TableMetadata(b.build()); } MlagPropertiesAnswerer(Question question, IBatfish batfish); @Override AnswerElement answer(NetworkSnapshot snapshot);  }