Search in sources :

Example 1 with SwitchIncorrectMeterException

use of org.openkilda.floodlight.error.SwitchIncorrectMeterException in project open-kilda by telstra.

the class MeterVerifyCommand method validateMeterConfig.

private void validateMeterConfig(MeterSchema actualSchema, boolean isInaccurate) {
    DatapathId datapathId = getSw().getId();
    MeterSchema expectedSchema = MeterSchemaMapper.INSTANCE.map(datapathId, makeMeterAddMessage());
    if (!expectedSchema.equals(actualSchema)) {
        throw maskCallbackException(new SwitchIncorrectMeterException(datapathId, meterConfig, expectedSchema, actualSchema, isInaccurate));
    }
}
Also used : MeterSchema(org.openkilda.model.of.MeterSchema) SwitchIncorrectMeterException(org.openkilda.floodlight.error.SwitchIncorrectMeterException) DatapathId(org.projectfloodlight.openflow.types.DatapathId)

Aggregations

SwitchIncorrectMeterException (org.openkilda.floodlight.error.SwitchIncorrectMeterException)1 MeterSchema (org.openkilda.model.of.MeterSchema)1 DatapathId (org.projectfloodlight.openflow.types.DatapathId)1