use of org.projectfloodlight.openflow.protocol.OFMeterMod in project open-kilda by telstra.
the class ReplaceInstallFlowTest method installOneSwitchNoneFlow.
@Test
public void installOneSwitchNoneFlow() throws IOException, InterruptedException {
String value = Resources.toString(getClass().getResource("/install_one_switch_none_flow.json"), Charsets.UTF_8);
InstallOneSwitchFlow data = (InstallOneSwitchFlow) prepareData(value);
OFMeterMod meterCommand = scheme.installMeter(data.getBandwidth(), 1024, data.getMeterId());
OFFlowAdd flowCommand = scheme.oneSwitchNoneFlowMod(data.getInputPort(), data.getOutputPort(), data.getMeterId(), 123L);
runTest(value, flowCommand, meterCommand, null, null);
}
use of org.projectfloodlight.openflow.protocol.OFMeterMod in project open-kilda by telstra.
the class SwitchManagerTest method deleteMeter.
@Test
public void deleteMeter() throws SwitchOperationException {
final Capture<OFMeterMod> capture = prepareForMeterTest();
switchManager.deleteMeter(dpid, meterId);
final OFMeterMod meterMod = capture.getValue();
assertEquals(meterMod.getCommand(), OFMeterModCommand.DELETE);
assertEquals(meterMod.getMeterId(), meterId);
}
Aggregations