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;
}
Aggregations