use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.meter.band.header.meter.band.MeterBandDropCase in project openflowplugin by opendaylight.
the class MeterConvertorTest method testMeterModCommandConvertorNoValidBandData.
@Test
public void testMeterModCommandConvertorNoValidBandData() {
// / DROP Band
MeterBandHeaderBuilder meterBandHeaderBuilder = new MeterBandHeaderBuilder();
MeterBandTypesBuilder meterBandTypesB = new MeterBandTypesBuilder();
MeterBandType bandFlag = new MeterBandType(true, false, false);
// _ofpmbtDrop
meterBandTypesB.setFlags(bandFlag);
meterBandHeaderBuilder.setMeterBandTypes(meterBandTypesB.build());
final MeterBandHeader meterBH = meterBandHeaderBuilder.build();
// DSCP Mark
MeterBandTypesBuilder meterBandTypesB1 = new MeterBandTypesBuilder();
MeterBandType bandFlag1 = new MeterBandType(false, true, false);
meterBandTypesB1.setFlags(bandFlag1);
DscpRemarkBuilder dscp = new DscpRemarkBuilder();
dscp.setDscpRemarkBurstSize(11L);
dscp.setDscpRemarkRate(21L);
dscp.setPrecLevel((short) 1);
DscpRemark dscpRemark = dscp.build();
MeterBandHeaderBuilder meterBandHeaderBuilder1 = new MeterBandHeaderBuilder();
meterBandHeaderBuilder1.setBandType(dscpRemark);
meterBandHeaderBuilder1.setMeterBandTypes(meterBandTypesB1.build());
final MeterBandHeader meterBH1 = meterBandHeaderBuilder1.build();
// Experimental
ExperimenterBuilder exp = new ExperimenterBuilder();
exp.setExperimenterBurstSize(12L);
exp.setExperimenterRate(22L);
exp.setExperimenter(23L);
Experimenter experimenter = exp.build();
MeterBandHeaderBuilder meterBandHeaderBuilder2 = new MeterBandHeaderBuilder();
meterBandHeaderBuilder2.setBandType(experimenter);
MeterBandTypesBuilder meterBandTypesB2 = new MeterBandTypesBuilder();
meterBandHeaderBuilder2.setMeterBandTypes(meterBandTypesB2.build());
MeterBandHeader meterBH2 = meterBandHeaderBuilder2.build();
List<MeterBandHeader> meterBandList = new ArrayList<>();
meterBandList.add(0, meterBH);
meterBandList.add(1, meterBH1);
meterBandList.add(2, meterBH2);
// Constructing List of Bands
MeterBandHeadersBuilder meterBandHeadersBuilder = new MeterBandHeadersBuilder();
meterBandHeadersBuilder.setMeterBandHeader(meterBandList);
MeterBandHeaders meterBandHeaders = meterBandHeadersBuilder.build();
AddMeterInputBuilder addMeterFromSAL = new AddMeterInputBuilder();
// MeterBands
addMeterFromSAL.setMeterBandHeaders(meterBandHeaders);
// NodeKey key = new NodeKey(new NodeId("24"));
// InstanceIdentifier<Node> path =
// InstanceIdentifier.builder().node(Nodes.class).node(Node.class,
// key).build();
addMeterFromSAL.setMeterId(new org.opendaylight.yang.gen.v1.urn.opendaylight.meter.types.rev130918.MeterId(10L));
MeterFlags flagV = new MeterFlags(true, true, true, true);
addMeterFromSAL.setFlags(flagV);
AddMeterInput meterInputCommand = addMeterFromSAL.build();
MeterModInputBuilder outMeterModInput = convert(meterInputCommand, new VersionConvertorData((short) 0X4));
assertEquals(MeterModCommand.OFPMCADD, outMeterModInput.getCommand());
assertTrue(outMeterModInput.getFlags().isOFPMFBURST());
assertEquals(Long.valueOf(10L), outMeterModInput.getMeterId().getValue());
// BandInformation starts here:
List<Bands> bands = outMeterModInput.getBands();
for (Bands currentBand : bands) {
MeterBand meterBand = currentBand.getMeterBand();
if (meterBand instanceof MeterBandDropCase) {
assertEquals(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.MeterBandType.OFPMBTDROP, ((MeterBandDropCase) meterBand).getMeterBandDrop().getType());
assertEquals((long) 20, (long) ((MeterBandDropCase) meterBand).getMeterBandDrop().getBurstSize());
assertEquals((long) 10, (long) ((MeterBandDropCase) meterBand).getMeterBandDrop().getRate());
}
if (meterBand instanceof MeterBandDscpRemarkCase) {
assertEquals(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.MeterBandType.OFPMBTDSCPREMARK, ((MeterBandDscpRemarkCase) meterBand).getMeterBandDscpRemark().getType());
assertEquals((long) 11, (long) ((MeterBandDscpRemarkCase) meterBand).getMeterBandDscpRemark().getBurstSize());
assertEquals((long) 21, (long) ((MeterBandDscpRemarkCase) meterBand).getMeterBandDscpRemark().getRate());
assertEquals((short) 1, (short) ((MeterBandDscpRemarkCase) meterBand).getMeterBandDscpRemark().getPrecLevel());
}
if (meterBand instanceof MeterBandExperimenterCase) {
assertEquals(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.MeterBandType.OFPMBTEXPERIMENTER, ((MeterBandExperimenterCase) meterBand).getMeterBandExperimenter().getType());
assertEquals((long) 12, (long) ((MeterBandExperimenterCase) meterBand).getMeterBandExperimenter().getBurstSize());
assertEquals((long) 22, (long) ((MeterBandExperimenterCase) meterBand).getMeterBandExperimenter().getRate());
ExperimenterIdMeterBand expBand = ((MeterBandExperimenterCase) meterBand).getMeterBandExperimenter().getAugmentation(ExperimenterIdMeterBand.class);
assertEquals((long) 23, (long) expBand.getExperimenter().getValue());
}
}
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.meter.band.header.meter.band.MeterBandDropCase in project openflowplugin by opendaylight.
the class MeterConfigStatsResponseConvertor method convert.
@Override
public List<MeterConfigStats> convert(List<MeterConfig> source, VersionConvertorData data) {
List<MeterConfigStats> listMeterConfigStats = new ArrayList<>();
for (MeterConfig meterConfig : source) {
MeterConfigStatsBuilder meterConfigStatsBuilder = new MeterConfigStatsBuilder();
meterConfigStatsBuilder.setMeterId(new MeterId(meterConfig.getMeterId().getValue()));
meterConfigStatsBuilder.setKey(new MeterConfigStatsKey(meterConfigStatsBuilder.getMeterId()));
MeterBandHeadersBuilder meterBandHeadersBuilder = new MeterBandHeadersBuilder();
List<Bands> bands = meterConfig.getBands();
MeterFlags meterFlags = new MeterFlags(meterConfig.getFlags().isOFPMFBURST(), meterConfig.getFlags().isOFPMFKBPS(), meterConfig.getFlags().isOFPMFPKTPS(), meterConfig.getFlags().isOFPMFSTATS());
meterConfigStatsBuilder.setFlags(meterFlags);
List<MeterBandHeader> listBandHeaders = new ArrayList<>();
int bandKey = 0;
for (Bands band : bands) {
MeterBandHeaderBuilder meterBandHeaderBuilder = new MeterBandHeaderBuilder();
if (band.getMeterBand() instanceof MeterBandDropCase) {
MeterBandDropCase dropCaseBand = (MeterBandDropCase) band.getMeterBand();
MeterBandDrop dropBand = dropCaseBand.getMeterBandDrop();
DropBuilder dropBuilder = new DropBuilder();
dropBuilder.setDropBurstSize(dropBand.getBurstSize());
dropBuilder.setDropRate(dropBand.getRate());
meterBandHeaderBuilder.setBandType(dropBuilder.build());
meterBandHeaderBuilder.setBandBurstSize(dropBand.getBurstSize());
meterBandHeaderBuilder.setBandRate(dropBand.getRate());
BandId bandId = new BandId((long) bandKey);
meterBandHeaderBuilder.setKey(new MeterBandHeaderKey(bandId));
meterBandHeaderBuilder.setBandId(bandId);
MeterBandTypesBuilder meterBandTypesBuilder = new MeterBandTypesBuilder();
meterBandTypesBuilder.setFlags(new MeterBandType(true, false, false));
meterBandHeaderBuilder.setMeterBandTypes(meterBandTypesBuilder.build());
listBandHeaders.add(meterBandHeaderBuilder.build());
} else if (band.getMeterBand() instanceof MeterBandDscpRemarkCase) {
MeterBandDscpRemarkCase dscpRemarkCaseBand = (MeterBandDscpRemarkCase) band.getMeterBand();
MeterBandDscpRemark dscpRemarkBand = dscpRemarkCaseBand.getMeterBandDscpRemark();
DscpRemarkBuilder dscpRemarkBuilder = new DscpRemarkBuilder();
dscpRemarkBuilder.setDscpRemarkBurstSize(dscpRemarkBand.getBurstSize());
dscpRemarkBuilder.setDscpRemarkRate(dscpRemarkBand.getRate());
dscpRemarkBuilder.setPrecLevel(dscpRemarkBand.getPrecLevel());
meterBandHeaderBuilder.setBandType(dscpRemarkBuilder.build());
meterBandHeaderBuilder.setBandBurstSize(dscpRemarkBand.getBurstSize());
meterBandHeaderBuilder.setBandRate(dscpRemarkBand.getRate());
BandId bandId = new BandId((long) bandKey);
meterBandHeaderBuilder.setKey(new MeterBandHeaderKey(bandId));
meterBandHeaderBuilder.setBandId(bandId);
MeterBandTypesBuilder meterBandTypesBuilder = new MeterBandTypesBuilder();
meterBandTypesBuilder.setFlags(new MeterBandType(false, true, false));
meterBandHeaderBuilder.setMeterBandTypes(meterBandTypesBuilder.build());
listBandHeaders.add(meterBandHeaderBuilder.build());
} else if (band.getMeterBand() instanceof MeterBandExperimenterCase) {
MeterBandExperimenterCase experimenterCaseBand = (MeterBandExperimenterCase) band.getMeterBand();
MeterBandExperimenter experimenterBand = experimenterCaseBand.getMeterBandExperimenter();
ExperimenterBuilder experimenterBuilder = new ExperimenterBuilder();
experimenterBuilder.setExperimenterBurstSize(experimenterBand.getBurstSize());
experimenterBuilder.setExperimenterRate(experimenterBand.getRate());
meterBandHeaderBuilder.setBandType(experimenterBuilder.build());
meterBandHeaderBuilder.setBandBurstSize(experimenterBand.getBurstSize());
meterBandHeaderBuilder.setBandRate(experimenterBand.getRate());
BandId bandId = new BandId((long) bandKey);
meterBandHeaderBuilder.setKey(new MeterBandHeaderKey(bandId));
meterBandHeaderBuilder.setBandId(bandId);
MeterBandTypesBuilder meterBandTypesBuilder = new MeterBandTypesBuilder();
meterBandTypesBuilder.setFlags(new MeterBandType(false, false, true));
meterBandHeaderBuilder.setMeterBandTypes(meterBandTypesBuilder.build());
listBandHeaders.add(meterBandHeaderBuilder.build());
}
bandKey++;
}
meterBandHeadersBuilder.setMeterBandHeader(listBandHeaders);
meterConfigStatsBuilder.setMeterBandHeaders(meterBandHeadersBuilder.build());
listMeterConfigStats.add(meterConfigStatsBuilder.build());
}
return listMeterConfigStats;
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.meter.band.header.meter.band.MeterBandDropCase in project openflowplugin by opendaylight.
the class MultipartReplyMessageFactory method serializeMeterConfigBody.
private void serializeMeterConfigBody(final MultipartReplyBody body, final ByteBuf outBuffer) {
MultipartReplyMeterConfigCase meterConfigCase = (MultipartReplyMeterConfigCase) body;
MultipartReplyMeterConfig meter = meterConfigCase.getMultipartReplyMeterConfig();
for (MeterConfig meterConfig : meter.getMeterConfig()) {
ByteBuf meterConfigBuff = UnpooledByteBufAllocator.DEFAULT.buffer();
meterConfigBuff.writeShort(EncodeConstants.EMPTY_LENGTH);
writeMeterFlags(meterConfig.getFlags(), meterConfigBuff);
meterConfigBuff.writeInt(meterConfig.getMeterId().getValue().intValue());
for (Bands currentBand : meterConfig.getBands()) {
MeterBand meterBand = currentBand.getMeterBand();
if (meterBand instanceof MeterBandDropCase) {
MeterBandDropCase dropBandCase = (MeterBandDropCase) meterBand;
MeterBandDrop dropBand = dropBandCase.getMeterBandDrop();
writeBandCommonFields(dropBand, meterConfigBuff);
} else if (meterBand instanceof MeterBandDscpRemarkCase) {
MeterBandDscpRemarkCase dscpRemarkBandCase = (MeterBandDscpRemarkCase) meterBand;
MeterBandDscpRemark dscpRemarkBand = dscpRemarkBandCase.getMeterBandDscpRemark();
writeBandCommonFields(dscpRemarkBand, meterConfigBuff);
} else if (meterBand instanceof MeterBandExperimenterCase) {
MeterBandExperimenterCase experimenterBandCase = (MeterBandExperimenterCase) meterBand;
MeterBandExperimenter experimenterBand = experimenterBandCase.getMeterBandExperimenter();
writeBandCommonFields(experimenterBand, meterConfigBuff);
}
}
meterConfigBuff.setShort(METER_CONFIG_LENGTH_INDEX, meterConfigBuff.readableBytes());
outBuffer.writeBytes(meterConfigBuff);
}
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.meter.band.header.meter.band.MeterBandDropCase in project openflowplugin by opendaylight.
the class MultipartReplyMessageFactoryTest method testMultipartReplyMeterConfigBodyMulti.
/**
* Testing {@link MultipartReplyMessageFactory} for correct translation into POJO.
*/
@Test
public void testMultipartReplyMeterConfigBodyMulti() {
ByteBuf bb = BufferHelper.buildBuffer("00 0A 00 01 00 00 00 00 " + // len
"00 28 " + // flags
"00 06 " + // meterId
"00 00 00 09 " + // meterBandDrop.type
"00 01 " + // meterBandDrop.len
"00 10 " + // meterBandDrop.rate
"00 00 00 11 " + // meterBandDrop.burstSize
"00 00 00 20 " + // meterBandDrop.pad
"00 00 00 00 " + // meterBandDscp.type
"00 02 " + // meterBandDscp.len
"00 10 " + // meterBandDscp.rate
"00 00 00 11 " + // meterBandDscp.burstSize
"00 00 00 20 " + // meterBandDscp.precLevel
"04 " + // meterBandDscp.pad
"00 00 00 " + // len01
"00 18 " + // flags01
"00 03 " + // meterId01
"00 00 00 07 " + // meterBandDscp01.type
"00 02 " + // meterBandDscp01.len
"00 10 " + // meterBandDscp01.rate
"00 00 00 11 " + // meterBandDscp01.burstSize
"00 00 00 20 " + // meterBandDscp01.precLevel
"04 " + // meterBandDscp01.pad
"00 00 00");
MultipartReplyMessage builtByFactory = BufferHelper.deserialize(multipartFactory, bb);
BufferHelper.checkHeaderV13(builtByFactory);
Assert.assertEquals("Wrong type", 10, builtByFactory.getType().getIntValue());
Assert.assertEquals("Wrong flag", true, builtByFactory.getFlags().isOFPMPFREQMORE());
MultipartReplyMeterConfigCase messageCase = (MultipartReplyMeterConfigCase) builtByFactory.getMultipartReplyBody();
MultipartReplyMeterConfig message = messageCase.getMultipartReplyMeterConfig();
Assert.assertEquals("Wrong flags", new MeterFlags(true, false, true, false), message.getMeterConfig().get(0).getFlags());
Assert.assertEquals("Wrong meterId", 9, message.getMeterConfig().get(0).getMeterId().getValue().intValue());
MeterBandDropCase dropCase = (MeterBandDropCase) message.getMeterConfig().get(0).getBands().get(0).getMeterBand();
MeterBandDrop meterBandDrop = dropCase.getMeterBandDrop();
Assert.assertEquals("Wrong meterBandDrop.type", 1, meterBandDrop.getType().getIntValue());
Assert.assertEquals("Wrong meterBandDrop.rate", 17, meterBandDrop.getRate().intValue());
Assert.assertEquals("Wrong meterBandDrop.burstSize", 32, meterBandDrop.getBurstSize().intValue());
MeterBandDscpRemarkCase dscpCase = (MeterBandDscpRemarkCase) message.getMeterConfig().get(0).getBands().get(1).getMeterBand();
MeterBandDscpRemark meterBandDscp = dscpCase.getMeterBandDscpRemark();
Assert.assertEquals("Wrong meterBandDscp.type", 2, meterBandDscp.getType().getIntValue());
Assert.assertEquals("Wrong meterBandDscp.rate", 17, meterBandDscp.getRate().intValue());
Assert.assertEquals("Wrong meterBandDscp.burstSize", 32, meterBandDscp.getBurstSize().intValue());
Assert.assertEquals("Wrong meterBandDscp.precLevel", 4, meterBandDscp.getPrecLevel().intValue());
LOG.info(message.getMeterConfig().get(0).getFlags().toString());
Assert.assertEquals("Wrong flags01", new MeterFlags(false, true, true, false), message.getMeterConfig().get(1).getFlags());
Assert.assertEquals("Wrong meterId01", 7, message.getMeterConfig().get(1).getMeterId().getValue().intValue());
MeterBandDscpRemarkCase dscpCase01 = (MeterBandDscpRemarkCase) message.getMeterConfig().get(1).getBands().get(0).getMeterBand();
MeterBandDscpRemark meterBandDscp01 = dscpCase01.getMeterBandDscpRemark();
Assert.assertEquals("Wrong meterBandDscp01.type", 2, meterBandDscp01.getType().getIntValue());
Assert.assertEquals("Wrong meterBandDscp01.rate", 17, meterBandDscp01.getRate().intValue());
Assert.assertEquals("Wrong meterBandDscp01.burstSize", 32, meterBandDscp01.getBurstSize().intValue());
Assert.assertEquals("Wrong meterBandDscp01.precLevel", 4, meterBandDscp01.getPrecLevel().intValue());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.meter.band.header.meter.band.MeterBandDropCase in project openflowplugin by opendaylight.
the class MeterConvertorTest method testMeterModCommandConvertorwithNoFlags.
@Test
public void testMeterModCommandConvertorwithNoFlags() {
long burstSize = 10L;
long dropRate = 20L;
// / DROP Band
MeterBandTypesBuilder meterBandTypesB = new MeterBandTypesBuilder();
MeterBandType bandFlag = new MeterBandType(true, false, false);
// _ofpmbtDrop
meterBandTypesB.setFlags(bandFlag);
DropBuilder drop = new DropBuilder();
drop.setDropBurstSize(burstSize);
drop.setDropRate(dropRate);
Drop drp = drop.build();
MeterBandHeaderBuilder meterBandHeaderBuilder = new MeterBandHeaderBuilder();
meterBandHeaderBuilder.setBandType(drp);
meterBandHeaderBuilder.setMeterBandTypes(meterBandTypesB.build());
final MeterBandHeader meterBH = meterBandHeaderBuilder.build();
// DSCP Mark
final long dscpRemarkBurstSize = 11L;
final long dscpRemarkRate = 21L;
final short dscpPercLevel = 1;
MeterBandTypesBuilder meterBandTypesB1 = new MeterBandTypesBuilder();
MeterBandType bandFlag1 = new MeterBandType(false, true, false);
meterBandTypesB1.setFlags(bandFlag1);
DscpRemarkBuilder dscp = new DscpRemarkBuilder();
dscp.setDscpRemarkBurstSize(dscpRemarkBurstSize);
dscp.setDscpRemarkRate(dscpRemarkRate);
dscp.setPrecLevel(dscpPercLevel);
DscpRemark dscpRemark = dscp.build();
MeterBandHeaderBuilder meterBandHeaderBuilder1 = new MeterBandHeaderBuilder();
meterBandHeaderBuilder1.setBandType(dscpRemark);
meterBandHeaderBuilder1.setMeterBandTypes(meterBandTypesB1.build());
final MeterBandHeader meterBH1 = meterBandHeaderBuilder1.build();
// Experimental
final long expBurstSize = 12L;
final long expRate = 22L;
final long expExperimenter = 23L;
MeterBandTypesBuilder meterBandTypesB2 = new MeterBandTypesBuilder();
MeterBandType bandFlag2 = new MeterBandType(false, false, true);
meterBandTypesB2.setFlags(bandFlag2);
ExperimenterBuilder exp = new ExperimenterBuilder();
exp.setExperimenterBurstSize(expBurstSize);
exp.setExperimenterRate(expRate);
exp.setExperimenter(expExperimenter);
Experimenter experimenter = exp.build();
MeterBandHeaderBuilder meterBandHeaderBuilder2 = new MeterBandHeaderBuilder();
meterBandHeaderBuilder2.setBandType(experimenter);
meterBandHeaderBuilder2.setMeterBandTypes(meterBandTypesB2.build());
MeterBandHeader meterBH2 = meterBandHeaderBuilder2.build();
List<MeterBandHeader> meterBandList = new ArrayList<>();
meterBandList.add(0, meterBH);
meterBandList.add(1, meterBH1);
meterBandList.add(2, meterBH2);
// Constructing List of Bands
MeterBandHeadersBuilder meterBandHeadersBuilder = new MeterBandHeadersBuilder();
meterBandHeadersBuilder.setMeterBandHeader(meterBandList);
MeterBandHeaders meterBandHeaders = meterBandHeadersBuilder.build();
AddMeterInputBuilder addMeterFromSAL = new AddMeterInputBuilder();
// MeterBands
addMeterFromSAL.setMeterBandHeaders(meterBandHeaders);
// NodeKey key = new NodeKey(new NodeId("24"));
// InstanceIdentifier<Node> path =
// InstanceIdentifier.builder().node(Nodes.class).node(Node.class,
// key).build();
addMeterFromSAL.setMeterId(new org.opendaylight.yang.gen.v1.urn.opendaylight.meter.types.rev130918.MeterId(10L));
AddMeterInput meterInputCommand = addMeterFromSAL.build();
MeterModInputBuilder outMeterModInput = convert(meterInputCommand, new VersionConvertorData((short) 0X4));
assertEquals(MeterModCommand.OFPMCADD, outMeterModInput.getCommand());
assertFalse(outMeterModInput.getFlags().isOFPMFBURST());
assertTrue(outMeterModInput.getFlags().isOFPMFPKTPS());
assertEquals(Long.valueOf(10L), outMeterModInput.getMeterId().getValue());
// BandInformation starts here:
List<Bands> bands = outMeterModInput.getBands();
for (Bands currentBand : bands) {
MeterBand meterBand = currentBand.getMeterBand();
if (meterBand instanceof MeterBandDropCase) {
assertEquals(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.MeterBandType.OFPMBTDROP, ((MeterBandDropCase) meterBand).getMeterBandDrop().getType());
assertEquals(burstSize, (long) ((MeterBandDropCase) meterBand).getMeterBandDrop().getBurstSize());
assertEquals(dropRate, (long) ((MeterBandDropCase) meterBand).getMeterBandDrop().getRate());
}
if (meterBand instanceof MeterBandDscpRemarkCase) {
assertEquals(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.MeterBandType.OFPMBTDSCPREMARK, ((MeterBandDscpRemarkCase) meterBand).getMeterBandDscpRemark().getType());
assertEquals(dscpRemarkBurstSize, (long) ((MeterBandDscpRemarkCase) meterBand).getMeterBandDscpRemark().getBurstSize());
assertEquals(dscpRemarkRate, (long) ((MeterBandDscpRemarkCase) meterBand).getMeterBandDscpRemark().getRate());
assertEquals(dscpPercLevel, (short) ((MeterBandDscpRemarkCase) meterBand).getMeterBandDscpRemark().getPrecLevel());
}
if (meterBand instanceof MeterBandExperimenterCase) {
assertEquals(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.MeterBandType.OFPMBTEXPERIMENTER, ((MeterBandExperimenterCase) meterBand).getMeterBandExperimenter().getType());
assertEquals(expBurstSize, (long) ((MeterBandExperimenterCase) meterBand).getMeterBandExperimenter().getBurstSize());
assertEquals(expRate, (long) ((MeterBandExperimenterCase) meterBand).getMeterBandExperimenter().getRate());
ExperimenterIdMeterBand expBand = ((MeterBandExperimenterCase) meterBand).getMeterBandExperimenter().getAugmentation(ExperimenterIdMeterBand.class);
assertEquals(expExperimenter, (long) expBand.getExperimenter().getValue());
}
}
}
Aggregations