use of org.openkilda.floodlight.command.meter.MeterModifyCommand in project open-kilda by telstra.
the class RecordHandler method doModifyFlowMeterForSwitchManager.
private void doModifyFlowMeterForSwitchManager(CommandMessage message) {
ModifyFlowMeterForSwitchManagerRequest request = (ModifyFlowMeterForSwitchManagerRequest) message.getData();
IKafkaProducerService producerService = getKafkaProducer();
long meterId = request.getMeterId();
SwitchId switchId = request.getSwitchId();
MeterConfig meterConfig = new MeterConfig(new MeterId(request.getMeterId()), request.getRate());
logger.info("Modifying flow meter {} on Switch {}", meterId, switchId);
handleSpeakerCommand(new MeterModifyCommand(new MessageContext(message), switchId, meterConfig));
InfoMessage response = new InfoMessage(new ModifyMeterResponse(switchId, request.getMeterId()), System.currentTimeMillis(), message.getCorrelationId());
producerService.sendMessageAndTrack(context.getKafkaSwitchManagerTopic(), message.getCorrelationId(), response);
}
Aggregations