use of org.openkilda.messaging.nbtopology.request.UpdatePortPropertiesRequest in project open-kilda by telstra.
the class SwitchServiceImpl method updatePortProperties.
@Override
public CompletableFuture<PortPropertiesResponse> updatePortProperties(SwitchId switchId, int port, PortPropertiesDto portPropertiesDto) {
String correlationId = RequestCorrelationId.getId();
logger.info("Update port properties for the switch {} and port {}. New properties {}", switchId, port, portPropertiesDto);
UpdatePortPropertiesRequest data = new UpdatePortPropertiesRequest(switchId, port, portPropertiesDto.isDiscoveryEnabled());
InfoMessage request = new InfoMessage(data, System.currentTimeMillis(), correlationId);
return messagingChannel.sendAndGet(topoDiscoTopic, request).thenApply(PortPropertiesPayload.class::cast).thenApply(portPropertiesMapper::map);
}
Aggregations