@Test public void testPassiveNotLocallyBroken() { BgpPassivePeerConfig peer = _nf.bgpDynamicNeighborBuilder() .setLocalAs(1L) .setPeerPrefix(Prefix.create(Ip.parse("1.1.1.1"), 24)) .setRemoteAs(1L) .build(); assertThat(getLocallyBrokenStatus(peer), nullValue()); }
static ConfiguredSessionStatus getLocallyBrokenStatus(BgpPassivePeerConfig passivePeerConfig) { if (passivePeerConfig.getLocalAs() == null) { return ConfiguredSessionStatus.NO_LOCAL_AS; } else if (passivePeerConfig.getPeerPrefix() == null) { return ConfiguredSessionStatus.NO_REMOTE_PREFIX; } else if (passivePeerConfig.getRemoteAsns().isEmpty()) { return ConfiguredSessionStatus.NO_REMOTE_AS; } return null; }
BgpSessionAnswererUtils { static ConfiguredSessionStatus getLocallyBrokenStatus(BgpPassivePeerConfig passivePeerConfig) { if (passivePeerConfig.getLocalAs() == null) { return ConfiguredSessionStatus.NO_LOCAL_AS; } else if (passivePeerConfig.getPeerPrefix() == null) { return ConfiguredSessionStatus.NO_REMOTE_PREFIX; } else if (passivePeerConfig.getRemoteAsns().isEmpty()) { return ConfiguredSessionStatus.NO_REMOTE_AS; } return null; } }
BgpSessionAnswererUtils { static ConfiguredSessionStatus getLocallyBrokenStatus(BgpPassivePeerConfig passivePeerConfig) { if (passivePeerConfig.getLocalAs() == null) { return ConfiguredSessionStatus.NO_LOCAL_AS; } else if (passivePeerConfig.getPeerPrefix() == null) { return ConfiguredSessionStatus.NO_REMOTE_PREFIX; } else if (passivePeerConfig.getRemoteAsns().isEmpty()) { return ConfiguredSessionStatus.NO_REMOTE_AS; } return null; } private  BgpSessionAnswererUtils(); }
BgpSessionAnswererUtils { static ConfiguredSessionStatus getLocallyBrokenStatus(BgpPassivePeerConfig passivePeerConfig) { if (passivePeerConfig.getLocalAs() == null) { return ConfiguredSessionStatus.NO_LOCAL_AS; } else if (passivePeerConfig.getPeerPrefix() == null) { return ConfiguredSessionStatus.NO_REMOTE_PREFIX; } else if (passivePeerConfig.getRemoteAsns().isEmpty()) { return ConfiguredSessionStatus.NO_REMOTE_AS; } return null; } private  BgpSessionAnswererUtils();  }
BgpSessionAnswererUtils { static ConfiguredSessionStatus getLocallyBrokenStatus(BgpPassivePeerConfig passivePeerConfig) { if (passivePeerConfig.getLocalAs() == null) { return ConfiguredSessionStatus.NO_LOCAL_AS; } else if (passivePeerConfig.getPeerPrefix() == null) { return ConfiguredSessionStatus.NO_REMOTE_PREFIX; } else if (passivePeerConfig.getRemoteAsns().isEmpty()) { return ConfiguredSessionStatus.NO_REMOTE_AS; } return null; } private  BgpSessionAnswererUtils();  static final String COL_ADDRESS_FAMILIES; static final String COL_LOCAL_INTERFACE; static final String COL_LOCAL_AS; static final String COL_LOCAL_IP; static final String COL_NODE; static final String COL_REMOTE_AS; static final String COL_REMOTE_NODE; static final String COL_REMOTE_INTERFACE; static final String COL_REMOTE_IP; static final String COL_SESSION_TYPE; static final String COL_VRF; }