Search in sources :

Example 6 with FlowPathStatus

use of org.openkilda.model.FlowPathStatus in project open-kilda by telstra.

the class RevertFlowMirrorPathStatusAction method perform.

@Override
protected void perform(State from, State to, Event event, FlowMirrorPointDeleteContext context, FlowMirrorPointDeleteFsm stateMachine) {
    PathId mirrorPathId = stateMachine.getMirrorPathId();
    FlowPathStatus originalStatus = stateMachine.getOriginalFlowMirrorPathStatus();
    if (originalStatus != null) {
        log.debug("Reverting the flow mirror path status of {} to {}", mirrorPathId, originalStatus);
        flowMirrorPathRepository.updateStatus(mirrorPathId, FlowPathStatus.ACTIVE);
        stateMachine.saveActionToHistory(format("The flow mirror path status was reverted to %s", originalStatus));
    }
}
Also used : PathId(org.openkilda.model.PathId) FlowPathStatus(org.openkilda.model.FlowPathStatus)

Aggregations

FlowPathStatus (org.openkilda.model.FlowPathStatus)6 FlowStatus (org.openkilda.model.FlowStatus)3 PathId (org.openkilda.model.PathId)3 Flow (org.openkilda.model.Flow)2 YFlow (org.openkilda.model.YFlow)1 TimedExecution (org.openkilda.wfm.share.metrics.TimedExecution)1 FlowProcessingException (org.openkilda.wfm.topology.flowhs.exception.FlowProcessingException)1