use of com.emc.storageos.model.compute.ComputeImageServerList in project coprhd-controller by CoprHD.
the class ComputeImageServerService method getComputeImageServers.
/**
* Returns a list of all compute image servers.
*
* @brief Show compute image servers
* @return List of all compute image servers.
*/
@GET
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
@CheckPermission(roles = { Role.SYSTEM_ADMIN, Role.SYSTEM_MONITOR })
public ComputeImageServerList getComputeImageServers() {
List<URI> ids = _dbClient.queryByType(ComputeImageServer.class, true);
ComputeImageServerList imageServerList = new ComputeImageServerList();
Iterator<ComputeImageServer> iter = _dbClient.queryIterativeObjects(ComputeImageServer.class, ids);
while (iter.hasNext()) {
ComputeImageServer imageServer = iter.next();
imageServerList.getComputeImageServers().add(DbObjectMapper.toNamedRelatedResource(imageServer));
}
return imageServerList;
}
Aggregations