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));
}
}
Aggregations