use of org.openkilda.floodlight.command.flow.FlowSegmentReport in project open-kilda by telstra.
the class TransitFlowSegmentCommandTest method errorOnFlowMod.
@Test
public void errorOnFlowMod() {
switchFeaturesSetup(sw, true);
replayAll();
TransitFlowSegmentCommand command = makeCommand(encapsulationVlan);
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 EgressFlowSegmentCommandTest method errorOnFlowMod.
@Test
public void errorOnFlowMod() {
switchFeaturesSetup(sw, true);
replayAll();
FlowEndpoint ingressEndpoint = new FlowEndpoint(mapSwitchId(dpId), 1, 0);
EgressFlowSegmentCommand command = makeCommand(endpointEgressZeroVlan, ingressEndpoint, encapsulationVlan);
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 errorOnMeterManipulation.
@Test
public void errorOnMeterManipulation() {
switchFeaturesSetup(sw, true);
expectMeterInstall(new SwitchErrorResponseException(dpIdNext, "fake fail to install meter error"));
expectNoMoreOfMessages();
reset(sessionService);
reset(session);
replayAll();
IngressFlowSegmentBase command = makeCommand(endpointIngressSingleVlan, meterConfig, makeMetadata());
CompletableFuture<FlowSegmentReport> result = command.execute(commandProcessor);
verifyErrorCompletion(result, SwitchErrorResponseException.class);
}
use of org.openkilda.floodlight.command.flow.FlowSegmentReport in project open-kilda by telstra.
the class IngressCommandInstallTest method noMeterRequested.
@Test
public void noMeterRequested() throws Exception {
IngressFlowSegmentBase command = makeCommand(endpointIngressSingleVlan, null, makeMetadata());
switchFeaturesSetup(sw, true);
expectMakeOuterOnlyVlanForwardMessage(command, new EffectiveIds());
expectNoMoreOfMessages();
replayAll();
CompletableFuture<FlowSegmentReport> result = command.execute(commandProcessor);
verifySuccessCompletion(result);
verifyWriteCount(1);
verifyNoMeterCall((OFFlowAdd) getWriteRecord(0).getRequest());
}
use of org.openkilda.floodlight.command.flow.FlowSegmentReport 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);
}
Aggregations