use of org.openkilda.northbound.dto.v2.yflows.YFlowDump in project open-kilda by telstra.
the class YFlowServiceImpl method dumpYFlows.
@Override
public CompletableFuture<YFlowDump> dumpYFlows() {
log.debug("Processing getting all y-flows");
YFlowsDumpRequest dumpRequest = new YFlowsDumpRequest();
CommandMessage request = new CommandMessage(dumpRequest, System.currentTimeMillis(), RequestCorrelationId.getId());
return messagingChannel.sendAndGetChunked(flowHsTopic, request).thenApply(result -> result.stream().map(YFlowResponse.class::cast).map(YFlowResponse::getYFlow).map(flowMapper::toYFlow).collect(Collectors.toList())).thenApply(YFlowDump::new);
}
Aggregations