use of org.openkilda.model.IslDownReason in project open-kilda by telstra.
the class NetworkIslServiceTest method noIslCreationOnIslDown.
@Test
public void noIslCreationOnIslDown() {
setupIslStorageStub();
IslReference reference = new IslReference(endpointAlpha1, endpointBeta2);
for (IslDownReason reason : IslDownReason.values()) {
try {
service.islDown(reference.getSource(), reference, reason);
Assert.fail("No expected exception IslControllerNotFoundException");
} catch (IslControllerNotFoundException e) {
// expected
}
}
}
use of org.openkilda.model.IslDownReason in project open-kilda by telstra.
the class IslFsm method makeRerouteAffectedReason.
private String makeRerouteAffectedReason(Endpoint endpoint) {
final IslDownReason downReason = statusAggregator.getDownReason();
final IslStatus effectiveStatus = statusAggregator.getEffectiveStatus();
if (downReason == null) {
return String.format("ISL %s status become %s", reference, effectiveStatus);
}
String humanReason;
switch(downReason) {
case PORT_DOWN:
humanReason = String.format("ISL %s become %s due to physical link DOWN event on %s", reference, effectiveStatus, endpoint);
break;
case POLL_TIMEOUT:
humanReason = String.format("ISL %s become %s because of FAIL TIMEOUT (endpoint:%s)", reference, effectiveStatus, endpoint);
break;
case BFD_DOWN:
humanReason = String.format("ISL %s become %s because BFD detect link failure (endpoint:%s)", reference, effectiveStatus, endpoint);
break;
default:
humanReason = String.format("ISL %s become %s (endpoint:%s, reason:%s)", reference, effectiveStatus, endpoint, downReason);
}
return humanReason;
}
Aggregations