use of org.openkilda.messaging.nbtopology.request.DeleteSwitchRequest in project open-kilda by telstra.
the class SwitchServiceImpl method deleteSwitch.
/**
* {@inheritDoc}
*/
@Override
public CompletableFuture<DeleteSwitchResult> deleteSwitch(SwitchId switchId, boolean force) {
String correlationId = RequestCorrelationId.getId();
CommandMessage deleteCommand = new CommandMessage(new DeleteSwitchRequest(switchId, force), System.currentTimeMillis(), correlationId, Destination.WFM);
return messagingChannel.sendAndGet(nbworkerTopic, deleteCommand).thenApply(DeleteSwitchResponse.class::cast).thenApply(response -> new DeleteSwitchResult(response.isDeleted()));
}
Aggregations