Search in sources :

Example 1 with NoFeatureException

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

the class BfdCommand method checkSwitchCapabilities.

protected void checkSwitchCapabilities(IOFSwitch sw) throws NoFeatureException {
    Set<SwitchFeature> features = featureDetector.detectSwitch(sw);
    final SwitchFeature requiredFeature = SwitchFeature.BFD;
    if (!features.contains(requiredFeature)) {
        throw new NoFeatureException(sw.getId(), requiredFeature, features);
    }
}
Also used : NoFeatureException(org.openkilda.floodlight.error.NoFeatureException) SwitchFeature(org.openkilda.model.SwitchFeature)

Aggregations

NoFeatureException (org.openkilda.floodlight.error.NoFeatureException)1 SwitchFeature (org.openkilda.model.SwitchFeature)1