Search in sources :

Example 1 with BfdLogicalPortFsm

use of org.openkilda.wfm.topology.network.controller.bfd.BfdLogicalPortFsm 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 2 with BfdLogicalPortFsm

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

the class NetworkBfdLogicalPortService method handle.

// -- private methods --
private void handle(Endpoint endpoint, Event event) {
    BfdLogicalPortFsm controller = controllerByEndpoint.get(endpoint);
    if (controller == null) {
        log.info("There is no BFD logical port controller on {} - ignore remove request", endpoint);
        return;
    }
    handle(controller, event);
}
Also used : BfdLogicalPortFsm(org.openkilda.wfm.topology.network.controller.bfd.BfdLogicalPortFsm)

Example 3 with BfdLogicalPortFsm

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

the class NetworkBfdLogicalPortService method createController.

private BfdLogicalPortFsm createController(Endpoint physical, int logicalPortNumber) {
    BfdLogicalPortFsm controller = controllerFactory.produce(switchOnlineStatusMonitor, physical, logicalPortNumber);
    controllerByEndpoint.put(physical, controller);
    controllerByEndpoint.put(controller.getLogicalEndpoint(), controller);
    return controller;
}
Also used : BfdLogicalPortFsm(org.openkilda.wfm.topology.network.controller.bfd.BfdLogicalPortFsm)

Example 4 with BfdLogicalPortFsm

use of org.openkilda.wfm.topology.network.controller.bfd.BfdLogicalPortFsm 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);
}
Also used : Endpoint(org.openkilda.wfm.share.model.Endpoint) BfdLogicalPortFsm(org.openkilda.wfm.topology.network.controller.bfd.BfdLogicalPortFsm)

Aggregations

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