use of org.openkilda.northbound.dto.v1.switches.DeleteMeterResult in project open-kilda by telstra.
the class JsonSerializationTest method deleteMeterResultTest.
@Test
public void deleteMeterResultTest() throws IOException {
DeleteMeterResult dto = new DeleteMeterResult(true);
assertEquals(dto, pass(dto, DeleteMeterResult.class));
}
use of org.openkilda.northbound.dto.v1.switches.DeleteMeterResult in project open-kilda by telstra.
the class SwitchServiceImpl method deleteMeter.
@Override
public CompletableFuture<DeleteMeterResult> deleteMeter(SwitchId switchId, long meterId) {
String requestId = RequestCorrelationId.getId();
CommandMessage deleteCommand = new CommandMessage(new DeleteMeterRequest(switchId, meterId), System.currentTimeMillis(), requestId);
return messagingChannel.sendAndGet(floodlightTopic, deleteCommand).thenApply(DeleteMeterResponse.class::cast).thenApply(response -> new DeleteMeterResult(response.isDeleted()));
}
Aggregations