use of org.openkilda.messaging.nbtopology.request.LinkPropsGet in project open-kilda by telstra.
the class LinkServiceImpl method getLinkProps.
@Override
public CompletableFuture<List<LinkPropsDto>> getLinkProps(SwitchId srcSwitch, Integer srcPort, SwitchId dstSwitch, Integer dstPort) {
final String correlationId = RequestCorrelationId.getId();
logger.debug("Get link properties request received");
LinkPropsGet request = new LinkPropsGet(new NetworkEndpointMask(srcSwitch, srcPort), new NetworkEndpointMask(dstSwitch, dstPort));
CommandMessage message = new CommandMessage(request, System.currentTimeMillis(), correlationId);
return messagingChannel.sendAndGetChunked(nbworkerTopic, message).thenApply(response -> response.stream().map(LinkPropsData.class::cast).map(linkPropsMapper::toDto).collect(Collectors.toList()));
}
Aggregations