use of org.openkilda.wfm.share.model.IslReference in project open-kilda by telstra.
the class NetworkIslServiceTest method portDownOverriderBfdUp.
@Test
public void portDownOverriderBfdUp() {
setupIslStorageStub();
IslReference reference = prepareBfdEnabledIsl();
reset(dashboardLogger);
service.islDown(reference.getSource(), reference, IslDownReason.PORT_DOWN);
verify(dashboardLogger).onIslDown(eq(reference), any());
}
use of org.openkilda.wfm.share.model.IslReference in project open-kilda by telstra.
the class NetworkIslServiceTest method resurrectOnRoundTripDiscovery.
@Test
public void resurrectOnRoundTripDiscovery() {
IslReference reference = prepareResurrection();
service.roundTripStatusNotification(reference, new RoundTripStatus(reference.getSource(), IslStatus.ACTIVE));
testResurrection(reference, true);
}
use of org.openkilda.wfm.share.model.IslReference in project open-kilda by telstra.
the class NetworkIslServiceTest method noResurrectOnRoundTripFail.
@Test
public void noResurrectOnRoundTripFail() {
IslReference reference = prepareResurrection();
service.roundTripStatusNotification(reference, new RoundTripStatus(reference.getSource(), IslStatus.INACTIVE));
testResurrection(reference, false);
}
use of org.openkilda.wfm.share.model.IslReference in project open-kilda by telstra.
the class NetworkIslServiceTest method testResurrection.
private void testResurrection(IslReference reference, boolean shouldResurrect) {
final Endpoint alphaEnd = reference.getSource();
final Endpoint zetaEnd = reference.getDest();
reset(carrier);
service.islDefaultRuleDeleted(reference, new RemoveIslDefaultRulesResult(alphaEnd.getDatapath(), alphaEnd.getPortNumber(), zetaEnd.getDatapath(), zetaEnd.getPortNumber(), true));
service.islDefaultRuleDeleted(reference, new RemoveIslDefaultRulesResult(zetaEnd.getDatapath(), zetaEnd.getPortNumber(), alphaEnd.getDatapath(), alphaEnd.getPortNumber(), true));
if (!shouldResurrect) {
verify(carrier).islRemovedNotification(eq(alphaEnd), eq(reference));
verify(carrier).islRemovedNotification(eq(zetaEnd), eq(reference));
verify(carrier).islChangedNotifyFlowMonitor(any(IslReference.class), eq(true));
}
verifyNoMoreInteractions(carrier);
}
use of org.openkilda.wfm.share.model.IslReference in project open-kilda by telstra.
the class NetworkIslServiceTest method considerRoundTripDiscovery.
@Test
public void considerRoundTripDiscovery() {
setupIslStorageStub();
final IslReference reference = prepareActiveIsl();
// round trip discovery (one endpoint enough)
service.roundTripStatusNotification(reference, new RoundTripStatus(reference.getSource(), IslStatus.ACTIVE));
service.islDown(reference.getSource(), reference, IslDownReason.POLL_TIMEOUT);
service.islDown(reference.getDest(), reference, IslDownReason.POLL_TIMEOUT);
verify(dashboardLogger, times(0)).onIslDown(eq(reference), any());
// round trip fail/expire
service.roundTripStatusNotification(reference, new RoundTripStatus(reference.getSource(), IslStatus.INACTIVE));
verify(dashboardLogger).onIslDown(eq(reference), any());
}
Aggregations