use of com.emc.storageos.model.vpool.VirtualPoolCapacity in project coprhd-controller by CoprHD.
the class VirtualDataCenterCapacityService method getVirtualArrayVirtualPoolCapacities.
private VirtualArrayVirtualPoolCapacity getVirtualArrayVirtualPoolCapacities(URI vArrayId) {
VirtualArrayVirtualPoolCapacity vArrayCap = new VirtualArrayVirtualPoolCapacity();
vArrayCap.setId(vArrayId);
vArrayCap.setVpoolCapacities(new ArrayList<VirtualPoolCapacity>());
URIQueryResultList resultList = new URIQueryResultList();
_dbClient.queryByConstraint(ContainmentConstraint.Factory.getVirtualArrayVirtualPoolConstraint(vArrayId), resultList);
Iterator<URI> vPoolIterator = resultList.iterator();
int c = 0;
while (vPoolIterator.hasNext()) {
URI vPoolId = vPoolIterator.next();
VirtualPool vPool = _permissionsHelper.getObjectById(vPoolId, VirtualPool.class);
vArrayCap.getVpoolCapacities().add(getVirtualPoolCapacities(vArrayId, vPool));
c++;
}
logger.info("{} vpool in varray {}", c, vArrayId);
return vArrayCap;
}
use of com.emc.storageos.model.vpool.VirtualPoolCapacity in project coprhd-controller by CoprHD.
the class VirtualDataCenterCapacityService method getVirtualPoolCapacities.
private VirtualPoolCapacity getVirtualPoolCapacities(URI vArrayId, VirtualPool vPool) {
VirtualPoolCapacity vPoolCap = new VirtualPoolCapacity();
vPoolCap.setId(vPool.getId());
vPoolCap.setCapacity(CapacityUtils.getCapacityForVirtualPoolAndVirtualArray(vPool, vArrayId, _dbClient, _coordinator));
return vPoolCap;
}
Aggregations