Search in sources :

Example 1 with NoRecipeException

use of org.onap.so.apihandlerinfra.infra.rest.exception.NoRecipeException in project so by onap.

the class NetworkRestHandler method findNetworkRecipe.

public Recipe findNetworkRecipe(String action) throws NoRecipeException {
    String modelName = "GR-API-DEFAULT";
    NetworkRecipe recipe = catalogDbClient.getFirstNetworkRecipeByModelNameAndAction(modelName, action);
    if (recipe == null) {
        throw new NoRecipeException(String.format("Unable to locate default recipe for, Action: %s, Model Name: %s", action, modelName));
    }
    return recipe;
}
Also used : NetworkRecipe(org.onap.so.db.catalog.beans.NetworkRecipe) NoRecipeException(org.onap.so.apihandlerinfra.infra.rest.exception.NoRecipeException)

Aggregations

NoRecipeException (org.onap.so.apihandlerinfra.infra.rest.exception.NoRecipeException)1 NetworkRecipe (org.onap.so.db.catalog.beans.NetworkRecipe)1