@Test public void testGetColumnMetadataKeyStatus() { List<ColumnMetadata> columnMetadata = getColumnMetadata(); columnMetadata.forEach( cData -> { if (cData.getName().equals(COL_STATUS)) { assertFalse(cData.getName(), cData.getIsKey()); assertTrue(cData.getName(), cData.getIsValue()); } else { assertTrue(cData.getName(), cData.getIsKey()); assertFalse(cData.getName(), cData.getIsValue()); } }); }
@VisibleForTesting static List<ColumnMetadata> getColumnMetadata() { return ImmutableList.of( new ColumnMetadata(COL_INITIATOR, Schema.NODE, "IPSec initiator", true, false), new ColumnMetadata( COL_INIT_INTERFACE, Schema.INTERFACE, "Initiator Interface", true, false), new ColumnMetadata(COL_INIT_IP, Schema.IP, "Initiator IP", true, false), new ColumnMetadata(COL_RESPONDER, Schema.NODE, "IPSec responder", true, false), new ColumnMetadata( COL_RESPONDER_INTERFACE, Schema.INTERFACE, "Responder Interface", true, false), new ColumnMetadata(COL_RESPONDER_IP, Schema.IP, "Responder IP", true, false), new ColumnMetadata( COL_TUNNEL_INTERFACES, Schema.STRING, "Tunnel interfaces pair used in peering session", true, false), new ColumnMetadata(COL_STATUS, Schema.STRING, "IPSec session status", false, true)); }
IpsecSessionStatusAnswerer extends Answerer { @VisibleForTesting static List<ColumnMetadata> getColumnMetadata() { return ImmutableList.of( new ColumnMetadata(COL_INITIATOR, Schema.NODE, "IPSec initiator", true, false), new ColumnMetadata( COL_INIT_INTERFACE, Schema.INTERFACE, "Initiator Interface", true, false), new ColumnMetadata(COL_INIT_IP, Schema.IP, "Initiator IP", true, false), new ColumnMetadata(COL_RESPONDER, Schema.NODE, "IPSec responder", true, false), new ColumnMetadata( COL_RESPONDER_INTERFACE, Schema.INTERFACE, "Responder Interface", true, false), new ColumnMetadata(COL_RESPONDER_IP, Schema.IP, "Responder IP", true, false), new ColumnMetadata( COL_TUNNEL_INTERFACES, Schema.STRING, "Tunnel interfaces pair used in peering session", true, false), new ColumnMetadata(COL_STATUS, Schema.STRING, "IPSec session status", false, true)); } }
IpsecSessionStatusAnswerer extends Answerer { @VisibleForTesting static List<ColumnMetadata> getColumnMetadata() { return ImmutableList.of( new ColumnMetadata(COL_INITIATOR, Schema.NODE, "IPSec initiator", true, false), new ColumnMetadata( COL_INIT_INTERFACE, Schema.INTERFACE, "Initiator Interface", true, false), new ColumnMetadata(COL_INIT_IP, Schema.IP, "Initiator IP", true, false), new ColumnMetadata(COL_RESPONDER, Schema.NODE, "IPSec responder", true, false), new ColumnMetadata( COL_RESPONDER_INTERFACE, Schema.INTERFACE, "Responder Interface", true, false), new ColumnMetadata(COL_RESPONDER_IP, Schema.IP, "Responder IP", true, false), new ColumnMetadata( COL_TUNNEL_INTERFACES, Schema.STRING, "Tunnel interfaces pair used in peering session", true, false), new ColumnMetadata(COL_STATUS, Schema.STRING, "IPSec session status", false, true)); } IpsecSessionStatusAnswerer(Question question, IBatfish batfish); }
IpsecSessionStatusAnswerer extends Answerer { @VisibleForTesting static List<ColumnMetadata> getColumnMetadata() { return ImmutableList.of( new ColumnMetadata(COL_INITIATOR, Schema.NODE, "IPSec initiator", true, false), new ColumnMetadata( COL_INIT_INTERFACE, Schema.INTERFACE, "Initiator Interface", true, false), new ColumnMetadata(COL_INIT_IP, Schema.IP, "Initiator IP", true, false), new ColumnMetadata(COL_RESPONDER, Schema.NODE, "IPSec responder", true, false), new ColumnMetadata( COL_RESPONDER_INTERFACE, Schema.INTERFACE, "Responder Interface", true, false), new ColumnMetadata(COL_RESPONDER_IP, Schema.IP, "Responder IP", true, false), new ColumnMetadata( COL_TUNNEL_INTERFACES, Schema.STRING, "Tunnel interfaces pair used in peering session", true, false), new ColumnMetadata(COL_STATUS, Schema.STRING, "IPSec session status", false, true)); } IpsecSessionStatusAnswerer(Question question, IBatfish batfish); @Override AnswerElement answer(NetworkSnapshot snapshot); }
IpsecSessionStatusAnswerer extends Answerer { @VisibleForTesting static List<ColumnMetadata> getColumnMetadata() { return ImmutableList.of( new ColumnMetadata(COL_INITIATOR, Schema.NODE, "IPSec initiator", true, false), new ColumnMetadata( COL_INIT_INTERFACE, Schema.INTERFACE, "Initiator Interface", true, false), new ColumnMetadata(COL_INIT_IP, Schema.IP, "Initiator IP", true, false), new ColumnMetadata(COL_RESPONDER, Schema.NODE, "IPSec responder", true, false), new ColumnMetadata( COL_RESPONDER_INTERFACE, Schema.INTERFACE, "Responder Interface", true, false), new ColumnMetadata(COL_RESPONDER_IP, Schema.IP, "Responder IP", true, false), new ColumnMetadata( COL_TUNNEL_INTERFACES, Schema.STRING, "Tunnel interfaces pair used in peering session", true, false), new ColumnMetadata(COL_STATUS, Schema.STRING, "IPSec session status", false, true)); } IpsecSessionStatusAnswerer(Question question, IBatfish batfish); @Override AnswerElement answer(NetworkSnapshot snapshot);  }