use of com.sequenceiq.it.cloudbreak.Entity 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