use of com.emc.storageos.model.host.cluster.ClusterList in project coprhd-controller by CoprHD.
the class VolumeGroupService method getClusters.
/**
* Get application clusters
*
* @param id Application Id
* @brief List clusters for an application
* @return ClusterList
*/
@GET
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
@Path("/{id}/clusters")
public ClusterList getClusters(@PathParam("id") URI id) {
ArgValidator.checkFieldUriType(id, VolumeGroup.class, "id");
VolumeGroup volumeGroup = _dbClient.queryObject(VolumeGroup.class, id);
ClusterList result = new ClusterList();
List<Cluster> clusters = getVolumeGroupClusters(_dbClient, volumeGroup);
for (Cluster cluster : clusters) {
result.getClusters().add(toNamedRelatedResource(cluster));
}
return result;
}
Aggregations