Search in sources :

Example 1 with GeneratedBlueprintV4Response

use of com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.response.GeneratedBlueprintV4Response in project cloudbreak by hortonworks.

the class DistroXShowBlueprintAction method action.

@Override
public DistroXTestDto action(TestContext testContext, DistroXTestDto testDto, CloudbreakClient client) throws Exception {
    Log.when(LOGGER, " Stack start request on: " + testDto.getName());
    GeneratedBlueprintV4Response generatedBlueprintV4Response = client.getDefaultClient().distroXV1Endpoint().postStackForBlueprint(testDto.getRequest());
    testDto.withGeneratedBlueprintV4Response(generatedBlueprintV4Response);
    return testDto;
}
Also used : GeneratedBlueprintV4Response(com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.response.GeneratedBlueprintV4Response)

Example 2 with GeneratedBlueprintV4Response

use of com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.response.GeneratedBlueprintV4Response in project cloudbreak by hortonworks.

the class StackCommonService method postStackForBlueprint.

public GeneratedBlueprintV4Response postStackForBlueprint(StackV4Request stackRequest) {
    TemplatePreparationObject templatePreparationObject = stackV4RequestToTemplatePreparationObjectConverter.convert(stackRequest);
    String blueprintText = blueprintUpdaterConnectors.getBlueprintText(templatePreparationObject);
    GeneratedBlueprintV4Response response = new GeneratedBlueprintV4Response();
    response.setBlueprintText(anonymize(blueprintText));
    return response;
}
Also used : TemplatePreparationObject(com.sequenceiq.cloudbreak.template.TemplatePreparationObject) GeneratedBlueprintV4Response(com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.response.GeneratedBlueprintV4Response)

Example 3 with GeneratedBlueprintV4Response

use of com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.response.GeneratedBlueprintV4Response in project cloudbreak by hortonworks.

the class StackBlueprintRequestAction method action.

@Override
public StackTestDto action(TestContext testContext, StackTestDto testDto, CloudbreakClient client) throws Exception {
    Log.whenJson(LOGGER, " Stack get generated blueprint:\n", testDto.getRequest());
    GeneratedBlueprintV4Response bp = client.getDefaultClient().stackV4Endpoint().postStackForBlueprint(client.getWorkspaceId(), testDto.getName(), testDto.getRequest(), testContext.getActingUserCrn().getAccountId());
    testDto.withGeneratedBlueprint(bp);
    Log.whenJson(LOGGER, " get generated blueprint was successfully:\n", testDto.getGeneratedBlueprint());
    return testDto;
}
Also used : GeneratedBlueprintV4Response(com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.response.GeneratedBlueprintV4Response)

Example 4 with GeneratedBlueprintV4Response

use of com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.response.GeneratedBlueprintV4Response in project cloudbreak by hortonworks.

the class DistroXBlueprintRequestAction method action.

@Override
public DistroXTestDto action(TestContext testContext, DistroXTestDto testDto, CloudbreakClient client) throws Exception {
    Log.when(LOGGER, " Stack get generated blueprint.");
    GeneratedBlueprintV4Response bp = client.getDefaultClient().distroXV1Endpoint().postStackForBlueprint(testDto.getRequest());
    testDto.withGeneratedBlueprint(bp);
    Log.whenJson(LOGGER, " get generated blueprint was successful:\n", testDto.getGeneratedBlueprint());
    return testDto;
}
Also used : GeneratedBlueprintV4Response(com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.response.GeneratedBlueprintV4Response)

Aggregations

GeneratedBlueprintV4Response (com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.response.GeneratedBlueprintV4Response)4 TemplatePreparationObject (com.sequenceiq.cloudbreak.template.TemplatePreparationObject)1