Search in sources :

Example 1 with SwitchLagPortResponse

use of org.openkilda.messaging.nbtopology.response.SwitchLagPortResponse in project open-kilda by telstra.

the class SwitchServiceImpl method getLagPorts.

@Override
public CompletableFuture<List<LagPortDto>> getLagPorts(SwitchId switchId) {
    logger.info("Getting Link aggregation groups on switch {}", switchId);
    GetSwitchLagPortsRequest data = new GetSwitchLagPortsRequest(switchId);
    CommandMessage request = new CommandMessage(data, System.currentTimeMillis(), RequestCorrelationId.getId());
    return messagingChannel.sendAndGetChunked(nbworkerTopic, request).thenApply(result -> result.stream().map(SwitchLagPortResponse.class::cast).map(SwitchLagPortResponse::getData).map(lagPortMapper::map).collect(Collectors.toList()));
}
Also used : GetSwitchLagPortsRequest(org.openkilda.messaging.nbtopology.request.GetSwitchLagPortsRequest) SwitchLagPortResponse(org.openkilda.messaging.nbtopology.response.SwitchLagPortResponse) CommandMessage(org.openkilda.messaging.command.CommandMessage)

Aggregations

CommandMessage (org.openkilda.messaging.command.CommandMessage)1 GetSwitchLagPortsRequest (org.openkilda.messaging.nbtopology.request.GetSwitchLagPortsRequest)1 SwitchLagPortResponse (org.openkilda.messaging.nbtopology.response.SwitchLagPortResponse)1