use of org.projectfloodlight.openflow.protocol.OFErrorMsg in project open-kilda by telstra.
the class MeterInstallCommandTest method notConflictError.
@Test
public void notConflictError() throws Throwable {
switchFeaturesSetup(sw, true);
replayAll();
CompletableFuture<MeterInstallReport> result = command.execute(commandProcessor);
SessionWriteRecord write0 = getWriteRecord(0);
OFErrorMsg error = sw.getOFFactory().errorMsgs().buildBadRequestErrorMsg().setCode(OFBadRequestCode.BAD_LEN).build();
write0.getFuture().completeExceptionally(new SessionErrorResponseException(sw.getId(), error));
verifyErrorCompletion(result, SwitchErrorResponseException.class);
}
use of org.projectfloodlight.openflow.protocol.OFErrorMsg in project open-kilda by telstra.
the class MeterInstallCommandTest method processConflictError.
private CompletableFuture<MeterInstallReport> processConflictError() {
CompletableFuture<MeterInstallReport> result = command.execute(commandProcessor);
SessionWriteRecord write0 = getWriteRecord(0);
OFErrorMsg error = sw.getOFFactory().errorMsgs().buildMeterModFailedErrorMsg().setCode(OFMeterModFailedCode.METER_EXISTS).build();
write0.getFuture().completeExceptionally(new SessionErrorResponseException(sw.getId(), error));
return result;
}
Aggregations