use of com.emc.storageos.model.compute.ComputeSystemList in project coprhd-controller by CoprHD.
the class ComputeSystemService method getComputeSystemList.
/**
* Gets a list of all (active) ViPR Compute Systems.
*
* @brief List compute systems
* @return A list of Name/Id pairs representing active Compute Systems. The
* IDs returned can be used to fetch more detailed information about
* Compute Systems
*/
@GET
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
@CheckPermission(roles = { Role.SYSTEM_ADMIN, Role.SYSTEM_MONITOR })
public ComputeSystemList getComputeSystemList() {
List<URI> ids = _dbClient.queryByType(ComputeSystem.class, true);
ComputeSystemList list = new ComputeSystemList();
Iterator<ComputeSystem> iter = _dbClient.queryIterativeObjects(ComputeSystem.class, ids);
while (iter.hasNext()) {
list.getComputeSystems().add(toNamedRelatedResource(iter.next()));
}
return list;
}
Aggregations