use of org.openkilda.floodlight.api.request.rulemanager.DeleteSpeakerCommandsRequest in project open-kilda by telstra.
the class YFlowDeleteServiceTest method handleSpeakerCommandsAndFailRemove.
private void handleSpeakerCommandsAndFailRemove(YFlowDeleteService yFlowDeleteService, String yFlowFsmKey, String commandFlowIdToFail) {
handleSpeakerRequests(request -> {
SpeakerResponse commandResponse;
if (request instanceof FlowSegmentRequest) {
FlowSegmentRequest flowSegmentRequest = (FlowSegmentRequest) request;
commandResponse = flowSegmentRequest.isRemoveRequest() && flowSegmentRequest.getMetadata().getFlowId().equals(commandFlowIdToFail) ? buildErrorSpeakerResponse(flowSegmentRequest) : buildSuccessfulSpeakerResponse(flowSegmentRequest);
} else {
BaseSpeakerCommandsRequest speakerCommandsRequest = (BaseSpeakerCommandsRequest) request;
commandResponse = request instanceof DeleteSpeakerCommandsRequest ? buildErrorYFlowSpeakerResponse(speakerCommandsRequest) : buildSuccessfulYFlowSpeakerResponse(speakerCommandsRequest);
}
handleAsyncResponse(yFlowDeleteService, yFlowFsmKey, commandResponse);
});
}
use of org.openkilda.floodlight.api.request.rulemanager.DeleteSpeakerCommandsRequest in project open-kilda by telstra.
the class UpdateYFlowRulesAction method buildYFlowDeleteRequest.
protected DeleteSpeakerCommandsRequest buildYFlowDeleteRequest(SwitchId switchId, PathId pathId, CommandContext context) {
List<OfCommand> ofCommands = buildYFlowOfCommands(switchId, pathId);
UUID commandId = commandIdGenerator.generate();
MessageContext messageContext = new MessageContext(commandId.toString(), context.getCorrelationId());
return new DeleteSpeakerCommandsRequest(messageContext, switchId, commandId, ofCommands);
}
Aggregations