use of org.openkilda.wfm.share.model.IslReference in project open-kilda by telstra.
the class RouterBolt method handleOneWayLatency.
private void handleOneWayLatency(Tuple input, IslOneWayLatency data) {
IslReference islReference = new IslReference(Endpoint.of(data.getSrcSwitchId(), data.getSrcPortNo()), Endpoint.of(data.getDstSwitchId(), data.getDstPortNo()));
Values values = new Values(islReference, data, getCommandContext());
getOutput().emit(StreamType.ONE_WAY_MANIPULATION.toString(), input, values);
}
use of org.openkilda.wfm.share.model.IslReference in project open-kilda by telstra.
the class NetworkUniIslService method uniIslBfdStatusUpdate.
/**
* .
*/
public void uniIslBfdStatusUpdate(Endpoint endpoint, BfdStatusUpdate status) {
log.debug("Uni-ISL service receive BFD status update for {} - status:{}", endpoint, status);
IslReference reference = lookupEndpointData(endpoint);
if (isIslReferenceUsable(reference)) {
carrier.notifyBfdStatus(endpoint, reference, status);
}
}
use of org.openkilda.wfm.share.model.IslReference in project open-kilda by telstra.
the class NetworkUniIslService method islRemovedNotification.
/**
* Process ISL removed notification.
*/
public void islRemovedNotification(Endpoint endpoint, IslReference removedIsl) {
log.debug("Uni-ISL service receive ISL-REMOVED notification for {}", endpoint);
IslReference storedIslReference = lookupEndpointData(endpoint);
if (removedIsl.equals(storedIslReference)) {
log.info("Received ISL-REMOVED notification. The endpoint data for {} has been set to the initial value.", endpoint);
endpointData.put(endpoint, IslReference.of(endpoint));
carrier.exhaustedPollModeUpdateRequest(endpoint, false);
}
}
use of org.openkilda.wfm.share.model.IslReference in project open-kilda by telstra.
the class NetworkUniIslService method uniIslDiscovery.
/**
* .
*/
public void uniIslDiscovery(Endpoint endpoint, IslInfoData speakerDiscoveryEvent) {
log.debug("Uni-ISL service receive DISCOVERED notification for {}", endpoint);
IslReference reference = lookupEndpointData(endpoint);
IslReference effectiveReference = IslReference.of(speakerDiscoveryEvent);
IslDataHolder islData = new IslDataHolder(speakerDiscoveryEvent);
if (isIslReferenceUsable(reference)) {
if (reference.equals(effectiveReference)) {
carrier.notifyIslUp(endpoint, reference, islData);
return;
}
carrier.notifyIslMove(endpoint, reference);
}
if (!effectiveReference.isSelfLoop()) {
carrier.notifyIslUp(endpoint, effectiveReference, islData);
carrier.exhaustedPollModeUpdateRequest(endpoint, false);
} else {
log.error("Self looped ISL discovery received: {}", effectiveReference);
}
endpointData.put(endpoint, effectiveReference);
}
use of org.openkilda.wfm.share.model.IslReference in project open-kilda by telstra.
the class NetworkWatcherService method discovery.
private void discovery(IslInfoData discoveryEvent, Packet packet) {
if (log.isDebugEnabled()) {
IslReference ref = IslReference.of(discoveryEvent);
log.debug("Watcher service receive DISCOVERY event for {} id:{} task:{} - {}", packet.endpoint, packet.packetNo, taskId, ref);
}
boolean wasProduced = discoveryPackets.remove(packet);
boolean wasConfirmed = confirmedPackets.remove(packet);
if (wasProduced || wasConfirmed) {
carrier.oneWayDiscoveryReceived(packet.endpoint, packet.packetNo, discoveryEvent, now());
} else {
log.error("Receive invalid or removed discovery packet on {} id:{} task:{}", packet.endpoint, packet.packetNo, taskId);
}
}
Aggregations