use of org.openkilda.floodlight.command.flow.FlowSegmentReport 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.command.flow.FlowSegmentReport in project open-kilda by telstra.
the class IngressCommandInstallTest method errorOnFlowMod.
@Test
public void errorOnFlowMod() {
IngressFlowSegmentBase command = makeCommand(endpointIngressSingleVlan, meterConfig, makeMetadata(false));
switchFeaturesSetup(sw, true);
expectMeterInstall();
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.command.flow.FlowSegmentReport in project open-kilda by telstra.
the class IngressCommandInstallTest method errorNoMeterSupport.
@Test
public void errorNoMeterSupport() throws Exception {
switchFeaturesSetup(sw, false);
IngressFlowSegmentBase command = makeCommand(endpointIngressSingleVlan, meterConfig, makeMetadata());
expectMeterInstall(new UnsupportedSwitchOperationException(dpIdNext, "Switch doesn't support meters (unit-test)"));
expectMakeOuterOnlyVlanForwardMessage(command, new EffectiveIds());
expectNoMoreOfMessages();
replayAll();
CompletableFuture<FlowSegmentReport> result = command.execute(commandProcessor);
verifyWriteCount(1);
verifySuccessCompletion(result);
verifyNoMeterCall((OFFlowAdd) getWriteRecord(0).getRequest());
}
Aggregations