use of org.openkilda.messaging.nbtopology.response.FlowLoopDto in project open-kilda by telstra.
the class FlowOperationsBolt method processGetFlowLoopsRequest.
private List<InfoData> processGetFlowLoopsRequest(GetFlowLoopsRequest request) {
try {
SwitchId switchId = request.getSwitchId() == null ? null : new SwitchId(request.getSwitchId());
List<FlowLoopDto> flowLoops = flowOperationsService.getLoopedFlows(request.getFlowId(), switchId).stream().map(this::map).collect(Collectors.toList());
FlowLoopsResponse flowLoopsResponse = new FlowLoopsResponse();
flowLoopsResponse.setPayload(flowLoops);
return Collections.singletonList(flowLoopsResponse);
} catch (Exception e) {
throw new MessageException(ErrorType.INTERNAL_ERROR, "Can not dump flow loops", "Internal Error");
}
}
Aggregations