use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.meter._case.multipart.reply.meter.meter.stats.MeterBandStats in project openflowplugin by opendaylight.
the class MeterStatsResponseConvertorTest method createMeterStatsLit.
private static List<org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.meter._case.multipart.reply.meter.MeterStats> createMeterStatsLit() {
List<org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.meter._case.multipart.reply.meter.MeterStats> allMeterStats = new ArrayList<>();
MeterStatsBuilder meterStatsBuilder = new MeterStatsBuilder();
for (int i = 0; i < PRESET_COUNT; i++) {
meterStatsBuilder.setByteInCount(BigInteger.valueOf(i));
meterStatsBuilder.setDurationNsec((long) 1000 * i);
meterStatsBuilder.setDurationSec((long) 10 * i);
meterStatsBuilder.setFlowCount((long) i);
MeterBandStatsBuilder meterBandStatsBuilder = new MeterBandStatsBuilder();
List<MeterBandStats> meterBandStatses = new ArrayList<>();
for (int j = 0; j < PRESET_COUNT; j++) {
meterBandStatsBuilder.setByteBandCount(BigInteger.valueOf(j));
meterBandStatsBuilder.setPacketBandCount(BigInteger.valueOf(j));
meterBandStatses.add(meterBandStatsBuilder.build());
}
meterStatsBuilder.setMeterBandStats(meterBandStatses);
meterStatsBuilder.setMeterId(new MeterId((long) i));
meterStatsBuilder.setPacketInCount(BigInteger.valueOf(i));
allMeterStats.add(meterStatsBuilder.build());
}
return allMeterStats;
}
Aggregations