use of org.openkilda.wfm.share.model.Endpoint in project open-kilda by telstra.
the class LinkOperationsBolt method bfdPropertiesWrite.
private BfdPropertiesResponse bfdPropertiesWrite(BfdPropertiesWriteRequest request) {
Endpoint source = new Endpoint(request.getSource());
Endpoint destination = new Endpoint(request.getDestination());
try {
return linkOperationsService.writeBfdProperties(source, destination, request.getProperties());
} catch (IslNotFoundException e) {
throw new MessageException(ErrorType.NOT_FOUND, e.getMessage(), "ISL was not found.");
}
}
use of org.openkilda.wfm.share.model.Endpoint in project open-kilda by telstra.
the class NetworkBfdLogicalPortService method removeController.
private void removeController(BfdLogicalPortFsm controller) {
final Endpoint logical = controller.getLogicalEndpoint();
final Endpoint physical = controller.getPhysicalEndpoint();
controllerByEndpoint.remove(logical);
controllerByEndpoint.remove(physical);
log.debug("BFD logical port controller {} pysical-port={} have done it's jobs and been deleted", logical, physical.getPortNumber());
}
use of org.openkilda.wfm.share.model.Endpoint in project open-kilda by telstra.
the class NetworkBfdLogicalPortService method portAdd.
/**
* Handle BFD logical port add notification.
*/
public void portAdd(Endpoint logical, int physicalPortNumber) {
logServiceCall("PORT-ADD logical={}, physical-port={}", logical, physicalPortNumber);
Endpoint physical = Endpoint.of(logical.getDatapath(), physicalPortNumber);
BfdLogicalPortFsm controller = lookupControllerCreateIfMissing(physical, logical.getPortNumber());
handle(controller, Event.PORT_ADD);
}
use of org.openkilda.wfm.share.model.Endpoint in project open-kilda by telstra.
the class IslHandler method islChangedNotifyFlowMonitor.
@Override
public void islChangedNotifyFlowMonitor(IslReference reference, boolean removed) {
Endpoint src = reference.getSource();
Endpoint dst = reference.getDest();
IslChangedInfoData islChangedInfoData = IslChangedInfoData.builder().source(new NetworkEndpoint(src.getDatapath(), src.getPortNumber())).destination(new NetworkEndpoint(dst.getDatapath(), dst.getPortNumber())).removed(removed).build();
emit(STREAM_FLOW_MONITORING_ID, getCurrentTuple(), makeIslChangedTuple(islChangedInfoData));
}
use of org.openkilda.wfm.share.model.Endpoint in project open-kilda by telstra.
the class NetworkWatcherService method addWatch.
void addWatch(Endpoint endpoint, long currentTime) {
Packet packet = Packet.of(endpoint, packetNo);
log.debug("Watcher service receive ADD-watch request for {} and produce packet id:{} task:{}", endpoint, packet.packetNo, taskId);
discoveryPackets.add(packet);
roundTripPackets.add(packet);
timeouts.computeIfAbsent(currentTime + awaitTime, key -> new HashSet<>()).add(packet);
DiscoverIslCommandData discoveryRequest = new DiscoverIslCommandData(endpoint.getDatapath(), endpoint.getPortNumber(), packetNo);
carrier.sendDiscovery(discoveryRequest);
packetNo += 1;
}
Aggregations