use of org.openkilda.messaging.nbtopology.request.GetSwitchPropertiesRequest in project open-kilda by telstra.
the class SwitchServiceImpl method getSwitchProperties.
@Override
public CompletableFuture<SwitchPropertiesDto> getSwitchProperties(SwitchId switchId) {
final String correlationId = RequestCorrelationId.getId();
logger.debug("Get switch properties for the switch: {}", switchId);
GetSwitchPropertiesRequest data = new GetSwitchPropertiesRequest(switchId);
CommandMessage message = new CommandMessage(data, System.currentTimeMillis(), correlationId);
return messagingChannel.sendAndGet(nbworkerTopic, message).thenApply(SwitchPropertiesResponse.class::cast).thenApply(response -> switchMapper.map(response.getSwitchProperties()));
}
Aggregations