use of org.openkilda.messaging.nbtopology.request.SwitchPatchRequest in project open-kilda by telstra.
the class SwitchServiceImpl method patchSwitch.
/**
* {@inheritDoc}
*/
@Override
public CompletableFuture<SwitchDtoV2> patchSwitch(SwitchId switchId, SwitchPatchDto dto) {
logger.info("Patch switch request for switch {}", switchId);
CommandMessage request = new CommandMessage(new SwitchPatchRequest(switchId, switchMapper.map(dto)), System.currentTimeMillis(), RequestCorrelationId.getId());
return messagingChannel.sendAndGet(nbworkerTopic, request).thenApply(GetSwitchResponse.class::cast).thenApply(GetSwitchResponse::getPayload).thenApply(switchMapper::map);
}
Aggregations