Search in sources :

Example 6 with PortFsm

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

the class NetworkPortService method fail.

/**
 * Feed port FSM with fail event from discovery poll subsystem.
 */
public void fail(Endpoint endpoint) {
    log.debug("Port service receive fail for {}", endpoint);
    PortFsm portFsm = locateController(endpoint);
    PortFsmContext context = PortFsmContext.builder(carrier).build();
    controllerExecutor.fire(portFsm, PortFsmEvent.FAIL, context);
}
Also used : PortFsm(org.openkilda.wfm.topology.network.controller.port.PortFsm) PortFsmContext(org.openkilda.wfm.topology.network.controller.port.PortFsm.PortFsmContext)

Example 7 with PortFsm

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

the class NetworkPortService method setup.

/**
 * .
 */
public void setup(Endpoint endpoint, Isl history) {
    log.info("Port service receive setup request for {}", endpoint);
    // TODO: try to switch on atomic action i.e. port-setup + online|offline action in one event
    PortFsm portFsm = controllerFactory.produce(reportFactory, endpoint, history);
    controller.put(endpoint, portFsm);
}
Also used : PortFsm(org.openkilda.wfm.topology.network.controller.port.PortFsm)

Example 8 with PortFsm

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

the class NetworkPortService method roundTripStatusNotification.

/**
 * Handle round trip status notification.
 */
public void roundTripStatusNotification(RoundTripStatus status) {
    log.debug("Port service receive round trip status notification: {}", status);
    PortFsm portFsm = locateController(status.getEndpoint());
    PortFsmContext context = PortFsmContext.builder(carrier).roundTripStatus(status).build();
    controllerExecutor.fire(portFsm, PortFsmEvent.ROUND_TRIP_STATUS, context);
}
Also used : PortFsm(org.openkilda.wfm.topology.network.controller.port.PortFsm) PortFsmContext(org.openkilda.wfm.topology.network.controller.port.PortFsm.PortFsmContext)

Aggregations

PortFsm (org.openkilda.wfm.topology.network.controller.port.PortFsm)8 PortFsmContext (org.openkilda.wfm.topology.network.controller.port.PortFsm.PortFsmContext)5 PortFsmEvent (org.openkilda.wfm.topology.network.controller.port.PortFsm.PortFsmEvent)3 MessageException (org.openkilda.messaging.error.MessageException)1 PortProperties (org.openkilda.model.PortProperties)1 PersistenceException (org.openkilda.persistence.exceptions.PersistenceException)1