use of org.openkilda.messaging.nbtopology.request.GetAllSwitchPropertiesRequest in project open-kilda by telstra.
the class SwitchServiceImpl method dumpSwitchProperties.
@Override
public CompletableFuture<SwitchPropertiesDump> dumpSwitchProperties() {
final String correlationId = RequestCorrelationId.getId();
logger.debug("Dump switch properties for the switch: {}");
CommandMessage request = new CommandMessage(new GetAllSwitchPropertiesRequest(), System.currentTimeMillis(), correlationId);
return messagingChannel.sendAndGetChunked(nbworkerTopic, request).thenApply(messages -> messages.stream().map(SwitchPropertiesResponse.class::cast).map(r -> switchMapper.map(r.getSwitchProperties())).collect(Collectors.toList())).thenApply(dump -> new SwitchPropertiesDump(dump));
}
Aggregations