use of com.sequenceiq.cloudbreak.api.endpoint.v4.blueprint.responses.BlueprintV4ViewResponse in project cloudbreak by hortonworks.
the class BlueprintToBlueprintV4ViewResponseConverter method convert.
public BlueprintV4ViewResponse convert(Blueprint source) {
BlueprintV4ViewResponse blueprintV4ViewResponse = new BlueprintV4ViewResponse();
blueprintV4ViewResponse.setName(source.getName());
blueprintV4ViewResponse.setDescription(source.getDescription());
blueprintV4ViewResponse.setCrn(source.getResourceCrn());
blueprintV4ViewResponse.setId(source.getId());
blueprintV4ViewResponse.setStackType(source.getStackType());
blueprintV4ViewResponse.setStackVersion(source.getStackVersion());
blueprintV4ViewResponse.setHostGroupCount(source.getHostGroupCount());
blueprintV4ViewResponse.setStatus(source.getStatus());
blueprintV4ViewResponse.setTags(source.getTags().getMap());
blueprintV4ViewResponse.setCreated(source.getCreated());
return blueprintV4ViewResponse;
}
use of com.sequenceiq.cloudbreak.api.endpoint.v4.blueprint.responses.BlueprintV4ViewResponse in project cloudbreak by hortonworks.
the class BlueprintViewToBlueprintV4ViewResponseConverter method convert.
public BlueprintV4ViewResponse convert(BlueprintView entity) {
BlueprintV4ViewResponse blueprintV4ViewResponse = new BlueprintV4ViewResponse();
blueprintV4ViewResponse.setName(entity.getName());
blueprintV4ViewResponse.setDescription(entity.getDescription());
blueprintV4ViewResponse.setId(entity.getId());
blueprintV4ViewResponse.setStackType(entity.getStackType());
blueprintV4ViewResponse.setStackVersion(entity.getStackVersion());
blueprintV4ViewResponse.setHostGroupCount(entity.getHostGroupCount());
blueprintV4ViewResponse.setStatus(entity.getStatus());
blueprintV4ViewResponse.setTags(entity.getTags().getMap());
blueprintV4ViewResponse.setCrn(entity.getResourceCrn());
blueprintV4ViewResponse.setCreated(entity.getCreated());
blueprintV4ViewResponse.setUpgradeable(getBlueprintBasedUpgradeOption(entity));
return blueprintV4ViewResponse;
}
use of com.sequenceiq.cloudbreak.api.endpoint.v4.blueprint.responses.BlueprintV4ViewResponse in project cloudbreak by hortonworks.
the class UpgradePreconditionServiceTest method createClusterResponse.
private ClusterViewV4Response createClusterResponse(Status clusterStatus, BlueprintBasedUpgradeOption upgradeable) {
ClusterViewV4Response dataHubCluster = new ClusterViewV4Response();
dataHubCluster.setStatus(clusterStatus);
BlueprintV4ViewResponse blueprint = new BlueprintV4ViewResponse();
blueprint.setUpgradeable(upgradeable);
dataHubCluster.setBlueprint(blueprint);
return dataHubCluster;
}
use of com.sequenceiq.cloudbreak.api.endpoint.v4.blueprint.responses.BlueprintV4ViewResponse in project cloudbreak by hortonworks.
the class BlueprintV4Action method getAll.
public static void getAll(IntegrationTestContext integrationTestContext, Entity entity) {
BlueprintTestDto blueprintEntity = (BlueprintTestDto) entity;
CloudbreakClient client;
client = integrationTestContext.getContextParam(CloudbreakClient.CLOUDBREAK_CLIENT, CloudbreakClient.class);
Long workspaceId = integrationTestContext.getContextParam(CloudbreakTest.WORKSPACE_ID, Long.class);
Log.log(" getByName all private blueprints. ");
Collection<BlueprintV4ViewResponse> blueprints = client.getDefaultClient().blueprintV4Endpoint().list(workspaceId, true).getResponses();
Set<BlueprintV4Response> detailedBlueprints = blueprints.stream().map(bp -> client.getDefaultClient().blueprintV4Endpoint().getByName(workspaceId, bp.getName())).collect(Collectors.toSet());
blueprintEntity.setResponses(detailedBlueprints);
}
Aggregations