use of org.projectfloodlight.openflow.protocol.OFMeterStatsRequest in project open-kilda by telstra.
the class StatisticsService method gatherMeterStats.
@NewCorrelationContextRequired
private void gatherMeterStats(IOFSwitch iofSwitch) {
OFFactory factory = iofSwitch.getOFFactory();
SwitchId switchId = new SwitchId(iofSwitch.getId().getLong());
if (factory.getVersion().compareTo(OFVersion.OF_13) >= 0) {
OFMeterStatsRequest meterStatsRequest = factory.buildMeterStatsRequest().setMeterId(OFPM_ALL).build();
logger.info("Getting meter stats for switch={} OF-xid:{}", iofSwitch.getId(), meterStatsRequest.getXid());
Futures.addCallback(iofSwitch.writeStatsRequest(meterStatsRequest), new RequestCallback<>(data -> OfMeterStatsMapper.INSTANCE.toMeterStatsData(data, switchId), switchId, "meter"), directExecutor());
}
}
Aggregations