use of org.openkilda.wfm.share.model.IslReference in project open-kilda by telstra.
the class NetworkIslServiceTest method movedOverrideRoundTripState.
@Test
public void movedOverrideRoundTripState() {
setupIslStorageStub();
final IslReference reference = prepareActiveIsl();
// inject round-trip status
service.roundTripStatusNotification(reference, new RoundTripStatus(reference.getDest(), IslStatus.ACTIVE));
Optional<Isl> forward = islStorage.lookup(reference.getSource(), reference.getDest());
Assert.assertTrue(forward.isPresent());
Assert.assertNotEquals(IslStatus.ACTIVE, forward.get().getRoundTripStatus());
Assert.assertEquals(IslStatus.ACTIVE, forward.get().getStatus());
Optional<Isl> reverse = islStorage.lookup(reference.getDest(), reference.getSource());
Assert.assertTrue(reverse.isPresent());
Assert.assertEquals(IslStatus.ACTIVE, reverse.get().getRoundTripStatus());
Assert.assertEquals(IslStatus.ACTIVE, reverse.get().getStatus());
service.islMove(reference.getSource(), reference);
verify(dashboardLogger).onIslMoved(eq(reference), any());
forward = islStorage.lookup(reference.getSource(), reference.getDest());
Assert.assertTrue(forward.isPresent());
Assert.assertEquals(IslStatus.MOVED, forward.get().getActualStatus());
Assert.assertEquals(IslStatus.MOVED, forward.get().getStatus());
reverse = islStorage.lookup(reference.getDest(), reference.getSource());
Assert.assertTrue(reverse.isPresent());
Assert.assertNotEquals(IslStatus.MOVED, reverse.get().getActualStatus());
Assert.assertEquals(IslStatus.MOVED, reverse.get().getStatus());
verify(carrier).islStatusUpdateNotification(any(IslStatusUpdateNotification.class));
verify(carrier).triggerReroute(any(RerouteAffectedFlows.class));
}
use of org.openkilda.wfm.share.model.IslReference in project open-kilda by telstra.
the class NetworkIslServiceTest method resurrectAfterRemoval.
@Test
public void resurrectAfterRemoval() {
IslReference reference = prepareResurrection();
service.islUp(reference.getSource(), reference, new IslDataHolder(1000, 1000, 1000));
testResurrection(reference, true);
}
use of org.openkilda.wfm.share.model.IslReference in project open-kilda by telstra.
the class NetworkIslServiceTest method roundTripDiscoveryOnSourceResetPortDownStatus.
@Test
public void roundTripDiscoveryOnSourceResetPortDownStatus() {
IslReference reference = preparePortDownStatusReset();
service.roundTripStatusNotification(reference, new RoundTripStatus(reference.getSource(), IslStatus.ACTIVE));
verifyNoMoreInteractions(dashboardLogger);
service.roundTripStatusNotification(reference, new RoundTripStatus(reference.getSource(), IslStatus.ACTIVE));
verify(dashboardLogger).onIslUp(eq(reference), any());
verifyNoMoreInteractions(dashboardLogger);
}
use of org.openkilda.wfm.share.model.IslReference in project open-kilda by telstra.
the class NetworkIslServiceTest method verifyDelete.
private void verifyDelete() {
verify(carrier).bfdDisableRequest(endpointAlpha1);
verify(carrier).bfdDisableRequest(endpointBeta2);
verify(carrier).auxiliaryPollModeUpdateRequest(endpointAlpha1, false);
verify(carrier).auxiliaryPollModeUpdateRequest(endpointBeta2, false);
IslReference reference = new IslReference(endpointAlpha1, endpointBeta2);
verify(carrier).islRemovedNotification(endpointAlpha1, reference);
verify(carrier).islRemovedNotification(endpointBeta2, reference);
verify(carrier).islChangedNotifyFlowMonitor(reference, true);
verifyNoMoreInteractions(carrier);
}
use of org.openkilda.wfm.share.model.IslReference in project open-kilda by telstra.
the class NetworkIslServiceTest method noResurrectOnBfdKill.
@Test
public void noResurrectOnBfdKill() {
IslReference reference = prepareResurrection();
service.bfdStatusUpdate(reference.getSource(), reference, BfdStatusUpdate.KILL);
testResurrection(reference, false);
}
Aggregations