@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)); }
@Test public void testNoLocalAs() { BgpActivePeerConfig peer = _nf.bgpNeighborBuilder().setLocalIp(Ip.parse("1.1.1.1")).build(); assertStatusMatchesForAllSessionTypes(peer, ConfiguredSessionStatus.NO_LOCAL_AS); }
@Test public void testNoRemoteIp() { BgpActivePeerConfig peer = _nf.bgpNeighborBuilder().setLocalIp(Ip.parse("1.1.1.1")).setLocalAs(1L).build(); assertStatusMatchesForAllSessionTypes(peer, ConfiguredSessionStatus.NO_REMOTE_IP); }
@Test public void testNoRemoteAs() { BgpActivePeerConfig peer = _nf.bgpNeighborBuilder() .setPeerAddress(Ip.parse("1.1.1.1")) .setLocalIp(Ip.parse("2.2.2.2")) .setLocalAs(1L) .build(); assertStatusMatchesForAllSessionTypes(peer, ConfiguredSessionStatus.NO_REMOTE_AS); }
@Test public void testNotLocallyBroken() { BgpActivePeerConfig peer = _nf.bgpNeighborBuilder() .setPeerAddress(Ip.parse("1.1.1.1")) .setLocalIp(Ip.parse("2.2.2.2")) .setLocalAs(1L) .setRemoteAs(1L) .build(); assertStatusMatchesForAllSessionTypes(peer, null); }
BgpPeerConfig neighbor = _factory .bgpNeighborBuilder() .setPeerAddress(Ip.ZERO) .setBgpProcess(bgpProcess) BgpPeerConfig neighborWithMissingPolicies = _factory .bgpNeighborBuilder() .setPeerAddress(Ip.MAX) .setBgpProcess(bgpProcess)