Search in sources :

Example 6 with UnsupportedSwitchOperationException

use of org.openkilda.floodlight.error.UnsupportedSwitchOperationException 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));
}
Also used : UnsupportedSwitchOperationException(org.openkilda.floodlight.error.UnsupportedSwitchOperationException) EffectiveIds(org.openkilda.floodlight.model.EffectiveIds) Test(org.junit.Test)

Example 7 with UnsupportedSwitchOperationException

use of org.openkilda.floodlight.error.UnsupportedSwitchOperationException 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());
}
Also used : UnsupportedSwitchOperationException(org.openkilda.floodlight.error.UnsupportedSwitchOperationException) EffectiveIds(org.openkilda.floodlight.model.EffectiveIds) FlowSegmentReport(org.openkilda.floodlight.command.flow.FlowSegmentReport) Test(org.junit.Test)

Aggregations

UnsupportedSwitchOperationException (org.openkilda.floodlight.error.UnsupportedSwitchOperationException)7 SwitchNotFoundException (org.openkilda.floodlight.error.SwitchNotFoundException)4 SwitchOperationException (org.openkilda.floodlight.error.SwitchOperationException)4 ISwitchManager (org.openkilda.floodlight.switchmanager.ISwitchManager)4 MeterEntry (org.openkilda.messaging.info.meter.MeterEntry)3 SwitchMeterEntries (org.openkilda.messaging.info.meter.SwitchMeterEntries)3 OFMeterConfig (org.projectfloodlight.openflow.protocol.OFMeterConfig)3 Test (org.junit.Test)2 EffectiveIds (org.openkilda.floodlight.model.EffectiveIds)2 IKafkaProducerService (org.openkilda.floodlight.service.kafka.IKafkaProducerService)2 ErrorData (org.openkilda.messaging.error.ErrorData)2 FlowCommandErrorData (org.openkilda.messaging.error.rule.FlowCommandErrorData)2 InfoMessage (org.openkilda.messaging.info.InfoMessage)2 SwitchMeterUnsupported (org.openkilda.messaging.info.meter.SwitchMeterUnsupported)2 SwitchId (org.openkilda.model.SwitchId)2 DatapathId (org.projectfloodlight.openflow.types.DatapathId)2 TypeReference (com.fasterxml.jackson.core.type.TypeReference)1 JsonMappingException (com.fasterxml.jackson.databind.JsonMappingException)1 VisibleForTesting (com.google.common.annotations.VisibleForTesting)1 ImmutableList (com.google.common.collect.ImmutableList)1