use of org.openkilda.wfm.share.model.Endpoint in project open-kilda by telstra.
the class IslFsm method triggerAffectedFlowReroute.
private void triggerAffectedFlowReroute(IslFsmContext context) {
String reason = makeRerouteAffectedReason(context.getEndpoint());
// FIXME (surabujin): why do we send only one ISL endpoint here?
Endpoint ingress = reference.getSource();
PathNode pathNode = new PathNode(ingress.getDatapath(), ingress.getPortNumber(), 0);
RerouteAffectedFlows trigger = new RerouteAffectedFlows(pathNode, reason);
context.getOutput().triggerReroute(trigger);
}
use of org.openkilda.wfm.share.model.Endpoint in project open-kilda by telstra.
the class IslFsm method sendRemoveIslResources.
private void sendRemoveIslResources(IIslCarrier carrier) {
final Endpoint source = reference.getSource();
final Endpoint dest = reference.getDest();
sendRemoveIslResources(carrier, source, dest);
sendRemoveIslResources(carrier, dest, source);
}
use of org.openkilda.wfm.share.model.Endpoint in project open-kilda by telstra.
the class IslFsm method triggerDownFlowReroute.
private void triggerDownFlowReroute(IslFsmContext context) {
if (shouldEmitDownFlowReroute()) {
Endpoint ingress = reference.getSource();
PathNode pathNode = new PathNode(ingress.getDatapath(), ingress.getPortNumber(), 0);
RerouteInactiveFlows trigger = new RerouteInactiveFlows(pathNode, String.format("ISL %s status become %s", reference, IslStatus.ACTIVE));
context.getOutput().triggerReroute(trigger);
}
}
use of org.openkilda.wfm.share.model.Endpoint in project open-kilda by telstra.
the class BiIslDataHolder method put.
public void put(Endpoint endpoint, T data) {
int idx = dataIndexByEndpoint(reference, endpoint);
islData.set(idx, data);
}
use of org.openkilda.wfm.share.model.Endpoint 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);
}
Aggregations