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