Search in sources :

Example 1 with GeneratedBlueprintResponse

use of com.sequenceiq.cloudbreak.api.model.GeneratedBlueprintResponse in project cloudbreak by hortonworks.

the class StackV2Controller method postStackForBlueprint.

@Override
public GeneratedBlueprintResponse postStackForBlueprint(StackV2Request stackRequest) throws Exception {
    IdentityUser user = authenticatedUserService.getCbUser();
    stackRequest.setAccount(user.getAccount());
    stackRequest.setOwner(user.getUserId());
    BlueprintPreparationObject blueprintPreparationObject = conversionService.convert(stackRequest, BlueprintPreparationObject.class);
    String blueprintText = centralBlueprintUpdater.getBlueprintText(blueprintPreparationObject);
    return new GeneratedBlueprintResponse(blueprintText);
}
Also used : IdentityUser(com.sequenceiq.cloudbreak.common.model.user.IdentityUser) BlueprintPreparationObject(com.sequenceiq.cloudbreak.blueprint.BlueprintPreparationObject) GeneratedBlueprintResponse(com.sequenceiq.cloudbreak.api.model.GeneratedBlueprintResponse)

Aggregations

GeneratedBlueprintResponse (com.sequenceiq.cloudbreak.api.model.GeneratedBlueprintResponse)1 BlueprintPreparationObject (com.sequenceiq.cloudbreak.blueprint.BlueprintPreparationObject)1 IdentityUser (com.sequenceiq.cloudbreak.common.model.user.IdentityUser)1