@Test public void testLocalIpUnknownStatically() { BgpActivePeerConfig peer = _nf.bgpNeighborBuilder().setPeerAddress(Ip.parse("1.1.1.1")).build(); assertThat( getLocallyBrokenStatus(peer, BgpSessionProperties.SessionType.EBGP_SINGLEHOP), equalTo(ConfiguredSessionStatus.NO_LOCAL_IP)); assertThat( getLocallyBrokenStatus(peer, BgpSessionProperties.SessionType.EBGP_MULTIHOP), equalTo(ConfiguredSessionStatus.LOCAL_IP_UNKNOWN_STATICALLY)); assertThat( getLocallyBrokenStatus(peer, BgpSessionProperties.SessionType.IBGP), equalTo(ConfiguredSessionStatus.LOCAL_IP_UNKNOWN_STATICALLY)); }
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; }