use of org.openkilda.floodlight.model.EffectiveIds in project open-kilda by telstra.
the class IngressCommandRemoveTest method errorOnMeterManipulation.
@Test
public void errorOnMeterManipulation() {
IngressFlowSegmentBase command = makeCommand(endpointIngressSingleVlan, meterConfig, makeMetadata());
switchFeaturesSetup(sw, true);
expectMeterDryRun();
expectMeterRemove(new SwitchErrorResponseException(dpIdNext, "fake fail to remove meter error"));
expectMakeOuterOnlyVlanForwardMessage(command, new EffectiveIds(meterConfig.getId(), null));
expectNoMoreOfMessages();
replayAll();
CompletableFuture<FlowSegmentReport> result = command.execute(commandProcessor);
verifyErrorCompletion(result, SwitchErrorResponseException.class);
}
use of org.openkilda.floodlight.model.EffectiveIds in project open-kilda by telstra.
the class IngressCommandRemoveTest method errorOnFlowMod.
@Test
public void errorOnFlowMod() {
IngressFlowSegmentBase command = makeCommand(endpointIngressSingleVlan, meterConfig, makeMetadata());
switchFeaturesSetup(sw, true);
expectMeterDryRun();
expectMakeOuterOnlyVlanForwardMessage(command, new EffectiveIds(meterConfig.getId(), null));
expectNoMoreOfMessages();
replayAll();
CompletableFuture<FlowSegmentReport> result = command.execute(commandProcessor);
getWriteRecord(0).getFuture().completeExceptionally(new SwitchErrorResponseException(dpIdNext, of.errorMsgs().buildBadRequestErrorMsg().setCode(OFBadRequestCode.BAD_LEN).build()));
verifyErrorCompletion(result, SwitchOperationException.class);
}
use of org.openkilda.floodlight.model.EffectiveIds in project open-kilda by telstra.
the class IngressCommandRemoveTest method processZeroVlanSingleTable.
protected void processZeroVlanSingleTable(IngressFlowSegmentBase command) throws Exception {
expectMakeDefaultPortForwardMessage(command, new EffectiveIds(meterConfig.getId(), null));
executeCommand(command, 1);
}
use of org.openkilda.floodlight.model.EffectiveIds in project open-kilda by telstra.
the class IngressCommandRemoveTest method processOneVlanSingleTable.
protected void processOneVlanSingleTable(IngressFlowSegmentBase command) throws Exception {
expectMakeOuterOnlyVlanForwardMessage(command, new EffectiveIds(meterConfig.getId(), null));
executeCommand(command, 1);
}
use of org.openkilda.floodlight.model.EffectiveIds in project open-kilda by telstra.
the class IngressCommandRemoveTest method errorNoMeterSupport.
@Test
public void errorNoMeterSupport() throws Exception {
IngressFlowSegmentBase command = makeCommand(endpointIngressSingleVlan, meterConfig, makeMetadata());
switchFeaturesSetup(sw, false);
expectMeterDryRun(new UnsupportedSwitchOperationException(dpIdNext, "Switch doesn't support meters (unit-test)"));
expectMakeOuterOnlyVlanForwardMessage(command, new EffectiveIds());
expectNoMoreOfMessages();
replayAll();
verifySuccessCompletion(command.execute(commandProcessor));
}
Aggregations