use of org.openkilda.messaging.info.reroute.error.SpeakerRequestError in project open-kilda by telstra.
the class SetInstallRuleErrorAction method execute.
@Override
public void execute(State from, State to, Event event, FlowRerouteContext context, FlowRerouteFsm stateMachine) {
Set<SwitchId> switches = Stream.concat(stateMachine.getPendingCommands().values().stream(), stateMachine.getFailedCommands().values().stream().map(SpeakerResponse::getSwitchId)).collect(Collectors.toSet());
stateMachine.setRerouteError(new SpeakerRequestError("Failed to install rules", switches));
log.debug("Abandoning all pending commands: {}", stateMachine.getPendingCommands());
stateMachine.clearPendingCommands();
}
Aggregations