use of org.pmiops.workbench.model.ClusterListResponse in project workbench by all-of-us.
the class ClusterController method listClusters.
@Override
public ResponseEntity<ClusterListResponse> listClusters() {
String project = userProvider.get().getFreeTierBillingProjectName();
org.pmiops.workbench.notebooks.model.Cluster fcCluster;
try {
fcCluster = this.notebooksService.getCluster(project, DEFAULT_CLUSTER_NAME);
} catch (NotFoundException e) {
fcCluster = this.notebooksService.createCluster(project, DEFAULT_CLUSTER_NAME, createFirecloudClusterRequest());
}
ClusterListResponse resp = new ClusterListResponse();
resp.setDefaultCluster(TO_ALL_OF_US_CLUSTER.apply(fcCluster));
return ResponseEntity.ok(resp);
}
Aggregations