mirror of https://github.com/apache/cloudstack.git
Incremental checkin
This commit is contained in:
parent
d88ba4fa2b
commit
7a0ad69b89
|
|
@ -143,7 +143,7 @@ public class ListVolumesCmd extends BaseCmd{
|
|||
|
||||
List<VolumeVO> volumes = getManagementServer().searchForVolumes(c);
|
||||
|
||||
if (volumes == null) {
|
||||
if (volumes == null || volumes.size()==0) {
|
||||
throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "unable to find volumes");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5633,14 +5633,26 @@ public class ManagementServerImpl implements ManagementServer {
|
|||
}
|
||||
|
||||
// Don't return DomR and ConsoleProxy volumes
|
||||
/*
|
||||
sc.setParameters("domRNameLabel", "r-%");
|
||||
sc.setParameters("domPNameLabel", "v-%");
|
||||
sc.setParameters("domSNameLabel", "s-%");
|
||||
|
||||
*/
|
||||
|
||||
// Only return volumes that are not destroyed
|
||||
sc.setParameters("destroyed", false);
|
||||
|
||||
return _volumeDao.search(sc, searchFilter);
|
||||
List<VolumeVO> allVolumes = _volumeDao.search(sc, searchFilter);
|
||||
List<VolumeVO> returnableVolumes = new ArrayList<VolumeVO>(); //these are ones without domr and console proxy
|
||||
|
||||
for(VolumeVO v:allVolumes)
|
||||
{
|
||||
VMTemplateVO template = _templateDao.findById(v.getTemplateId());
|
||||
if(!template.getUniqueName().equalsIgnoreCase("routing"))
|
||||
returnableVolumes.add(v);
|
||||
}
|
||||
|
||||
return returnableVolumes;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Reference in New Issue