Search in sources :

Example 1 with RecipeEndpoint

use of com.sequenceiq.cloudbreak.api.endpoint.v1.RecipeEndpoint in project cloudbreak by hortonworks.

the class RecipeCreationTest method createRecipe.

private void createRecipe(String name, String script, RecipeType recipeType, String description) {
    RecipeRequest recipeRequest = new RecipeRequest();
    recipeRequest.setRecipeType(recipeType);
    recipeRequest.setName(name);
    recipeRequest.setContent(Base64.encodeBase64String(script.getBytes()));
    recipeRequest.setDescription(description);
    RecipeEndpoint recipeEndpoint = getCloudbreakClient().recipeEndpoint();
    Long id = recipeEndpoint.postPrivate(recipeRequest).getId();
    // then
    Assert.assertNotNull(id, "Recipe is not created.");
    addRecipeToContext(id);
}
Also used : RecipeRequest(com.sequenceiq.cloudbreak.api.model.RecipeRequest) RecipeEndpoint(com.sequenceiq.cloudbreak.api.endpoint.v1.RecipeEndpoint)

Aggregations

RecipeEndpoint (com.sequenceiq.cloudbreak.api.endpoint.v1.RecipeEndpoint)1 RecipeRequest (com.sequenceiq.cloudbreak.api.model.RecipeRequest)1