Search in sources :

Example 6 with CreateFlowLoopRequest

use of org.openkilda.messaging.command.flow.CreateFlowLoopRequest in project open-kilda by telstra.

the class FlowServiceImpl method createFlowLoop.

@Override
public CompletableFuture<FlowLoopResponse> createFlowLoop(String flowId, SwitchId switchId) {
    logger.info("Create flow loop for flow {} and switch {}", flowId, switchId);
    CreateFlowLoopRequest request = new CreateFlowLoopRequest(flowId, switchId);
    CommandMessage message = new CommandMessage(request, System.currentTimeMillis(), RequestCorrelationId.getId(), Destination.WFM);
    return messagingChannel.sendAndGet(flowHsTopic, message).thenApply(org.openkilda.messaging.info.flow.FlowResponse.class::cast).thenApply(flowMapper::toFlowLoopResponse);
}
Also used : CreateFlowLoopRequest(org.openkilda.messaging.command.flow.CreateFlowLoopRequest) CommandMessage(org.openkilda.messaging.command.CommandMessage)

Aggregations

CreateFlowLoopRequest (org.openkilda.messaging.command.flow.CreateFlowLoopRequest)6 Test (org.junit.Test)3 Flow (org.openkilda.model.Flow)3 CommandMessage (org.openkilda.messaging.command.CommandMessage)2 DeleteFlowLoopRequest (org.openkilda.messaging.command.flow.DeleteFlowLoopRequest)2 FlowRequest (org.openkilda.messaging.command.flow.FlowRequest)2 Values (org.apache.storm.tuple.Values)1 FlowSegmentRequest (org.openkilda.floodlight.api.request.FlowSegmentRequest)1 MessageData (org.openkilda.messaging.MessageData)1 FlowDeleteRequest (org.openkilda.messaging.command.flow.FlowDeleteRequest)1 FlowMirrorPointCreateRequest (org.openkilda.messaging.command.flow.FlowMirrorPointCreateRequest)1 FlowMirrorPointDeleteRequest (org.openkilda.messaging.command.flow.FlowMirrorPointDeleteRequest)1 FlowPathSwapRequest (org.openkilda.messaging.command.flow.FlowPathSwapRequest)1 FlowRerouteRequest (org.openkilda.messaging.command.flow.FlowRerouteRequest)1 FlowValidationRequest (org.openkilda.messaging.command.flow.FlowValidationRequest)1 SwapFlowEndpointRequest (org.openkilda.messaging.command.flow.SwapFlowEndpointRequest)1 SubFlowsReadRequest (org.openkilda.messaging.command.yflow.SubFlowsReadRequest)1 YFlowDeleteRequest (org.openkilda.messaging.command.yflow.YFlowDeleteRequest)1 YFlowPartialUpdateRequest (org.openkilda.messaging.command.yflow.YFlowPartialUpdateRequest)1 YFlowPathsReadRequest (org.openkilda.messaging.command.yflow.YFlowPathsReadRequest)1