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