Search in sources :

Example 1 with BfdLogicalPortFsmContext

use of org.openkilda.wfm.topology.network.controller.bfd.BfdLogicalPortFsm.BfdLogicalPortFsmContext in project open-kilda by telstra.

the class BfdLogicalPortFsm method processWorkerSuccess.

public void processWorkerSuccess(String requestId, InfoData response) {
    if (activeRequests.remove(requestId)) {
        logInfo("receive worker success response: {}", response);
        BfdLogicalPortFsmContext context = BfdLogicalPortFsmContext.builder().workerResponse(response).build();
        processWorkerResponse(Event.WORKER_SUCCESS, context);
    } else {
        reportWorkerResponseIgnored(requestId, response);
    }
}
Also used : BfdLogicalPortFsmContext(org.openkilda.wfm.topology.network.controller.bfd.BfdLogicalPortFsm.BfdLogicalPortFsmContext)

Example 2 with BfdLogicalPortFsmContext

use of org.openkilda.wfm.topology.network.controller.bfd.BfdLogicalPortFsm.BfdLogicalPortFsmContext in project open-kilda by telstra.

the class BfdLogicalPortFsm method switchOnlineStatusUpdate.

@Override
public void switchOnlineStatusUpdate(boolean isOnline) {
    online = isOnline;
    BfdLogicalPortFsmContext context = BfdLogicalPortFsmContext.builder().build();
    if (!isTerminated()) {
        BfdLogicalPortFsmFactory.EXECUTOR.fire(this, isOnline ? Event.ONLINE : Event.OFFLINE, context);
    }
}
Also used : BfdLogicalPortFsmContext(org.openkilda.wfm.topology.network.controller.bfd.BfdLogicalPortFsm.BfdLogicalPortFsmContext)

Example 3 with BfdLogicalPortFsmContext

use of org.openkilda.wfm.topology.network.controller.bfd.BfdLogicalPortFsm.BfdLogicalPortFsmContext in project open-kilda by telstra.

the class NetworkBfdLogicalPortService method enableUpdate.

private void enableUpdate(Endpoint physical, IslReference reference, BfdProperties properties) {
    logServiceCall("ENABLE/UPDATE physical={}, reference={}, properties={}", physical, reference, properties);
    BfdLogicalPortFsm controller = lookupControllerCreateIfMissing(physical);
    BfdLogicalPortFsmContext context = BfdLogicalPortFsmContext.builder().sessionData(new BfdSessionData(reference, properties)).build();
    handle(controller, Event.ENABLE_UPDATE, context);
}
Also used : BfdSessionData(org.openkilda.wfm.topology.network.model.BfdSessionData) BfdLogicalPortFsmContext(org.openkilda.wfm.topology.network.controller.bfd.BfdLogicalPortFsm.BfdLogicalPortFsmContext) BfdLogicalPortFsm(org.openkilda.wfm.topology.network.controller.bfd.BfdLogicalPortFsm)

Example 4 with BfdLogicalPortFsmContext

use of org.openkilda.wfm.topology.network.controller.bfd.BfdLogicalPortFsm.BfdLogicalPortFsmContext in project open-kilda by telstra.

the class BfdLogicalPortFsm method processWorkerError.

public void processWorkerError(String requestId, ErrorData response) {
    if (activeRequests.remove(requestId)) {
        String errorMessage = response == null ? "timeout" : response.getErrorMessage();
        logError("receive worker error response: {}", errorMessage);
        BfdLogicalPortFsmContext context = BfdLogicalPortFsmContext.builder().workerError(response).build();
        processWorkerResponse(Event.WORKER_ERROR, context);
    } else {
        reportWorkerResponseIgnored(requestId, response);
    }
}
Also used : BfdLogicalPortFsmContext(org.openkilda.wfm.topology.network.controller.bfd.BfdLogicalPortFsm.BfdLogicalPortFsmContext)

Aggregations

BfdLogicalPortFsmContext (org.openkilda.wfm.topology.network.controller.bfd.BfdLogicalPortFsm.BfdLogicalPortFsmContext)4 BfdLogicalPortFsm (org.openkilda.wfm.topology.network.controller.bfd.BfdLogicalPortFsm)1 BfdSessionData (org.openkilda.wfm.topology.network.model.BfdSessionData)1