Search in sources :

Example 1 with FlowsDumpRequest

use of org.openkilda.messaging.nbtopology.request.FlowsDumpRequest in project open-kilda by telstra.

the class FlowServiceImpl method getAllFlows.

/**
 * {@inheritDoc}
 */
@Override
public CompletableFuture<List<FlowResponsePayload>> getAllFlows() {
    final String correlationId = RequestCorrelationId.getId();
    logger.debug("Get flows request processing");
    return handleGetAllFlowsRequest(new FlowsDumpRequest(), correlationId, flowMapper::toFlowResponseOutput);
}
Also used : FlowsDumpRequest(org.openkilda.messaging.nbtopology.request.FlowsDumpRequest)

Example 2 with FlowsDumpRequest

use of org.openkilda.messaging.nbtopology.request.FlowsDumpRequest in project open-kilda by telstra.

the class FlowServiceImpl method getAllFlowsV2.

/**
 * {@inheritDoc}
 */
@Override
public CompletableFuture<List<FlowResponseV2>> getAllFlowsV2(String status) {
    final String correlationId = RequestCorrelationId.getId();
    logger.debug("Get flows request processing");
    FlowsDumpRequest data;
    try {
        data = new FlowsDumpRequest(status);
    } catch (IllegalArgumentException e) {
        logger.error("Can not parse arguments: {}", e.getMessage(), e);
        throw new MessageException(correlationId, System.currentTimeMillis(), ErrorType.DATA_INVALID, e.getMessage(), "Can not parse arguments of the flow dump request");
    }
    return handleGetAllFlowsRequest(data, correlationId, flowMapper::toFlowResponseV2);
}
Also used : MessageException(org.openkilda.messaging.error.MessageException) FlowsDumpRequest(org.openkilda.messaging.nbtopology.request.FlowsDumpRequest)

Aggregations

FlowsDumpRequest (org.openkilda.messaging.nbtopology.request.FlowsDumpRequest)2 MessageException (org.openkilda.messaging.error.MessageException)1